Closed ironmike-au closed 4 years ago
Would it not be preferable, instead, to have Tokaido automatically drop all the existing tables when restoring from a snapshot without putting that command in the exported SQL?
Hi Garrett!
tok snapshot restore
lets users import databases from external sources. It's possible the user might want to not DROP DATABASE during a restore from an external source, so I think forcing this behaviour via Tokaido might cause issues for those use cases (rare as they may be).
By letting the user's .sql file specify the DROP DATABASE command, we're giving them more control over what happens during their import.
I think making Tokaido default to including DROP DATABASE in any dumps made with Tokaido will bring it's behaviour more in line with the standard expectation of other tools, like drush.
this is fixed now and will be included in the upcoming 1.12 release
tok snapshot
currently takes a copy of the database without theDROP DATABASE
command included. this causes the restored database to be overlayed on top of the existing database.The logic for this needs to be updated to use at least the
--opt
parameter for mysqldump. This should be the default, so it would be good to work out why that's not taking place.