Hi,
I am aware that this issue has been mentioned before briefly but I was wondering if anybody could help me out. I am working on a Phalcon PHP project where we intend on using the migrations functionality to manage our schema changes (rightly so!).
However we are having a few issues surrounding our database constraints:
- If we build the initial schema via SQL import, upon running the migration we hit an SQL error because it attempts to add a constraint that already exists.
- If we then drop the schema and attempt to build it from scratch via the migration process, we hit an SQL error because it is attempting to add a foreign key constraint to a table that isn't yet created (classes are 'imported' in alphabetical order).
Is there anyway that we can ignore constraints for the duration of the migration and then re-apply them afterwards to avoid either of these issues? It would be really good if we could use the migrations tool as it is meant to be.
P.S. Phalcon is a great project and I am really enjoying integrating with it, so thanks for all the hard work and such good documentation so far!
Regards,
Adam.