about summary refs log tree commit diff
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2020-03-01 23:15:37 -0600
committermultiple creatures <dev@multiple-creature.party>2020-03-01 23:15:37 -0600
commit416d51727ddb90c722df8587e5f2896722477fae (patch)
tree42858ae0569e9a02e4bfe31fc5ef28da1fd9bd6b
parentb74983adc5e81dde2ebd020412c334dfeb9c6496 (diff)
fix `index unique` for custom filters - should be on `[:account_id, :phrase]` instead of just `[:phrase]`
-rw-r--r--db/migrate/20200227214441_add_more_indexes.rb4
1 files changed, 2 insertions, 2 deletions
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