diff options
author | Thong Kuah <tkuah@gitlab.com> | 2019-08-26 12:11:41 +0300 |
---|---|---|
committer | Thong Kuah <tkuah@gitlab.com> | 2019-08-29 03:37:36 +0300 |
commit | 3ed555f3c980ef7c21efd17cabc06a8037643787 (patch) | |
tree | fd07f390269a38ad420f376c02308f573399d7a9 /db/migrate/20190826090628_remove_redundant_deployments_index.rb | |
parent | 1dec74808cca3d78c904f645659384b525c72337 (diff) |
Remove redundant index
Now we have cluster_id, state index, we don't the cluster_id index as
well.
Diffstat (limited to 'db/migrate/20190826090628_remove_redundant_deployments_index.rb')
-rw-r--r-- | db/migrate/20190826090628_remove_redundant_deployments_index.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/db/migrate/20190826090628_remove_redundant_deployments_index.rb b/db/migrate/20190826090628_remove_redundant_deployments_index.rb new file mode 100644 index 00000000000..6b009c17d64 --- /dev/null +++ b/db/migrate/20190826090628_remove_redundant_deployments_index.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +class RemoveRedundantDeploymentsIndex < ActiveRecord::Migration[5.2] + include Gitlab::Database::MigrationHelpers + + # Set this constant to true if this migration requires downtime. + DOWNTIME = false + + disable_ddl_transaction! + + def up + remove_concurrent_index :deployments, :cluster_id + end + + def down + add_concurrent_index :deployments, :cluster_id + end +end |