add index for other direction of relations

pull/10349/head
ulferts 2 years ago
parent 1f7f2eb761
commit b02e738bb9
No known key found for this signature in database
GPG Key ID: A205708DE1284017
  1. 2
      db/migrate/20220319211253_add_parent_id_to_wp.rb

@ -166,6 +166,8 @@ class AddParentIdToWp < ActiveRecord::Migration[6.1]
def add_relation_index
add_index :relations, %i[from_id to_id relation_type],
unique: true
add_index :relations, %i[to_id from_id relation_type],
unique: true
end
def add_parent_index

Loading…
Cancel
Save