diff options
author | Arun Kumar Mohan <arunmohandm@gmail.com> | 2019-08-28 14:18:03 +0300 |
---|---|---|
committer | Arun Kumar Mohan <arunmohandm@gmail.com> | 2019-09-03 07:41:19 +0300 |
commit | ab60775216e6d23ec7ee8a580793b5b3fa92f6f9 (patch) | |
tree | eca5dc690129828610000ae779035b1fa1178335 /db/migrate/20190828110802_add_not_null_constraints_to_prometheus_metrics_y_label_and_unit.rb | |
parent | 4e4fcf79c57f9c6f62b7a1cfbb6a83ee154f05fa (diff) |
Add not null constraints to prometheus_metrics table columns
Diffstat (limited to 'db/migrate/20190828110802_add_not_null_constraints_to_prometheus_metrics_y_label_and_unit.rb')
-rw-r--r-- | db/migrate/20190828110802_add_not_null_constraints_to_prometheus_metrics_y_label_and_unit.rb | 8 |
1 files changed, 8 insertions, 0 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 |