summaryrefslogtreecommitdiff
path: root/db/migrate/20180101160629_create_prometheus_metrics.rb
blob: c3be0939b1713ea3c2b5cacea83a87edf97403f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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