summaryrefslogtreecommitdiff
path: root/db/migrate
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20230325021349_add_unique_indexes_to_user_account_addresses.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/db/migrate/20230325021349_add_unique_indexes_to_user_account_addresses.rb b/db/migrate/20230325021349_add_unique_indexes_to_user_account_addresses.rb
new file mode 100644
index 0000000..d8f4d26
--- /dev/null
+++ b/db/migrate/20230325021349_add_unique_indexes_to_user_account_addresses.rb
@@ -0,0 +1,8 @@
+class AddUniqueIndexesToUserAccountAddresses < ActiveRecord::Migration[7.0]
+ def change
+ remove_index(:user_account_addresses, :user_account_id)
+ remove_index(:user_account_addresses, :address_id)
+ add_index(:user_account_addresses, :user_account_id, unique: true)
+ add_index(:user_account_addresses, :address_id, unique: true)
+ end
+end