How do I reversibly remove_foreign_key on a table when the column doesn't match the table?
Use revert
:
def change
revert do
add_reference :users, :seek_asset_type, foreign_key: { to_table: :asset_types }
end
end
Another way is to revert a migration by its name:
def change
revert AddAssetTypeReferenceToUsers
# I made up this migration name,
# so please fill in the appropriate name
end