diff --git a/db/migrate/20211126142105_user_case_logs_belong_to_organisation.rb b/db/migrate/20211126142105_user_case_logs_belong_to_organisation.rb index d689910bf..d889d8db9 100644 --- a/db/migrate/20211126142105_user_case_logs_belong_to_organisation.rb +++ b/db/migrate/20211126142105_user_case_logs_belong_to_organisation.rb @@ -5,8 +5,8 @@ class UserCaseLogsBelongToOrganisation < ActiveRecord::Migration[6.1] t.belongs_to :organisation end change_table :case_logs, bulk: true do |t| - t.belongs_to :owning_organisation, class_name: "Organisation" - t.belongs_to :managing_organisation, class_name: "Organisation" + t.belongs_to :owning_organisation + t.belongs_to :managing_organisation end end diff --git a/db/migrate/20220323094418_create_data_protection_confirmation.rb b/db/migrate/20220323094418_create_data_protection_confirmation.rb index 4223022c2..a0d0d2436 100644 --- a/db/migrate/20220323094418_create_data_protection_confirmation.rb +++ b/db/migrate/20220323094418_create_data_protection_confirmation.rb @@ -2,7 +2,7 @@ class CreateDataProtectionConfirmation < ActiveRecord::Migration[7.0] def change create_table :data_protection_confirmations do |t| t.belongs_to :organisation - t.belongs_to :data_protection_officer, class_name: "User", index: { name: :dpo_user_id } + t.belongs_to :data_protection_officer, index: { name: :dpo_user_id } t.column :confirmed, :boolean t.column :old_id, :string t.column :old_org_id, :string diff --git a/db/migrate/20220427160536_add_created_by_to_case_logs.rb b/db/migrate/20220427160536_add_created_by_to_case_logs.rb index 557f17a1a..4d5928176 100644 --- a/db/migrate/20220427160536_add_created_by_to_case_logs.rb +++ b/db/migrate/20220427160536_add_created_by_to_case_logs.rb @@ -1,7 +1,7 @@ class AddCreatedByToCaseLogs < ActiveRecord::Migration[7.0] def change change_table :case_logs, bulk: true do |t| - t.belongs_to :created_by, class_name: "User" + t.belongs_to :created_by end end end diff --git a/db/migrate/20220826093411_add_sales_log.rb b/db/migrate/20220826093411_add_sales_log.rb index 8b14d7f5b..eddea3ad5 100644 --- a/db/migrate/20220826093411_add_sales_log.rb +++ b/db/migrate/20220826093411_add_sales_log.rb @@ -4,9 +4,9 @@ class AddSalesLog < ActiveRecord::Migration[7.0] t.integer :status, default: 0 t.datetime :saledate t.timestamps - t.references :owning_organisation, class_name: "Organisation", foreign_key: { to_table: :organisations, on_delete: :cascade } - t.references :managing_organisation, class_name: "Organisation" - t.references :created_by, class_name: "User" + t.references :owning_organisation, foreign_key: { to_table: :organisations, on_delete: :cascade } + t.references :managing_organisation + t.references :created_by end end end diff --git a/db/migrate/20221207141947_add_updated_by_to_logs.rb b/db/migrate/20221207141947_add_updated_by_to_logs.rb index 9bc80c526..a97ea9e7d 100644 --- a/db/migrate/20221207141947_add_updated_by_to_logs.rb +++ b/db/migrate/20221207141947_add_updated_by_to_logs.rb @@ -1,10 +1,10 @@ class AddUpdatedByToLogs < ActiveRecord::Migration[7.0] def change change_table :lettings_logs, bulk: true do |t| - t.belongs_to :updated_by, class_name: "User" + t.belongs_to :updated_by end change_table :sales_logs, bulk: true do |t| - t.belongs_to :updated_by, class_name: "User" + t.belongs_to :updated_by end end end diff --git a/db/migrate/20230530094653_add_data_sharing_agreement.rb b/db/migrate/20230530094653_add_data_sharing_agreement.rb index a148b32cc..a65aa279c 100644 --- a/db/migrate/20230530094653_add_data_sharing_agreement.rb +++ b/db/migrate/20230530094653_add_data_sharing_agreement.rb @@ -2,7 +2,7 @@ class AddDataSharingAgreement < ActiveRecord::Migration[7.0] def change create_table :data_sharing_agreements do |t| t.belongs_to :organisation - t.belongs_to :data_protection_officer, class_name: "User" + t.belongs_to :data_protection_officer t.datetime :signed_at, null: false t.string :organisation_name, null: false diff --git a/db/migrate/20231121131725_add_sales_managing_organisation.rb b/db/migrate/20231121131725_add_sales_managing_organisation.rb index f4085414a..a77b75c79 100644 --- a/db/migrate/20231121131725_add_sales_managing_organisation.rb +++ b/db/migrate/20231121131725_add_sales_managing_organisation.rb @@ -1,7 +1,7 @@ class AddSalesManagingOrganisation < ActiveRecord::Migration[7.0] def change change_table :sales_logs, bulk: true do |t| - t.references :managing_organisation, class_name: "Organisation" + t.references :managing_organisation end end end diff --git a/db/migrate/20240408102550_add_created_by.rb b/db/migrate/20240408102550_add_created_by.rb index b47e382a5..b7fc65674 100644 --- a/db/migrate/20240408102550_add_created_by.rb +++ b/db/migrate/20240408102550_add_created_by.rb @@ -1,11 +1,11 @@ class AddCreatedBy < ActiveRecord::Migration[7.0] def change change_table :sales_logs do |t| - t.references :created_by, class_name: "User" + t.references :created_by end change_table :lettings_logs do |t| - t.references :created_by, class_name: "User" + t.references :created_by end end end