diff --git a/app/constants/db_enums.rb b/app/constants/db_enums.rb index 341d13155..4cd0a82e7 100644 --- a/app/constants/db_enums.rb +++ b/app/constants/db_enums.rb @@ -19,6 +19,13 @@ module DbEnums } end + def self.builtype + { + "Purpose built" => 1, + "Conversion" => 2 + } + end + def self.ecstat { "Part-time - Less than 30 hours" => 2, diff --git a/config/forms/2021_2022.json b/config/forms/2021_2022.json index 737acb070..0b62cef59 100644 --- a/config/forms/2021_2022.json +++ b/config/forms/2021_2022.json @@ -1522,7 +1522,7 @@ "header": "", "description": "", "questions": { - "type_property_most_recently_let_as": { + "unitletas": { "check_answer_label": "Type property most recently let as", "header": "Which type was the property most recently let as?", "hint_text": "", diff --git a/db/migrate/20211124152204_change_recently_let_as_to_enum.rb b/db/migrate/20211124152204_change_recently_let_as_to_enum.rb index 9758b400c..d5cddce59 100644 --- a/db/migrate/20211124152204_change_recently_let_as_to_enum.rb +++ b/db/migrate/20211124152204_change_recently_let_as_to_enum.rb @@ -3,6 +3,8 @@ class ChangeRecentlyLetAsToEnum < ActiveRecord::Migration[6.1] change_table :case_logs, bulk: true do |t| t.remove :type_property_most_recently_let_as t.column :unitletas, :int + t.remove :builtype + t.column :builtype, :int end end @@ -10,6 +12,8 @@ class ChangeRecentlyLetAsToEnum < ActiveRecord::Migration[6.1] change_table :case_logs, bulk: true do |t| t.remove :unitletas t.column :type_property_most_recently_let_as, :string + t.remove :builtype + t.remove :builtype, :string end end end diff --git a/db/schema.rb b/db/schema.rb index ebc40c05b..0c8b93e67 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -167,8 +167,8 @@ ActiveRecord::Schema.define(version: 2021_11_24_152204) do t.string "property_postcode" t.integer "first_time_property_let_as_social_housing" t.string "why_dont_you_know_la" - t.string "builtype" t.integer "unitletas" + t.integer "builtype" t.index ["discarded_at"], name: "index_case_logs_on_discarded_at" end