Mad migration
Project description
Database Migration Tool
UNDER DEVELOPMENT !!!!
🧐 About
The Database Migration Tool was designed for those looking to migrate their data from one database to another. Basically, the tool is focused on transferring data from different database structures. Currently, the MySQL, Mariadb and Postgres driver related tool allows us to add NoSQL to SQL databases and vice versa. Our main goal is to make data migration possible in all environments.
Documentation: Documentation
🏁 Getting Started
Installing
pip install madmigration
🎈 Usage
After installation you should define YAML file where configuration will be taken in order to apply data to target database. Yaml file with list and dictionaries may contain following structures:
Connection Config
- SourceConfig is intented to be data from source database
- DestinationConfig is intented to be transfered data to target database
version: 1.1
Configs:
- SourceConfig:
dbURI: "postgres://root:admin@127.0.0.1/oldDB"
- DestinationConfig:
dbURI: "mysql://root:admin@127.0.0.1/newDB"
migrationTables:
- migrationTable:
SourceTable:
name: users
DestinationTable:
name: persons
create: True
MigrationColumns:
- sourceColumn:
name: id
destinationColumn:
name: id
options:
type_cast: bigint
primary_key: true
autoincrement: true
- sourceColumn:
name: name
destinationColumn:
name: fname
options:
type_cast: varchar
length: 32
- sourceColumn:
name: surname
destinationColumn:
name: lname
options:
type_cast: varchar
length: 32
- sourceColumn:
name: age
destinationColumn:
name: age
options:
type_cast: int
- sourceColumn:
name: createdAT
destinationColumn:
name: created_at
options:
type_cast: datetime
- sourceColumn:
name: updatedAT
destinationColumn:
name: updated_at
options:
type_cast: datetime
- DestinationConfig - set the destination database, if the specified database does not exist we will create it.
- migrationTables - under this config, you will write the source of the table that you should migrate and the destination tables that will migrate the data.
- migrationTable - specify the source and destination table name
- MigrationColumns - specify source and destination column
- migrationTable - specify the source and destination table name
We will create all tables and database on the destination server if they do not exist
madmigrate -f migration_schema.yaml
✍️ Authors
See also the list of contributors who participated in this project.
Contributing
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for madmigration-0.1.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 498aaee56fa50c8c65cbd96eeae31b364661f1fe7f3e7299feb9e0f2b405bb29 |
|
MD5 | 5b56f894aa961bba7bc19b9df9308679 |
|
BLAKE2b-256 | ccd5774fe244141e516202266b0d4eb5def8feffcbc44e8be1e2960a4df08ba5 |