diff options
author | Arun Kumar Mohan <arunmohandm@gmail.com> | 2019-08-28 06:18:03 -0500 |
---|---|---|
committer | Arun Kumar Mohan <arunmohandm@gmail.com> | 2019-09-02 23:41:19 -0500 |
commit | ab60775216e6d23ec7ee8a580793b5b3fa92f6f9 (patch) | |
tree | eca5dc690129828610000ae779035b1fa1178335 /db | |
parent | 4e4fcf79c57f9c6f62b7a1cfbb6a83ee154f05fa (diff) | |
download | gitlab-ce-ab60775216e6d23ec7ee8a580793b5b3fa92f6f9.tar.gz |
Add not null constraints to prometheus_metrics table columns
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20190828110802_add_not_null_constraints_to_prometheus_metrics_y_label_and_unit.rb | 8 | ||||
-rw-r--r-- | db/schema.rb | 4 |
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 |