sqm-dashboards/db/migrate/20211029195454_remove_null_constraints_from_measure_benchmarks.rb
Nelson Jovel ad03606d66 Add benchmarks to survey and admin data items. Remove them from measures. Modify seeder
Calculate benchmarks for measures based on a weighted average of survey
and admin data items

Added architectural records
2021-12-28 14:10:34 +01:00

19 lines
661 B
Ruby

class RemoveNullConstraintsFromMeasureBenchmarks < ActiveRecord::Migration[6.1]
def up
change_table :measures do |t|
t.change :watch_low_benchmark, :float, null: true
t.change :growth_low_benchmark, :float, null: true
t.change :approval_low_benchmark, :float, null: true
t.change :ideal_low_benchmark, :float, null: true
end
end
def down
change_table :measures do |t|
t.change :watch_low_benchmark, :float, null: false
t.change :growth_low_benchmark, :float, null: false
t.change :approval_low_benchmark, :float, null: false
t.change :ideal_low_benchmark, :float, null: false
end
end
end