diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-12-15 06:08:03 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-12-15 06:08:03 +0300 |
commit | 00880613328c66f85aee755fcd1e70ce4cb9fcdf (patch) | |
tree | a4abf7a4c00248d865dba9775482cd90f8467bfd /db | |
parent | 45465a1f217b65ee3b11870175f363afaf912eb9 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r-- | db/post_migrate/20231029134824_remove_deployments_cluster_id.rb | 20 | ||||
-rw-r--r-- | db/schema_migrations/20231029134824 | 1 | ||||
-rw-r--r-- | db/structure.sql | 3 |
3 files changed, 21 insertions, 3 deletions
diff --git a/db/post_migrate/20231029134824_remove_deployments_cluster_id.rb b/db/post_migrate/20231029134824_remove_deployments_cluster_id.rb new file mode 100644 index 00000000000..11ab9370ad2 --- /dev/null +++ b/db/post_migrate/20231029134824_remove_deployments_cluster_id.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +class RemoveDeploymentsClusterId < Gitlab::Database::Migration[2.2] + disable_ddl_transaction! + milestone '16.7' + + def up + with_lock_retries do + remove_column :deployments, :cluster_id, if_exists: true + end + end + + def down + with_lock_retries do + add_column :deployments, :cluster_id, :integer, if_not_exists: true + end + + add_concurrent_index(:deployments, [:cluster_id, :status]) + end +end diff --git a/db/schema_migrations/20231029134824 b/db/schema_migrations/20231029134824 new file mode 100644 index 00000000000..628afeba60f --- /dev/null +++ b/db/schema_migrations/20231029134824 @@ -0,0 +1 @@ +6a6904e4d238188de896f31d18ed970c1784cbd831506f48ad186d3ca0f1a2af
\ No newline at end of file diff --git a/db/structure.sql b/db/structure.sql index e445a6e1f77..d3d18beb466 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -15997,7 +15997,6 @@ CREATE TABLE deployments ( on_stop character varying, status smallint NOT NULL, finished_at timestamp with time zone, - cluster_id integer, deployable_id bigint, archived boolean DEFAULT false NOT NULL ); @@ -32705,8 +32704,6 @@ CREATE INDEX index_deployments_for_visible_scope ON deployments USING btree (env CREATE INDEX index_deployments_on_archived_project_id_iid ON deployments USING btree (archived, project_id, iid); -CREATE INDEX index_deployments_on_cluster_id_and_status ON deployments USING btree (cluster_id, status); - CREATE INDEX index_deployments_on_created_at ON deployments USING btree (created_at); CREATE INDEX index_deployments_on_deployable_type_and_deployable_id ON deployments USING btree (deployable_type, deployable_id); |