Convert MySQL database to PostgreSQL database.
- Ruby
>= 2.7(only maintained ruby versions are supported)
Add Gem to your Gemfile:
gem 'mysql2postgres'Configuration is written in YAML format and passed as the first argument on the command line.
Configuration file has be provided with config/database.yml, see config/default.database.yml for an example and for configuration information.
After providing settings, start migration with
# set destination to use MYSQL2POSTGRES_ENV=test # use can also use (MYSQL2POSTGRES_ENV is used, if both are defined) RAILS_ENV=test # with default configuration, which use config/database.yml bundle exec mysql2postgres # OR with specified configuration file bundle exec mysql2postgres /home/you/mysql2postgres.ymlrake testLicensed under the MIT license.