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
As it is now, if the difference between two databases is a renamed table, this library will delete the old and recreate the new one, losing all the data.
It would be great if tables could be renamed in migration scripts.
Auto-detecting this could be difficult, especially if some columns are changed at the same time, but maybe table renames could be passed in the CLI call?
e.g. $ php-mysql-diff --rename 'table_old:table_new,table2_old:table2_new' ...
I'm busy writing a script that automatically generates all migration scripts for a whole bunch of versions, so having something automated would be really great, instead of having to manually fix a couple of script every time.
Open to any other tips or suggestions on this, thanks!
The text was updated successfully, but these errors were encountered:
Hi @noplanman , as you've said, it would be very hard to detect tables that were renamed because there wouldn't be any link between them. Your idea of passing it as an argument at the command line might work. Would you be willing to write a PR for this?
As it is now, if the difference between two databases is a renamed table, this library will delete the old and recreate the new one, losing all the data.
It would be great if tables could be renamed in migration scripts.
Auto-detecting this could be difficult, especially if some columns are changed at the same time, but maybe table renames could be passed in the CLI call?
e.g.
$ php-mysql-diff --rename 'table_old:table_new,table2_old:table2_new' ...
I'm busy writing a script that automatically generates all migration scripts for a whole bunch of versions, so having something automated would be really great, instead of having to manually fix a couple of script every time.
Open to any other tips or suggestions on this, thanks!
The text was updated successfully, but these errors were encountered: