|
|
|
@ -10,10 +10,24 @@ |
|
|
|
# |
|
|
|
# |
|
|
|
# It's strongly recommended that you check this file into your version control system. |
|
|
|
# It's strongly recommended that you check this file into your version control system. |
|
|
|
|
|
|
|
|
|
|
|
ActiveRecord::Schema[7.0].define(version: 2023_01_10_094518) do |
|
|
|
ActiveRecord::Schema[7.0].define(version: 2023_01_13_125117) do |
|
|
|
# These are extensions that must be enabled in order to support this database |
|
|
|
# These are extensions that must be enabled in order to support this database |
|
|
|
enable_extension "plpgsql" |
|
|
|
enable_extension "plpgsql" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
create_table "bulk_upload_errors", force: :cascade do |t| |
|
|
|
|
|
|
|
t.bigint "bulk_upload_id" |
|
|
|
|
|
|
|
t.text "cell" |
|
|
|
|
|
|
|
t.text "row" |
|
|
|
|
|
|
|
t.text "tenant_code" |
|
|
|
|
|
|
|
t.text "property_ref" |
|
|
|
|
|
|
|
t.text "purchaser_code" |
|
|
|
|
|
|
|
t.text "field" |
|
|
|
|
|
|
|
t.text "error" |
|
|
|
|
|
|
|
t.datetime "created_at", null: false |
|
|
|
|
|
|
|
t.datetime "updated_at", null: false |
|
|
|
|
|
|
|
t.index ["bulk_upload_id"], name: "index_bulk_upload_errors_on_bulk_upload_id" |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
create_table "bulk_uploads", force: :cascade do |t| |
|
|
|
create_table "bulk_uploads", force: :cascade do |t| |
|
|
|
t.bigint "user_id" |
|
|
|
t.bigint "user_id" |
|
|
|
t.text "log_type", null: false |
|
|
|
t.text "log_type", null: false |
|
|
|
@ -236,7 +250,6 @@ ActiveRecord::Schema[7.0].define(version: 2023_01_10_094518) do |
|
|
|
t.string "old_id" |
|
|
|
t.string "old_id" |
|
|
|
t.integer "joint" |
|
|
|
t.integer "joint" |
|
|
|
t.bigint "created_by_id" |
|
|
|
t.bigint "created_by_id" |
|
|
|
t.integer "illness_type_0" |
|
|
|
|
|
|
|
t.integer "retirement_value_check" |
|
|
|
t.integer "retirement_value_check" |
|
|
|
t.integer "tshortfall_known" |
|
|
|
t.integer "tshortfall_known" |
|
|
|
t.integer "sheltered" |
|
|
|
t.integer "sheltered" |
|
|
|
@ -469,7 +482,21 @@ ActiveRecord::Schema[7.0].define(version: 2023_01_10_094518) do |
|
|
|
t.integer "hoday" |
|
|
|
t.integer "hoday" |
|
|
|
t.integer "homonth" |
|
|
|
t.integer "homonth" |
|
|
|
t.integer "hoyear" |
|
|
|
t.integer "hoyear" |
|
|
|
|
|
|
|
t.integer "fromprop" |
|
|
|
|
|
|
|
t.integer "socprevten" |
|
|
|
|
|
|
|
t.integer "mortgagelender" |
|
|
|
|
|
|
|
t.string "mortgagelenderother" |
|
|
|
t.integer "mortlen" |
|
|
|
t.integer "mortlen" |
|
|
|
|
|
|
|
t.integer "extrabor" |
|
|
|
|
|
|
|
t.integer "hhmemb" |
|
|
|
|
|
|
|
t.integer "totadult" |
|
|
|
|
|
|
|
t.integer "totchild" |
|
|
|
|
|
|
|
t.integer "hhtype" |
|
|
|
|
|
|
|
t.string "pcode1" |
|
|
|
|
|
|
|
t.string "pcode2" |
|
|
|
|
|
|
|
t.integer "pcodenk" |
|
|
|
|
|
|
|
t.string "postcode_full" |
|
|
|
|
|
|
|
t.boolean "is_la_inferred" |
|
|
|
t.index ["created_by_id"], name: "index_sales_logs_on_created_by_id" |
|
|
|
t.index ["created_by_id"], name: "index_sales_logs_on_created_by_id" |
|
|
|
t.index ["owning_organisation_id"], name: "index_sales_logs_on_owning_organisation_id" |
|
|
|
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" |
|
|
|
t.index ["updated_by_id"], name: "index_sales_logs_on_updated_by_id" |
|
|
|
@ -498,13 +525,11 @@ ActiveRecord::Schema[7.0].define(version: 2023_01_10_094518) do |
|
|
|
t.string "intended_stay" |
|
|
|
t.string "intended_stay" |
|
|
|
t.datetime "end_date" |
|
|
|
t.datetime "end_date" |
|
|
|
t.integer "has_other_client_group" |
|
|
|
t.integer "has_other_client_group" |
|
|
|
t.bigint "managing_organisation_id" |
|
|
|
|
|
|
|
t.string "arrangement_type" |
|
|
|
t.string "arrangement_type" |
|
|
|
t.string "old_id" |
|
|
|
t.string "old_id" |
|
|
|
t.string "old_visible_id" |
|
|
|
t.string "old_visible_id" |
|
|
|
t.integer "total_units" |
|
|
|
t.integer "total_units" |
|
|
|
t.boolean "confirmed" |
|
|
|
t.boolean "confirmed" |
|
|
|
t.index ["managing_organisation_id"], name: "index_schemes_on_managing_organisation_id" |
|
|
|
|
|
|
|
t.index ["owning_organisation_id"], name: "index_schemes_on_owning_organisation_id" |
|
|
|
t.index ["owning_organisation_id"], name: "index_schemes_on_owning_organisation_id" |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
@ -569,7 +594,6 @@ ActiveRecord::Schema[7.0].define(version: 2023_01_10_094518) do |
|
|
|
add_foreign_key "organisation_relationships", "organisations", column: "child_organisation_id" |
|
|
|
add_foreign_key "organisation_relationships", "organisations", column: "child_organisation_id" |
|
|
|
add_foreign_key "organisation_relationships", "organisations", column: "parent_organisation_id" |
|
|
|
add_foreign_key "organisation_relationships", "organisations", column: "parent_organisation_id" |
|
|
|
add_foreign_key "sales_logs", "organisations", column: "owning_organisation_id", on_delete: :cascade |
|
|
|
add_foreign_key "sales_logs", "organisations", column: "owning_organisation_id", on_delete: :cascade |
|
|
|
add_foreign_key "schemes", "organisations", column: "managing_organisation_id" |
|
|
|
|
|
|
|
add_foreign_key "schemes", "organisations", column: "owning_organisation_id", on_delete: :cascade |
|
|
|
add_foreign_key "schemes", "organisations", column: "owning_organisation_id", on_delete: :cascade |
|
|
|
add_foreign_key "users", "organisations", on_delete: :cascade |
|
|
|
add_foreign_key "users", "organisations", on_delete: :cascade |
|
|
|
end |
|
|
|
end |
|
|
|
|