boxed-code / laravel-schema-refresh
Refresh your DB schema (by re-running your migrations) without loosing data
Installs: 412
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/boxed-code/laravel-schema-refresh
Requires
- laravel/framework: ^5.6
This package is auto-updated.
Last update: 2021-03-06 13:50:53 UTC
README
Supports SQLite databases only for the moment
This package will allow you to re-run all of your migrations
without loosing all of your data.
The php artisan db:refresh
command will:
- backup the current database
- create a new database
- run all of the migrations
- copy the data from the old database to new
Caveats
If you make breaking changes to your schema, for instance add a new column to a table without a default value, the refresh will fail for the obvious reasons.
Installation
Install via composer:
composer require boxed-code/laravel-schema-refresh
Misc
Pull requests welcome 😀. License MIT.