Skip to content

Automatically transfer mySQL select queries with foreign key restraints

Notifications You must be signed in to change notification settings

MyGuyCai/dbCopy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dbCopy

Automatically transfer mySQL select queries with foreign key restraints

TODO: create the queries from the data

Installation

- `pip install -r requirements`

Use

- `python main.py`

testing

- Prerequisites:
    - install docker
    - installer liquibase

- Running:
    - `docker compose up -d`
    - `liquibase --defaults-file=./testing/liquibaseSource.properties update`
    - `liquibase --defaults-file=./testing/liquibaseDestination.properties update`
    - `python ./testing/dummyData.py`
    - `python dbCopy.py`
    - enter the credentials for source
        - host: localhost
        - port: 3306
        - user: user
        - pass: pass
        - db: db
    - connect to source
    - enter the credentials for destination
        - host: localhost
        - port: 3307
        - user: user
        - pass: pass
        - db: db
    - connect to destination
    - enter a valid query
        - `SELECT * FROM parent AS p
           LEFT JOIN child as c
               ON c.parent = p.id`

About

Automatically transfer mySQL select queries with foreign key restraints

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages