Open Jurigag opened 8 years ago
@Jurigag I'm not sure that deleting is good way. FK is may cause problems when during on generating or running migration. But we can implement workflow with FK to store keys in the file. For example: user runs command generate --FK
and DevTools will create file called foreignKeys.sql
with real SQL. After that we can delete it from DB. I guess this way is better. How do you think about this?
Let's assume that we have in current database some foreign key on
location.instrument_id
. Lets assume that we are deleting this column. This won't work because there is existing foriegn key.Phalcon migration should check if there is any foreign key like:
Then on result from it it should delete all constraint with CONSTRAINT_NAME.