Commit c54494e2 authored by Kamil Trzciński's avatar Kamil Trzciński

Make `identifier:` unique

parent 5e06c377
......@@ -6,6 +6,7 @@ class AddIdentifierToPrometheusMetric < ActiveRecord::Migration
DOWNTIME = false
def change
add_column :prometheus_metrics, :identifier, :string, unique: true
add_column :prometheus_metrics, :identifier, :string
add_index :prometheus_metrics, :identifier, unique: true
end
end
......@@ -1712,6 +1712,7 @@ ActiveRecord::Schema.define(version: 20180831164909) do
add_index "prometheus_metrics", ["common"], name: "index_prometheus_metrics_on_common", using: :btree
add_index "prometheus_metrics", ["group"], name: "index_prometheus_metrics_on_group", using: :btree
add_index "prometheus_metrics", ["identifier"], name: "index_prometheus_metrics_on_identifier", unique: true, using: :btree
add_index "prometheus_metrics", ["project_id"], name: "index_prometheus_metrics_on_project_id", using: :btree
create_table "protected_branch_merge_access_levels", force: :cascade do |t|
......
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