migrations-generator icon indicating copy to clipboard operation
migrations-generator copied to clipboard

Add more flexibility with the package

Open rjacobsen2012 opened this issue 6 years ago • 5 comments

I have added the following features to your package, and do hope you approve.

  1. Make the date used for the migrations to always be sequential so the migrations are done in order
  2. Added the ability to dynamically check for table dependencies via the foreign keys, and ask the user if they want to use that feature a. This allows the tables needed by other tables to be loaded first so the foreign keys do not cause issues on up/down
  3. Added the ability to combine the foreign keys creation into the create migrations, and ask the user if they want to use that feature
  4. Added the ability to clear all existing migrations, and ask the user if they want all the existing migrations cleared

rjacobsen2012 avatar Oct 06 '17 16:10 rjacobsen2012

[ErrorException]                         
Invalid argument supplied for foreach()  
                                           
Exception trace:
 () at <redacted>/migrations-generator/src/Xethron/MigrationsGenerator/MigrateGenerateCommand.php:343

arall avatar Nov 15 '17 12:11 arall

@arall I just pushed a fix for the error. Should be working fine now.

rjacobsen2012 avatar Nov 15 '17 13:11 rjacobsen2012

Thanks @rjacobsen2012 , issue fixed. However, I can see some foreign relations of tables that doesn't exist yet.

arall avatar Nov 15 '17 14:11 arall

@arall What foreign relations? Please provide some detail.

rjacobsen2012 avatar Nov 15 '17 15:11 rjacobsen2012

@rjacobsen2012 If you create the table and the foreign keys at the same time, you will have some issues where the tables your foreign keys refer to do not exist yet. That is currently why the foreign keys are created as a second step.

tomzx avatar Apr 21 '18 22:04 tomzx