Skip to content

Easy data transfer from one database to another

License

Notifications You must be signed in to change notification settings

TheDragonCode/migrate-db

Repository files navigation

Migrate DB

Easy data transfer from one database to another

Migrate DB

StyleCI Status Github Workflow Status Coverage Status Scrutinizer Code Quality

Stable Version Unstable Version Total Downloads License

Installation

To get the latest version of Migrate DB, simply require the project using Composer:

$ composer require andrey-helldar/migrate-db --dev

Or manually update require-dev block of composer.json and run composer update.

{
    "require-dev": {
        "andrey-helldar/migrate-db": "^1.1"
    }
}

Compatibility

Service Versions
PHP ^7.3, ^8.0
Laravel ^8.0
Databases MySQL, PostgreSQL, MSSQL

Using

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

where:

The command will perform all migrations on the source and destination databases and transfer all records from the old to the new one.

Enjoy 😊

License

This package is licensed under the MIT License.

For Enterprise

Available as part of the Tidelift Subscription.

The maintainers of andrey-helldar/migrate-db and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source packages you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact packages you use. Learn more.