{"repo":"TheDragonCode/laravel-data-dumper","free":true,"listed":false,"github":"https://github.com/TheDragonCode/laravel-data-dumper","clone":"git clone https://github.com/TheDragonCode/laravel-data-dumper.git","description":"Adding data from certain tables when executing the `php artisan schema:dump` console command","language":"PHP","stars":35,"topics":["database","database-schema","dump","dumper","laravel","laravel-framework","laravel-package","schema"],"license":"MIT","category":"databases-storage","readme_excerpt":"Database Data Dumper for Laravel [![Stable Version][badge stable]][link packagist] [![Total Downloads][badge downloads]][link packagist] [![Github Workflow Status][badge build]][link build] [![License][badge license]][link license] Introduction The squashing migrations in Laravel does not export data from tables? There is a solution! How it works? After installing and configuring the package, you simply run the console command php artisan schema:dump (with or without flags - it's up to you), and the final SQL dump file will contain the data structure including the contents of the tables you specified at the configuration stage. This will allow you to painlessly execute the php artisan schema:dump --prune command, which will remove unnecessary migration files. Requirements - Laravel 10, 11, 12, 13 - PHP 8.2 or higher - Databases: - Sqlite 3 - MySQL 5.7, 8, 9 - PostgreSQL 12, 13, 14, 15, 16, 17, 18 Installation To get the latest version of Database Data Dumper , simply require the project using Composer: Or manually update require block of composer.json and run composer update . Configuration Since Laravel mechanism for publishing configuration files does not allow them to be merged on the fly, a new array element must be added to the config/database.php file: After that, add to the array the names of the tables for which you want to export data. That's it. Now you can run the php artisan schema:dump console command and enjoy the result. [!NOTE] If you need to delete files from","default_branch":null,"files":null,"tree":[],"storefront":"/r/TheDragonCode","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/TheDragonCode/laravel-data-dumper/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}