diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2018-09-05 16:48:46 +0200 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2018-09-05 17:26:46 +0200 |
commit | c54494e22adf6d157e05933aa37d182d2f3c1ce6 (patch) | |
tree | 8b2e622cb85fdb55ebc685a61f11c7772dd6d13e /db/migrate | |
parent | 5e06c377452d839fdec74d9542c115d667b2963b (diff) | |
download | gitlab-ce-c54494e22adf6d157e05933aa37d182d2f3c1ce6.tar.gz |
Make `identifier:` unique
Diffstat (limited to 'db/migrate')
-rw-r--r-- | db/migrate/20180831164908_add_identifier_to_prometheus_metric.rb | 3 |
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 |