diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2018-08-31 19:53:50 +0300 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2018-09-04 13:19:22 +0300 |
commit | 0a9d771bcba036971ebc076112c4a62f2179e372 (patch) | |
tree | 5445b484556e0946931e002147cf40a2d6c1afa0 /db/migrate/20180831164905_add_common_to_prometheus_metrics.rb | |
parent | 05ee94beb70a2969b85563a0c41bf5afe48a3699 (diff) |
Import common metrics into database.
This MR backports PrometheusMetric model to CE
and adds: common, identifier to figure out what kind of metric is used.
Diffstat (limited to 'db/migrate/20180831164905_add_common_to_prometheus_metrics.rb')
-rw-r--r-- | db/migrate/20180831164905_add_common_to_prometheus_metrics.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/db/migrate/20180831164905_add_common_to_prometheus_metrics.rb b/db/migrate/20180831164905_add_common_to_prometheus_metrics.rb new file mode 100644 index 00000000000..43e36d2047c --- /dev/null +++ b/db/migrate/20180831164905_add_common_to_prometheus_metrics.rb @@ -0,0 +1,15 @@ +class AddCommonToPrometheusMetrics < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + add_column_with_default(:prometheus_metrics, :common, :boolean, default: false) + end + + def down + remove_column(:prometheus_metrics, :common) + end +end |