diff --git a/db/migrate/20240404074651_add_assigned_to_index.rb b/db/migrate/20240404074651_add_assigned_to_index.rb index 2f39465a6..cb7e343d6 100644 --- a/db/migrate/20240404074651_add_assigned_to_index.rb +++ b/db/migrate/20240404074651_add_assigned_to_index.rb @@ -1,7 +1,5 @@ class AddAssignedToIndex < ActiveRecord::Migration[7.0] def change - remove_index :sales_logs, name: "index_sales_logs_on_created_by_id", column: :created_by_id - remove_index :lettings_logs, name: "index_lettings_logs_on_created_by_id", column: :created_by_id add_index :sales_logs, :assigned_to_id add_index :lettings_logs, :assigned_to_id end diff --git a/db/schema.rb b/db/schema.rb index 03a1a7c9a..444324ae6 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -319,10 +319,11 @@ ActiveRecord::Schema[7.0].define(version: 2024_04_04_074651) do t.string "la_as_entered" t.integer "partner_under_16_value_check" t.integer "multiple_partners_value_check" - t.integer "assigned_to_id" t.bigint "created_by_id" + t.integer "assigned_to_id" t.index ["assigned_to_id"], name: "index_lettings_logs_on_assigned_to_id" 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" t.index ["managing_organisation_id"], name: "index_lettings_logs_on_managing_organisation_id" t.index ["old_id"], name: "index_lettings_logs_on_old_id", unique: true @@ -686,10 +687,11 @@ ActiveRecord::Schema[7.0].define(version: 2024_04_04_074651) do t.string "la_as_entered" t.integer "partner_under_16_value_check" t.integer "multiple_partners_value_check" - t.integer "assigned_to_id" t.bigint "created_by_id" + t.integer "assigned_to_id" t.index ["assigned_to_id"], name: "index_sales_logs_on_assigned_to_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 ["managing_organisation_id"], name: "index_sales_logs_on_managing_organisation_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"