summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--db/migrate/20190828110802_add_not_null_constraints_to_prometheus_metrics_y_label_and_unit.rb8
-rw-r--r--db/schema.rb4
2 files changed, 10 insertions, 2 deletions
diff --git a/db/migrate/20190828110802_add_not_null_constraints_to_prometheus_metrics_y_label_and_unit.rb b/db/migrate/20190828110802_add_not_null_constraints_to_prometheus_metrics_y_label_and_unit.rb
new file mode 100644
index 00000000000..6f3650ca966
--- /dev/null
+++ b/db/migrate/20190828110802_add_not_null_constraints_to_prometheus_metrics_y_label_and_unit.rb
@@ -0,0 +1,8 @@
+class AddNotNullConstraintsToPrometheusMetricsYLabelAndUnit < ActiveRecord::Migration[5.2]
+ DOWNTIME = false
+
+ def change
+ change_column_null(:prometheus_metrics, :y_label, false)
+ change_column_null(:prometheus_metrics, :unit, false)
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 5b89cdf0b98..3980627045e 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -2869,8 +2869,8 @@ ActiveRecord::Schema.define(version: 2019_09_02_131045) do
t.integer "project_id"
t.string "title", null: false
t.string "query", null: false
- t.string "y_label"
- t.string "unit"
+ t.string "y_label", null: false
+ t.string "unit", null: false
t.string "legend"
t.integer "group", null: false
t.datetime_with_timezone "created_at", null: false