debian-mirror-gitlab/db/migrate/20191105193652_add_index_on_deployments_updated_at.rb
2019-12-26 22:10:19 +05:30

19 lines
386 B
Ruby

# frozen_string_literal: true
class AddIndexOnDeploymentsUpdatedAt < ActiveRecord::Migration[5.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
INDEX_COLUMNS = [:project_id, :updated_at]
disable_ddl_transaction!
def up
add_concurrent_index(:deployments, INDEX_COLUMNS)
end
def down
remove_concurrent_index(:deployments, INDEX_COLUMNS)
end
end