Change Laravel migration order

Is there a way to change the transfer order without redoing them all? Because now I have a problem with my foreign keys -_- (working with laravel)

+4
source share
1 answer
  • Refuse all migrations (or start with a new database)

  • Change the dates that form the first part of the migration file names so that they are in the order you want (for example, for 2014_06_24_134109_update_database.php, date and time - 2014-06-24, 13:41: 90).

  • Start the migration again.

... , Laravel. , MySQL. , , , , , - , , ( ).

+17

Source: https://habr.com/ru/post/1606955/


All Articles