Browse Source

Add old id column

pull/1331/head
Kat 3 years ago
parent
commit
7f929e054c
  1. 8
      db/migrate/20230215112932_add_old_id_to_sales_logs.rb
  2. 10
      db/schema.rb

8
db/migrate/20230215112932_add_old_id_to_sales_logs.rb

@ -0,0 +1,8 @@
class AddOldIdToSalesLogs < ActiveRecord::Migration[7.0]
def change
change_table :sales_logs, bulk: true do |t|
t.column :old_id, :string
end
add_index :sales_logs, :old_id, unique: true
end
end

10
db/schema.rb

@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[7.0].define(version: 2023_02_13_140932) do
ActiveRecord::Schema[7.0].define(version: 2023_02_15_112932) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@ -522,16 +522,18 @@ ActiveRecord::Schema[7.0].define(version: 2023_02_13_140932) do
t.integer "old_persons_shared_ownership_value_check"
t.integer "staircase_bought_value_check"
t.integer "monthly_charges_value_check"
t.integer "saledate_check"
t.integer "details_known_5"
t.integer "details_known_6"
t.integer "saledate_check"
t.integer "prevshared"
t.integer "staircasesale"
t.integer "ethnic_group2"
t.integer "ethnicbuy2"
t.integer "proplen_asked"
t.integer "prevshared"
t.integer "staircasesale"
t.string "old_id"
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
t.index ["owning_organisation_id"], name: "index_sales_logs_on_owning_organisation_id"
t.index ["updated_by_id"], name: "index_sales_logs_on_updated_by_id"
end

Loading…
Cancel
Save