Download the PHP package maketok/datamigration without Composer
On this page you can find all versions of the php package maketok/datamigration. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download maketok/datamigration
More information about maketok/datamigration
Files in maketok/datamigration
Package datamigration
Short Description Maketok Data-Migration engine
License MIT
Homepage https://github.com/SlayerBirden/datamigration
Informations about the package datamigration
Data-Migration
This package is aimed at migrating large chunks of data across different resources.
Some of the influences:
It's perfect to plan and execute a complex import or export. It also can be used as a transport tool to migrate your data from one structure to another. The unit (workers) structure allows it to parse a complex import file and extract a multi-level data structure from it.
The same's true for reverse process as well: the multi-level data structure can be inserted into a single file.
Installation
Use composer to include it in your project:
Examples
There are few examples in tests/integration/QueueWorkflowTest
integration test.
Here's the typical uses.
Import
Import customers and addresses from flat CSV file.
name | age | street | city | zip | |
---|---|---|---|---|---|
[email protected] | Bart Robbinson | 32 | 20 Chestnut Terrace | New York | 07003 |
[email protected] | Kale D | 15 | 123 Manson | LA | 90023 |
111 Dale str. | Chicago | 60333 |
Export
We have 3 DB tables for customers and their addresses.
customer
id | age | |
---|---|---|
1 | [email protected] | 32 |
2 | [email protected] | 15 |
customer_data
id | parent_id | firstname | lastname |
---|---|---|---|
1 | 1 | Bart | Robinson |
2 | 2 | Kale | Dager |
address
id | customer_id | street | city | zip |
---|---|---|---|---|
1 | 1 | 20 Chestnut Terrace | New York | 07003 |
2 | 1 | 123 Manson | LA | 90023 |
3 | 2 | 111 Dale str. | Chicago | 60333 |
We want to get next output:
customers.csv
name | age | street | city | zip | |
---|---|---|---|---|---|
[email protected] | Bart Robbinson | 32 | 20 Chestnut Terrace | New York | 07003 |
[email protected] | Kale D | 15 | 123 Manson | LA | 90023 |
111 Dale str. | Chicago | 60333 |
FAQ
All versions of datamigration with dependencies
symfony/expression-language Version 2.*
fzaninotto/faker Version ~1
doctrine/dbal Version 2.*