https://github.com/permafrost-dev/laravel-dump-schema
Implementation of a Laravel 8 PR that allows dumping and loading mysql database schemas to avoid re-running unchanged migrations.
https://github.com/permafrost-dev/laravel-dump-schema
laravel laravel-migrations laravel-package
Last synced: about 1 month ago
JSON representation
Implementation of a Laravel 8 PR that allows dumping and loading mysql database schemas to avoid re-running unchanged migrations.
- Host: GitHub
- URL: https://github.com/permafrost-dev/laravel-dump-schema
- Owner: permafrost-dev
- License: mit
- Created: 2020-06-01T22:26:48.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-07-21T08:11:02.000Z (almost 6 years ago)
- Last Synced: 2024-05-01T11:30:37.505Z (about 2 years ago)
- Topics: laravel, laravel-migrations, laravel-package
- Language: PHP
- Homepage:
- Size: 15.6 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
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](https://github.com/laravel/framework/pull/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`.