Commit 0cf02f77 authored by dfrazao-gitlab's avatar dfrazao-gitlab Committed by pbair

Fix structure.sql file

The strcture.sql file is out of sync for the following indexes:

- index_environments_on_auto_stop_at
- index_merge_request_context_commits_on_merge_request_id

We had to add the migrations back to remove those indexes.

Changelog: fixed

Relates to https://gitlab.com/gitlab-org/gitlab/-/merge_requests/77754
parent a9c82335
# frozen_string_literal: true
class RemoveIndexOnAutoStopIn < Gitlab::Database::Migration[1.0]
TABLE = :environments
INDEX_NAME = 'index_environments_on_auto_stop_at'
COLUMN = :auto_stop_at
disable_ddl_transaction!
def up
remove_concurrent_index TABLE, COLUMN, where: 'auto_stop_at IS NOT NULL', name: INDEX_NAME
end
def down
add_concurrent_index TABLE, COLUMN, where: 'auto_stop_at IS NOT NULL', name: INDEX_NAME
end
end
# frozen_string_literal: true
class RemoveIndexOnMergeRequestId < Gitlab::Database::Migration[1.0]
TABLE = :merge_request_context_commits
INDEX_NAME = 'index_merge_request_context_commits_on_merge_request_id'
COLUMN = :merge_request_id
disable_ddl_transaction!
def up
remove_concurrent_index TABLE, COLUMN, name: INDEX_NAME
end
def down
add_concurrent_index TABLE, COLUMN, name: INDEX_NAME
end
end
ff0127967c3ee6e4f4af528b84024a6a838f8dbeb19cf78d7d913d4fc8e155e7
\ No newline at end of file
abbba4ccacebb825c3f9cb5b0463d457fd4a7b4396a2184a995e496aebaf4521
\ No newline at end of file
...@@ -26079,8 +26079,6 @@ CREATE INDEX index_emails_on_user_id ON emails USING btree (user_id); ...@@ -26079,8 +26079,6 @@ CREATE INDEX index_emails_on_user_id ON emails USING btree (user_id);
CREATE INDEX index_enabled_clusters_on_id ON clusters USING btree (id) WHERE (enabled = true); CREATE INDEX index_enabled_clusters_on_id ON clusters USING btree (id) WHERE (enabled = true);
CREATE INDEX index_environments_on_auto_stop_at ON environments USING btree (auto_stop_at) WHERE (auto_stop_at IS NOT NULL);
CREATE INDEX index_environments_on_name_varchar_pattern_ops ON environments USING btree (name varchar_pattern_ops); CREATE INDEX index_environments_on_name_varchar_pattern_ops ON environments USING btree (name varchar_pattern_ops);
CREATE UNIQUE INDEX index_environments_on_project_id_and_name ON environments USING btree (project_id, name); CREATE UNIQUE INDEX index_environments_on_project_id_and_name ON environments USING btree (project_id, name);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment