Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/orisintel/laravel-migration-snapshot
Simplify and accelerate applying many migrations at once using a flattened dump of the database schema and migrations
https://github.com/orisintel/laravel-migration-snapshot
laravel schema-migrations
Last synced: 3 months ago
JSON representation
Simplify and accelerate applying many migrations at once using a flattened dump of the database schema and migrations
- Host: GitHub
- URL: https://github.com/orisintel/laravel-migration-snapshot
- Owner: orisintel
- License: mit
- Created: 2019-04-02T14:46:51.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-06-08T01:41:07.000Z (over 1 year ago)
- Last Synced: 2024-07-19T01:06:58.092Z (4 months ago)
- Topics: laravel, schema-migrations
- Language: PHP
- Homepage:
- Size: 103 KB
- Stars: 177
- Watchers: 6
- Forks: 11
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Laravel Migration Snapshot
[![Latest Version on Packagist](https://img.shields.io/packagist/v/orisintel/laravel-migration-snapshot.svg?style=flat-square)](https://packagist.org/packages/orisintel/laravel-migration-snapshot)
[![Build Status](https://img.shields.io/travis/orisintel/laravel-migration-snapshot/master.svg?style=flat-square)](https://travis-ci.org/orisintel/laravel-migration-snapshot)
[![Total Downloads](https://img.shields.io/packagist/dt/orisintel/laravel-migration-snapshot.svg?style=flat-square)](https://packagist.org/packages/orisintel/laravel-migration-snapshot)Simplify and accelerate applying many migrations at once using a flattened dump
of the database schema and migrations, similar in spirit to Rails' `schema.rb`.Works with the `mysql`, `pgsql`, and `sqlite` database drivers.
## Installation
You can install the package via composer:
``` bash
composer require --dev orisintel/laravel-migration-snapshot
```Database command-line utilities (such as `mysqldump` and `mysql`) must be in the
path where Artisan will be run.## Configuration
Put `migration-snapshot.php` into `config` with:
``` bash
php artisan vendor:publish --provider="\OrisIntel\MigrationSnapshot\ServiceProvider"
```## Usage
Implicitly migrate as load from an earlier, flattened copy:
``` bash
php artisan migrate
```
(When `migrations` table is empty and migrating a configured environment;
defaults to 'development', 'local', and 'testing'.)Migrate without loading from, or dumping to, flattened copy:
``` bash
MIGRATION_SNAPSHOT=0 php artisan migrate
```Update the flattened SQL file:
``` bash
php artisan migrate:dump
```Load from the flattened SQL file, **dropping** any existing tables and views:
``` bash
php artisan migrate:load
```### Testing
``` bash
composer test
```## Contributing
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
## Security
If you discover any security related issues, please email
[email protected] instead of using the issue tracker.## Credits
- [Paul R. Rogers](https://github.com/paulrrogers)
- [All Contributors](../../contributors)## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.