summaryrefslogtreecommitdiff
path: root/db/migrate
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2018-09-05 16:48:46 +0200
committerKamil Trzciński <ayufan@ayufan.eu>2018-09-05 17:26:46 +0200
commitc54494e22adf6d157e05933aa37d182d2f3c1ce6 (patch)
tree8b2e622cb85fdb55ebc685a61f11c7772dd6d13e /db/migrate
parent5e06c377452d839fdec74d9542c115d667b2963b (diff)
downloadgitlab-ce-c54494e22adf6d157e05933aa37d182d2f3c1ce6.tar.gz
Make `identifier:` unique
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20180831164908_add_identifier_to_prometheus_metric.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/db/migrate/20180831164908_add_identifier_to_prometheus_metric.rb b/db/migrate/20180831164908_add_identifier_to_prometheus_metric.rb
index d5f33a293cc..129e4a6e7f5 100644
--- a/db/migrate/20180831164908_add_identifier_to_prometheus_metric.rb
+++ b/db/migrate/20180831164908_add_identifier_to_prometheus_metric.rb
@@ -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