2018-09-04 05:42:58 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-11-13 02:27:31 -05:00
|
|
|
class CreatePrometheusMetrics < ActiveRecord::Migration[4.2]
|
2018-08-31 12:53:50 -04:00
|
|
|
DOWNTIME = false
|
|
|
|
|
|
|
|
def change
|
2019-08-23 17:36:12 -04:00
|
|
|
# rubocop:disable Migration/AddLimitToStringColumns
|
2018-08-31 12:53:50 -04:00
|
|
|
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
|
2019-08-23 17:36:12 -04:00
|
|
|
# rubocop:enable Migration/AddLimitToStringColumns
|
2018-08-31 12:53:50 -04:00
|
|
|
end
|
|
|
|
end
|