diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-03-07 10:08:53 -0600 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-03-07 10:09:01 -0600 |
commit | 5d9762b3b5ace3da397b83f501d103a5152f0dd3 (patch) | |
tree | bed282cc9a07e165842c6b28e18746c8558c0c21 /db/migrate/20161106185620_add_project_import_data_project_index.rb | |
parent | 6a52cda31da4becc3e342530a2bdf0868d8921cc (diff) | |
download | gitlab-ce-5d9762b3b5ace3da397b83f501d103a5152f0dd3.tar.gz |
Add cop to ensure reversibility of add_concurrent_index
Diffstat (limited to 'db/migrate/20161106185620_add_project_import_data_project_index.rb')
-rw-r--r-- | db/migrate/20161106185620_add_project_import_data_project_index.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/db/migrate/20161106185620_add_project_import_data_project_index.rb b/db/migrate/20161106185620_add_project_import_data_project_index.rb index 750a6a8c51e..94b8ddd46f5 100644 --- a/db/migrate/20161106185620_add_project_import_data_project_index.rb +++ b/db/migrate/20161106185620_add_project_import_data_project_index.rb @@ -6,7 +6,11 @@ class AddProjectImportDataProjectIndex < ActiveRecord::Migration disable_ddl_transaction! - def change + def up add_concurrent_index :project_import_data, :project_id end + + def down + remove_index :project_import_data, :project_id if index_exists? :project_import_data, :project_id + end end |