Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Mysqldump, writing in postgresql format
Ruby
branch: master

This branch is 1 commit ahead, 3 commits behind ajokela:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
bin
config
lib
test
.gitignore
Gemfile
MIT-LICENSE
README.md
Rakefile
mysqltopostgres.gemspec

README.md

mysql-to-postgres - MySQL to PostgreSQL Data Translation

MRI or jruby supported.

With a bit of a modified rails database.yml configuration, you can integrate mysql-to-postgres into a project.

Sample Configuration file:

default: &default
  adapter: jdbcpostgresql
  encoding: unicode
  pool: 4
  username: terrapotamus
  password: default
  host: 127.0.0.1

development: &development
  <<: *default
  database: default_development

test: &test
  <<: *default
  database: default_test

production: &production
  <<: *default
  database: default_production

mysql_data_source: &pii
  hostname: localhost
  port: 3306
  username: username
  password: default
  database: awesome_possum

mysql2psql:
  mysql:
    <<: *pii

  destination:
    production:
      <<: *production
    test: 
      <<: *test
    development:
      <<: *development

  tables:
  - countries
  - samples
  - universes
  - variable_groups
  - variables
  - sample_variables

  # if suppress_data is true, only the schema definition will be exported/migrated, and not the data
  suppress_data: false

  # if suppress_ddl is true, only the data will be exported/imported, and not the schema
  suppress_ddl: true

  # if force_truncate is true, forces a table truncate before table loading
  force_truncate: false

  preserve_order: true

  remove_dump_file: true

  report_status:  json    # false, json, xml
Something went wrong with that request. Please try again.