GithubHelp home page GithubHelp logo

thedragoncode / migrate-db Goto Github PK

View Code? Open in Web Editor NEW
143.0 7.0 3.0 275 KB

Easy data transfer from one database to another

License: MIT License

PHP 100.00%
database migration migrations migration-tool mysql pgsql mssql

migrate-db's Introduction

Migrate DB for Laravel

Migrate DB

Stable Version Unstable Version Total Downloads Github Workflow Status 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
Databases MySQL 5.7+, PostgreSQL 9.5+, MSSQL
Laravel \ PostgreSQL 9 10 11 12 13 14 15
8
9
10
11 ✖️ ✖️ ✖️

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

Only Specific Tables

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

Exclude Specific Tables

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

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.