diff options
Diffstat (limited to 'db/migrate/20210401134157_add_index_to_pages_deployments.rb')
-rw-r--r-- | db/migrate/20210401134157_add_index_to_pages_deployments.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/db/migrate/20210401134157_add_index_to_pages_deployments.rb b/db/migrate/20210401134157_add_index_to_pages_deployments.rb new file mode 100644 index 00000000000..aef27c7c6f9 --- /dev/null +++ b/db/migrate/20210401134157_add_index_to_pages_deployments.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +class AddIndexToPagesDeployments < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + DOWNTIME = false + + disable_ddl_transaction! + + INDEX_NAME = 'index_pages_deployments_on_file_store_and_id' + + def up + add_concurrent_index :pages_deployments, [:file_store, :id], name: INDEX_NAME + end + + def down + remove_concurrent_index_by_name :pages_deployments, INDEX_NAME + end +end |