tecdiary/laravel-sql-dump

Dump Laravel Migrations to SQL File

v1.0.0 2020-07-04 09:53 UTC

This package is auto-updated.

Last update: 2021-04-05 05:51:23 UTC


README

Latest Version on Packagist Total Downloads

This package reads your laravel migrations and dump them to the sql file.

Installation

You can install the package via composer:

composer require tecdiary/laravel-sql-dump

You can publish the config file with:

php artisan vendor:publish --provider="Tecdiary\LaravelSqlDump\LaravelSqlDumpServiceProvider" --tag="config"

This is the contents of the published config file:

return [
    /**
     * Directory path to save sql dump
     */
    'directory' => base_path('dump'),
];

Usage

php artisan migrate:dump      // On query per line - no formatting

php artisan migrate:dump --format   // -F|--format > Format queries before saving to file

php artisan migrate:dump --format --path=path/to/the/migrations/folder   // -P|--path => Set the migrations path if it's not default

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email saleem@tecdiary.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.