debian-mirror-gitlab/db/migrate/20180216120040_add_pages_domain_enabled_until_index.rb

18 lines
492 B
Ruby
Raw Normal View History

2019-02-15 15:39:39 +05:30
class AddPagesDomainEnabledUntilIndex < ActiveRecord::Migration[4.2]
2018-03-17 18:26:18 +05:30
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
add_concurrent_index :pages_domains, [:project_id, :enabled_until]
add_concurrent_index :pages_domains, [:verified_at, :enabled_until]
end
def down
remove_concurrent_index :pages_domains, [:verified_at, :enabled_until]
remove_concurrent_index :pages_domains, [:project_id, :enabled_until]
end
end