Skip to main content
Back to packages
156 GitHub stars

TheDragonCode/migrate-db

View on GitHub

Description

Easy data transfer from one database to another

Create a new database and set up both connections in the connections section of the config/database.php file, then run the db:migrate console command passing two parameters:

php artisan db:migrate --schema-from=foo --schema-to=bar

For Certain Tables

php artisan db:migrate --schema-from=foo --schema-to=bar --tables=table1 --tables=table2

Exclude Certain Tables

php artisan db:migrate --schema-from=foo --schema-to=bar --exclude=table1 --exclude=table2

where:

Follow on screen instructions and then command will perform all migrations on the source and destination databases and transfer all records from the old to the new one.

Related Content on Laravel Daily

Video

We'd Love Your Feedback

Tell us what you like or what we can improve

Feel free to share anything you like or dislike about this page or the platform in general.