blob: 9a9decffdab855d8d96f027cba37651d34cee973 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
class AddIndexesToRemoteMirror < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
add_concurrent_index :remote_mirrors, :last_successful_update_at unless index_exists?(:remote_mirrors, :last_successful_update_at)
end
def down
remove_index :remote_mirrors, :last_successful_update_at if index_exists? :remote_mirrors, :last_successful_update_at
end
end
|