Home

Awesome

MySQL Driver

Migrations SQL formatting

Each SQL statement MUST end with semicolon (;) FOLLOWED BY NEWLINE ! Whole migration will be executed inside transaction by default. Place SQL between "-- TXBEGIN" and "-- TXEND" comments for custom transaction:

Usage

migrate -url mysql://user@tcp(host:port)/database -path ./db/migrations create add_field_to_table
migrate -url mysql://user@tcp(host:port)/database -path ./db/migrations up
migrate help # for more info

See full DSN (Data Source Name) documentation.

SSL

The MySQL driver will set a TLS config if the following env variables are set:

TODO: deprecate - library code should not rely on environment variables

Authors