mirror of
https://github.com/Retrospring/retrospring.git
synced 2025-01-31 10:19:07 +01:00
Remove relationships where source == target prior to adding relationship type
This commit is contained in:
parent
5c9659ccf5
commit
4a1ed5394a
1 changed files with 2 additions and 0 deletions
|
@ -2,6 +2,8 @@ class AddTypeToRelationships < ActiveRecord::Migration[5.2]
|
|||
def up
|
||||
add_column :relationships, :type, :string
|
||||
|
||||
execute %(delete from relationships where source_id = target_id)
|
||||
|
||||
execute %(update relationships set type = 'Relationships::Follow')
|
||||
|
||||
change_column_null :relationships, :type, false
|
||||
|
|
Loading…
Reference in a new issue