Browse Source

change unitletas

pull/95/head
magicmilo 3 years ago
parent
commit
ee976eea44
  1. 7
      app/constants/db_enums.rb
  2. 2
      config/forms/2021_2022.json
  3. 4
      db/migrate/20211124152204_change_recently_let_as_to_enum.rb
  4. 2
      db/schema.rb

7
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,

2
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": "",

4
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

2
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

Loading…
Cancel
Save