Commit d8752364 authored by Patrick Bair's avatar Patrick Bair

Merge branch '349549-inconsistency-schema-index' into 'master'

Resolve "Inconsistent schema - index"

See merge request gitlab-org/gitlab!77754
parents 7a8c79ca 0cf02f77
# 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
......@@ -26080,8 +26080,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_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 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