Hi,
we have a way to create FOREIGN KEY when add column.
But how to add this FOREIGN KEY/REFERENCES when
table and column already exists?
To drop and add FOREIGN KEY is util for import/export.
If no option here I can use direct DDL SQL
def up do
execute """
ALTER TABLE Orders ADD FOREIGN KEY (Persons_Id) REFERENCES Persons(Id)
"""
end
Thanks,
Petrica Clement Chiriac