From 416d51727ddb90c722df8587e5f2896722477fae Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Sun, 1 Mar 2020 23:15:37 -0600 Subject: fix `index unique` for custom filters - should be on `[:account_id, :phrase]` instead of just `[:phrase]` --- db/migrate/20200227214441_add_more_indexes.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'db/migrate') diff --git a/db/migrate/20200227214441_add_more_indexes.rb b/db/migrate/20200227214441_add_more_indexes.rb index d4ec2e19c..db4842640 100644 --- a/db/migrate/20200227214441_add_more_indexes.rb +++ b/db/migrate/20200227214441_add_more_indexes.rb @@ -1,8 +1,8 @@ class AddMoreIndexes < ActiveRecord::Migration[5.2] - def up + def change safety_assured do add_index :domain_blocks, :severity - add_index :custom_filters, :phrase, unique: true + add_index :custom_filters, [:account_id, :phrase], unique: true end end end -- cgit