migrate/database/mysql
Julius Kriukas 14f784961f Fix appending multiStatements=true parameter for mysql driver 2017-04-25 22:54:16 +03:00
..
README.md Update README.md 2017-04-25 11:13:59 -07:00
mysql.go Fix appending multiStatements=true parameter for mysql driver 2017-04-25 22:54:16 +03:00
mysql_test.go remove cleanpath, fix mysql ensureVersionTable 2017-03-01 11:48:38 -08:00

README.md

mysql

mysql://user:password@tcp(host:port)/dbname?query

URL Query WithInstance Config Description
x-migrations-table MigrationsTable Name of the migrations table
dbname DatabaseName The name of the database to connect to
user The user to sign in as
password The user's password
host The host to connect to.
port The port to bind to.
x-tls-ca The location of the root certificate file.
x-tls-cert Cert file location.
x-tls-key Key file location.
x-tls-insecure-skip-verify Whether or not to use SSL (true|false)

Upgrading from v1

  1. Write down the current migration version from schema_migrations
  2. DROP TABLE schema_migrations
  3. Wrap your existing migrations in transactions (BEGIN/COMMIT) if you use multiple statements within one migration.
  4. Download and install the latest migrate version.
  5. Force the current migration version with migrate force <current_version>.