summaryrefslogtreecommitdiff
path: root/db/migrate
diff options
context:
space:
mode:
authorHombreLaser <sebastian-440@live.com>2023-03-24 20:35:48 -0600
committerHombreLaser <sebastian-440@live.com>2023-03-24 20:35:48 -0600
commitf5f27394fd4c68995949f43edca41d30d30a45aa (patch)
treed8550202b22182c87387a80c9660044d50a1e63c /db/migrate
parenta4e461bccee482c40e69be9310ba12de5d7da59b (diff)
Añade constraint unique a los Indexes de UserAccountAddresses
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