diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2018-08-31 18:53:50 +0200 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2018-09-04 12:19:22 +0200 |
commit | 0a9d771bcba036971ebc076112c4a62f2179e372 (patch) | |
tree | 5445b484556e0946931e002147cf40a2d6c1afa0 /db/migrate/20180101160629_create_prometheus_metrics.rb | |
parent | 05ee94beb70a2969b85563a0c41bf5afe48a3699 (diff) | |
download | gitlab-ce-0a9d771bcba036971ebc076112c4a62f2179e372.tar.gz |
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/20180101160629_create_prometheus_metrics.rb')
-rw-r--r-- | db/migrate/20180101160629_create_prometheus_metrics.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/db/migrate/20180101160629_create_prometheus_metrics.rb b/db/migrate/20180101160629_create_prometheus_metrics.rb new file mode 100644 index 00000000000..da6371084cb --- /dev/null +++ b/db/migrate/20180101160629_create_prometheus_metrics.rb @@ -0,0 +1,16 @@ +class CreatePrometheusMetrics < ActiveRecord::Migration + DOWNTIME = false + + def change + create_table :prometheus_metrics do |t| + t.references :project, index: true, foreign_key: { on_delete: :cascade }, null: false + t.string :title, null: false + t.string :query, null: false + t.string :y_label + t.string :unit + t.string :legend + t.integer :group, null: false, index: true + t.timestamps_with_timezone null: false + end + end +end |