A Rust project to migrate MSSQL databases to MySQL, including table structures, column data types, and table data rows.
- Connects to MSSQL and MySQL databases to perform the migration.
- Converts MSSQL table structures and column data types to their corresponding MySQL equivalents.
- Transfers table data rows from MSSQL to MySQL.
- Provides flexibility in configuring connection details, table mappings, and migration options.
- Handles differences in data types, constraints, and other database-specific details during the migration process.
- tokio - Asynchronous runtime for Rust.
- tokio-util - Utilities for working with Tokio.
- anyhow - Rust error handling library.
- log - Logging facade for Rust.
- env_logger - Environment logger for Rust.
- structopt - Parse command line arguments in Rust.
- chrono - Date and time library for Rust.
- toml - TOML parsing and serialization library for Rust.
- async-trait - Async versions of Rust's trait objects.
- hex - Hexadecimal encoding and decoding for Rust.
- futures - Asynchronous programming using Rust's futures.
- tiberius - MSSQL database driver for Rust.
- bb8 - Connection pool for Rust.
- bb8-tiberius - BB8 support for Tiberius.
- sqlx - Database toolkit for Rust, including support for MySQL.
- Copy the
config.example.tomlfile toconfig.toml. - Configure the connection details and whitelisted tables for the MSSQL and MySQL databases in the
config.tomlfile. - Customize the table mappings and migration options in the
mappings.tomlfile. - Build and run the migration tool using Cargo:
cargo run --release- Go to the GitHub Releases page of this repository.
- Download the appropriate pre-compiled binary for your operating system and architecture.
- Copy the
config.example.tomlfile toconfig.toml. - Configure the connection details and whitelisted tables for the MSSQL and MySQL databases in the
config.tomlfile.
USAGE:
db-migrator.exe [FLAGS] [OPTIONS]
FLAGS:
-c, --constraints Create constraints
-d, --drop Drop tables before migration
-f, --format Format snake case table and column names
-h, --help Prints help information
-q, --quiet Activate quiet mode
-V, --version Prints version information
-v, --verbose Activate verbose mode
OPTIONS:
-p, --parallelism <parallelism> Set parallelism [default: LOGICAL_CORES]
Make sure you have Rust installed. You can install Rust from the official website: https://www.rust-lang.org/tools/install
Clone the repository:
git clone https://github.com/bitalizer/db-migrator.git