diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-27 21:09:52 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-27 21:09:52 +0300 |
commit | 28f1931ae84034333abf651ecde369683697ddaf (patch) | |
tree | 7701b2caa8e0e7edfc2d4dca38855c1c03ed8de3 /db | |
parent | 4c39dd11dcbdab4fdd9424a62320a1fc773c2918 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20201030223933_add_ci_pipeline_deployments_to_plan_limits.rb | 9 | ||||
-rw-r--r-- | db/post_migrate/20201120140210_add_runner_id_and_id_desc_index_to_ci_builds.rb | 21 | ||||
-rw-r--r-- | db/schema_migrations/20201030223933 | 1 | ||||
-rw-r--r-- | db/schema_migrations/20201120140210 | 1 | ||||
-rw-r--r-- | db/structure.sql | 5 |
5 files changed, 35 insertions, 2 deletions
diff --git a/db/migrate/20201030223933_add_ci_pipeline_deployments_to_plan_limits.rb b/db/migrate/20201030223933_add_ci_pipeline_deployments_to_plan_limits.rb new file mode 100644 index 00000000000..60f0ff9d6ed --- /dev/null +++ b/db/migrate/20201030223933_add_ci_pipeline_deployments_to_plan_limits.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +class AddCiPipelineDeploymentsToPlanLimits < ActiveRecord::Migration[6.0] + DOWNTIME = false + + def change + add_column :plan_limits, :ci_pipeline_deployments, :integer, default: 500, null: false + end +end diff --git a/db/post_migrate/20201120140210_add_runner_id_and_id_desc_index_to_ci_builds.rb b/db/post_migrate/20201120140210_add_runner_id_and_id_desc_index_to_ci_builds.rb new file mode 100644 index 00000000000..5eda0e25dbe --- /dev/null +++ b/db/post_migrate/20201120140210_add_runner_id_and_id_desc_index_to_ci_builds.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +class AddRunnerIdAndIdDescIndexToCiBuilds < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + NEW_INDEX = 'index_ci_builds_on_runner_id_and_id_desc' + OLD_INDEX = 'index_ci_builds_on_runner_id' + + disable_ddl_transaction! + + def up + add_concurrent_index :ci_builds, %i[runner_id id], name: NEW_INDEX, order: { id: :desc } + remove_concurrent_index_by_name :ci_builds, OLD_INDEX + end + + def down + add_concurrent_index :ci_builds, %i[runner_id], name: OLD_INDEX + remove_concurrent_index_by_name :ci_builds, NEW_INDEX + end +end diff --git a/db/schema_migrations/20201030223933 b/db/schema_migrations/20201030223933 new file mode 100644 index 00000000000..2fb5f394989 --- /dev/null +++ b/db/schema_migrations/20201030223933 @@ -0,0 +1 @@ +a3aa783f2648a95e3ff8b503ef15b8153759c74ac85b30bf94e39710824e57b0
\ No newline at end of file diff --git a/db/schema_migrations/20201120140210 b/db/schema_migrations/20201120140210 new file mode 100644 index 00000000000..5a281f95f5d --- /dev/null +++ b/db/schema_migrations/20201120140210 @@ -0,0 +1 @@ +6b88d79aa8d373fa1d9aa2698a9d20c09aff14ef16af4c123abd4e7c98e41311
\ No newline at end of file diff --git a/db/structure.sql b/db/structure.sql index a895fd6414e..d75d3d6f5c9 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -14797,7 +14797,8 @@ CREATE TABLE plan_limits ( golang_max_file_size bigint DEFAULT 104857600 NOT NULL, debian_max_file_size bigint DEFAULT '3221225472'::bigint NOT NULL, project_feature_flags integer DEFAULT 200 NOT NULL, - ci_max_artifact_size_api_fuzzing integer DEFAULT 0 NOT NULL + ci_max_artifact_size_api_fuzzing integer DEFAULT 0 NOT NULL, + ci_pipeline_deployments integer DEFAULT 500 NOT NULL ); CREATE SEQUENCE plan_limits_id_seq @@ -20482,7 +20483,7 @@ CREATE INDEX index_ci_builds_on_protected ON ci_builds USING btree (protected); CREATE INDEX index_ci_builds_on_queued_at ON ci_builds USING btree (queued_at); -CREATE INDEX index_ci_builds_on_runner_id ON ci_builds USING btree (runner_id); +CREATE INDEX index_ci_builds_on_runner_id_and_id_desc ON ci_builds USING btree (runner_id, id DESC); CREATE INDEX index_ci_builds_on_stage_id ON ci_builds USING btree (stage_id); |