Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save baptistedonaux/0c1ce0cf6c171fa24980 to your computer and use it in GitHub Desktop.
Save baptistedonaux/0c1ce0cf6c171fa24980 to your computer and use it in GitHub Desktop.

I have two databases (MariaDB 10.0.23 and PostgreSQL 9.1)

$ cat /tmp/mysql2pgsql.yml

# if a socket is specified we will use that
# if tcp is chosen you can use compression
mysql:
 hostname: localhost
 port: 3306
 username: sentry
 password: 'password'
 database: sentry
 compress: false
destination:
 # if file is given, output goes to file, else postgres
 file:
 postgres:
  hostname: localhost
  port: 5432
  username: sentry
  password: 'password'
  database: sentry

# if only_tables is given, only the listed tables will be converted.  leave empty to convert all tables.
#only_tables:
#- table1
#- table2
# if exclude_tables is given, exclude the listed tables from the conversion.
#exclude_tables:
#- table3
#- table4

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

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

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

$ cd /tmp $ py-mysql2pgsql

I change the sentry configuration (database) and I restart supervisor

$ sentry upgrade

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment