Browse Source

Add renttype column

pull/123/head
Kat 4 years ago
parent
commit
27ba9cd49d
  1. 7
      db/migrate/20211130090246_add_rent_type.rb
  2. 3
      db/schema.rb
  3. 1
      spec/factories/case_log.rb
  4. 3
      spec/fixtures/complete_case_log.json

7
db/migrate/20211130090246_add_rent_type.rb

@ -0,0 +1,7 @@
class AddRentType < ActiveRecord::Migration[6.1]
def change
change_table :case_logs, bulk: true do |t|
t.column :renttype, :integer
end
end
end

3
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_11_26_142105) do
ActiveRecord::Schema.define(version: 2021_11_30_090246) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@ -168,6 +168,7 @@ ActiveRecord::Schema.define(version: 2021_11_26_142105) do
t.bigint "owning_organisation_id"
t.bigint "managing_organisation_id"
t.datetime "property_void_date"
t.integer "renttype"
t.index ["discarded_at"], name: "index_case_logs_on_discarded_at"
t.index ["managing_organisation_id"], name: "index_case_logs_on_managing_organisation_id"
t.index ["owning_organisation_id"], name: "index_case_logs_on_owning_organisation_id"

1
spec/factories/case_log.rb

@ -137,6 +137,7 @@ FactoryBot.define do
armedforces { 1 }
builtype { 1 }
unitletas { 2 }
renttype { 1 }
end
created_at { Time.zone.now }
updated_at { Time.zone.now }

3
spec/fixtures/complete_case_log.json vendored

@ -143,6 +143,7 @@
"property_wheelchair_accessible": "Yes",
"void_or_renewal_date": "05/05/2020",
"tenant_same_property_renewal": "Yes",
"new_build_handover_date": "01/01/2019"
"new_build_handover_date": "01/01/2019",
"renttype": 1
}
}

Loading…
Cancel
Save