diff options
Diffstat (limited to 'db/migrate')
-rw-r--r-- | db/migrate/20230404004859_add_index_spanning_users_and_reviews.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/db/migrate/20230404004859_add_index_spanning_users_and_reviews.rb b/db/migrate/20230404004859_add_index_spanning_users_and_reviews.rb new file mode 100644 index 0000000..3ca6728 --- /dev/null +++ b/db/migrate/20230404004859_add_index_spanning_users_and_reviews.rb @@ -0,0 +1,5 @@ +class AddIndexSpanningUsersAndReviews < ActiveRecord::Migration[7.0] + def change + add_index(:product_reviews, [:product_id, :user_account_id], unique: true) + end +end |