Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to purge database before restoring #7

Open
rulatir opened this issue Jun 17, 2016 · 0 comments
Open

Add option to purge database before restoring #7

rulatir opened this issue Jun 17, 2016 · 0 comments

Comments

@rulatir
Copy link

rulatir commented Jun 17, 2016

Please add an option to purge the database before restoring a backup: drop all tables, views, stored procedures etc. but NOT user permissions for the database (i.e. NOT drop database and recreate!).

Rationale: the "backup, migration FAIL, restore" work cycle. Laravel migrations, with their DREADED AND CURSED inability to recover from failures properly, eventually force every laravel programmer to employ some kind of database backup/restore solution so that the database can be backed up before every attempt at artisan migrate and restored when the migration fails due to a stupid coding mistake in the newest migration file. The whole point is to be able to restore the database to the EXACT same state as before the attempted migration. Currently if the migration creates some tables then these tables will still be there after restoring the backup, and a subsequent attempt at migration will fail because those tables already exist. The whole point is to avoid this DREADED AND CURSED scenario.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant