Skip to content
This repository has been archived by the owner on Apr 21, 2021. It is now read-only.

Tecdiary/laravel-sql-dump

Repository files navigation

Dump Laravel Migrations to SQL File

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.