Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork4
Easy data transfer from one database to another
License
TheDragonCode/migrate-db
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Easy data transfer from one database to another
To get the latest version ofMigrate DB, simply require the project usingComposer:
composer require dragon-code/migrate-db --dev
Or manually updaterequire-dev block ofcomposer.json and runcomposer update.
{"require-dev": {"dragon-code/migrate-db":"^3.0" }}| 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 | ✖️ | ✖️ | ✖️ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
Create a new database and set up both connections in theconnections section oftheconfig/database.php file, then run thedb:migrate console command passing twoparameters:
php artisan db:migrate --schema-from=foo --schema-to=bar
php artisan db:migrate --schema-from=foo --schema-to=bar --tables=table1 --tables=table2
php artisan db:migrate --schema-from=foo --schema-to=bar --exclude=table1 --exclude=table2
where:
foo- Sourceconnection namebar- Targetconnection name
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 😊
This package is licensed under theMIT License.
About
Easy data transfer from one database to another
Topics
Resources
License
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Contributors6
Uh oh!
There was an error while loading.Please reload this page.