Browse Source

Add reasonable preference reason keys and table fields

pull/40/head
Kat 4 years ago
parent
commit
d4e7c93c5f
  1. 10
      config/forms/2021_2022.json
  2. 11
      db/migrate/20211008110444_add_reasonable_preference_reason_fields.rb
  3. 7
      db/schema.rb

10
config/forms/2021_2022.json

@ -1612,12 +1612,12 @@
"hint_text": "Select all that apply",
"type": "checkbox",
"answer_options": {
"0": "Homeless or about to lose their home (within 56 days)",
"1": "Living in insanitary or overcrowded or unsatisfactory housing",
"2": "A need to move on medical and welfare grounds (including a disability)",
"3": "A need to move to avoid hardship to themselves or others",
"reasonable_preference_reason_homeless": "Homeless or about to lose their home (within 56 days)",
"reasonable_preference_reason_unsatisfactory_housing": "Living in insanitary or overcrowded or unsatisfactory housing",
"reasonable_preference_reason_medical_grounds": "A need to move on medical and welfare grounds (including a disability)",
"reasonable_preference_reason_avoid_hardship": "A need to move to avoid hardship to themselves or others",
"divider": true,
"4": "Do not know"
"reasonable_preference_reason_do_not_know": "Do not know"
}
}
}

11
db/migrate/20211008110444_add_reasonable_preference_reason_fields.rb

@ -0,0 +1,11 @@
class AddReasonablePreferenceReasonFields < ActiveRecord::Migration[6.1]
def change
change_table :case_logs, bulk: true do |t|
t.column :reasonable_preference_reason_homeless, :boolean
t.column :reasonable_preference_reason_unsatisfactory_housing, :boolean
t.column :reasonable_preference_reason_medical_grounds, :boolean
t.column :reasonable_preference_reason_avoid_hardship, :boolean
t.column :reasonable_preference_reason_do_not_know, :boolean
end
end
end

7
db/schema.rb

@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2021_10_08_105117) do
ActiveRecord::Schema.define(version: 2021_10_08_110444) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@ -126,6 +126,11 @@ ActiveRecord::Schema.define(version: 2021_10_08_105117) do
t.boolean "condition_effects_social_or_behavioral"
t.boolean "condition_effects_other"
t.boolean "condition_effects_prefer_not_to_say"
t.boolean "reasonable_preference_reason_homeless"
t.boolean "reasonable_preference_reason_unsatisfactory_housing"
t.boolean "reasonable_preference_reason_medical_grounds"
t.boolean "reasonable_preference_reason_avoid_hardship"
t.boolean "reasonable_preference_reason_do_not_know"
end
end

Loading…
Cancel
Save