pangolinkeys / backup-migrations
A package that takes a backup of the database before running a migration
v0.0.8
2018-06-13 15:19 UTC
Requires
- laravel/framework: ~5.4
- midnite81/laravel-base: ^2.3
Requires (Dev)
- phpunit/phpunit: ^7.2
README
Repository to perform a database backup before migrations and seeds are run.
Require this package using
composer require pangolinkeys/backup-migrations
Register the
BackupMigrationsServiceProvider:class
service provider in the applications providers array.
Run
php artisan vendor:publish
to publish the config file.
Run the commands
php artisan migrate
php artisan db:seed
as usual. In the background a backup dump of the database will be taken.
To restore the most recent backup run
php artisan migrate:restore
To specify a backup use the
--file=
option.