Browse Source

Add new UPRN and address columns to logs

CLDC-2068-request-and-validate-UPRN
Jack S 2 years ago
parent
commit
f0ffadff9a
  1. 15
      db/migrate/20230301170338_add_uprn_to_logs.rb
  2. 15
      db/migrate/20230306110210_add_address_to_logs.rb
  3. 14
      db/schema.rb

15
db/migrate/20230301170338_add_uprn_to_logs.rb

@ -0,0 +1,15 @@
class AddUprnToLogs < ActiveRecord::Migration[7.0]
def change
change_table :sales_logs, bulk: true do |t|
t.column :uprn, :string
t.column :uprn_known, :integer
t.column :uprn_confirmed, :integer
end
change_table :lettings_logs, bulk: true do |t|
t.column :uprn, :string
t.column :uprn_known, :integer
t.column :uprn_confirmed, :integer
end
end
end

15
db/migrate/20230306110210_add_address_to_logs.rb

@ -0,0 +1,15 @@
class AddAddressToLogs < ActiveRecord::Migration[7.0]
change_table :sales_logs, bulk: true do |t|
t.column :address_line1, :string
t.column :address_line2, :string
t.column :town_or_city, :string
t.column :county, :string
end
change_table :lettings_logs, bulk: true do |t|
t.column :address_line1, :string
t.column :address_line2, :string
t.column :town_or_city, :string
t.column :county, :string
end
end

14
db/schema.rb

@ -279,6 +279,13 @@ ActiveRecord::Schema[7.0].define(version: 2023_03_08_101826) do
t.boolean "unresolved"
t.bigint "updated_by_id"
t.bigint "bulk_upload_id"
t.string "uprn"
t.integer "uprn_known"
t.integer "uprn_confirmed"
t.string "address_line1"
t.string "address_line2"
t.string "town_or_city"
t.string "county"
t.index ["bulk_upload_id"], name: "index_lettings_logs_on_bulk_upload_id"
t.index ["created_by_id"], name: "index_lettings_logs_on_created_by_id"
t.index ["location_id"], name: "index_lettings_logs_on_location_id"
@ -545,6 +552,13 @@ ActiveRecord::Schema[7.0].define(version: 2023_03_08_101826) do
t.integer "buy2living"
t.integer "prevtenbuy2"
t.integer "nationalbuy2"
t.string "uprn"
t.integer "uprn_known"
t.integer "uprn_confirmed"
t.string "address_line1"
t.string "address_line2"
t.string "town_or_city"
t.string "county"
t.index ["bulk_upload_id"], name: "index_sales_logs_on_bulk_upload_id"
t.index ["created_by_id"], name: "index_sales_logs_on_created_by_id"
t.index ["old_id"], name: "index_sales_logs_on_old_id", unique: true

Loading…
Cancel
Save