diff options
author | Tiago Botelho <tiagonbotelho@hotmail.com> | 2018-05-02 16:35:04 +0300 |
---|---|---|
committer | Tiago Botelho <tiagonbotelho@hotmail.com> | 2018-05-04 18:33:26 +0300 |
commit | bddbcaefc2389e4c61763472cecbea150f10cd75 (patch) | |
tree | 38ba599beed53505dfca09fce7a890bf3b125bb3 /db/migrate/20180503175054_add_indexes_to_project_mirror_data.rb | |
parent | 7603beffc916d06039cac63b223d8e6234b5d666 (diff) |
Backports every CE related change from ee-44542 to CE
Diffstat (limited to 'db/migrate/20180503175054_add_indexes_to_project_mirror_data.rb')
-rw-r--r-- | db/migrate/20180503175054_add_indexes_to_project_mirror_data.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/db/migrate/20180503175054_add_indexes_to_project_mirror_data.rb b/db/migrate/20180503175054_add_indexes_to_project_mirror_data.rb new file mode 100644 index 00000000000..17570269b2e --- /dev/null +++ b/db/migrate/20180503175054_add_indexes_to_project_mirror_data.rb @@ -0,0 +1,17 @@ +class AddIndexesToProjectMirrorData < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + add_concurrent_index :project_mirror_data, :jid + add_concurrent_index :project_mirror_data, :status + end + + def down + remove_index :project_mirror_data, :jid if index_exists? :project_mirror_data, :jid + remove_index :project_mirror_data, :status if index_exists? :project_mirror_data, :status + end +end |