Commit 40181bfc authored by Kamil Trzciński's avatar Kamil Trzciński

Fix concurrent index problem

parent bdb06db0
......@@ -7,6 +7,5 @@ class AddIdentifierToPrometheusMetric < ActiveRecord::Migration
def change
add_column :prometheus_metrics, :identifier, :string
add_index :prometheus_metrics, :identifier, unique: true
end
end
# frozen_string_literal: true
class AddIdentifierToPrometheusMetric < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
add_concurrent_index :prometheus_metrics, :identifier, unique: true
end
def down
remove_concurrent_index :prometheus_metrics, :identifier, unique: true
end
end
......@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20180831164909) do
ActiveRecord::Schema.define(version: 20180831164910) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment