You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Realistically there needs to be a better naming structure here. Take Django migrations, for example, migrations are numbered in the order that they should be run. This way, you're able to provide idempotent migrations that run exactly as the developer intended them to be run. You don't get any issues with migrations written on the same day.
E.G
2020_04_27_AddTable.php and 2020_04_27_AddColumn.php were created on the same day. AddTable was created first, and AddColumn afterwards. You could argue that they should be combined, but they may not have been created at the same time.
In a filesystem, 2020_04_27_AddColumn would be listed first and likely be run first, causing an error because the table wasn't created.
By this effect, you could enhance the whole migration structure by mapping dependencies for each migration to ensure that the migrations that the current migration being run are dependent on are always run first.
This will allow developers to structure their migrations into directories that are less ambiguous about what sections they relate to.
Related to #4 (comment)
The text was updated successfully, but these errors were encountered: