Skip to content

TheDragonCode/migrate-db

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Migrate DB for Laravel

Migrate DB

Stable Version Total Downloads License

Easy data transfer from one database to another

Installation

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

composer require dragon-code/migrate-db --dev

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

{
    "require-dev": {
        "dragon-code/migrate-db": "^3.0"
    }
}

Compatibility

Service Versions
PHP ^8.0
Laravel ^8.0, ^9.0, ^10.0, ^11.0, ^12.0
Databases MySQL 5.7+, PostgreSQL 9.5+, MSSQL
Laravel \ PostgreSQL 9 10 11 12 13 14 15 16 17
8
9
10
11 ✖️ ✖️ ✖️
12 ✖️ ✖️ ✖️

Usage

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.

Enjoy 😊

License

This package is licensed under the MIT License.

About

Easy data transfer from one database to another

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

Contributors 6

Languages

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy