2018-11-20 20:47:30 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-12-23 12:14:25 +05:30
|
|
|
class CreatePrometheusMetrics < ActiveRecord::Migration[4.2]
|
2018-11-20 20:47:30 +05:30
|
|
|
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
|