permafrost-dev / laravel-dump-schema
Implementation of database schema dumping and loading to/from file, taken from Laravel v8 PR
Installs: 2 259
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 0
Open Issues: 0
Requires
- php: ^7.3
- illuminate/console: >=6.0 <8.0
- illuminate/support: >=6.0 <8.0
- symfony/process: >=4.0 <6.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.16
- phpunit/phpunit: ^9.0
README
laravel-dump-schema
This package Implements a set of db:schema
artisan commands, used to dump the database schema to or load it from an sql file.
The basis of this code is from Laravel 8.x Pull Request #32275, although currently only the MySQL portion has been implemented.
Note: this code is a work in progress and should not be used in production.
Installation
You can Install this package with composer:
composer require permafrost-dev/laravel-dump-schema
Usage
You can either dump or load the database schema, avoiding the need to re-run migrations if they haven't changed:
php artisan db:schema:dump
php artisan db:schema:load
By default, these commands will use the filename database/schema.sql
- it can be changed by specifying the --filename
flag:
--filename=foobar.sql
.