diff options
Diffstat (limited to 'db/migrate/20180101160629_create_prometheus_metrics.rb')
-rw-r--r-- | db/migrate/20180101160629_create_prometheus_metrics.rb | 18 |
1 files changed, 18 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..c3be0939b17 --- /dev/null +++ b/db/migrate/20180101160629_create_prometheus_metrics.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +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 |