Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Migrate ¶
Migrate runs the migrations recording them in the `migrations` table.
For more details on how the migrations are run see `MigrateWithTable`.
func MigrateWithTable ¶ added in v1.1.0
Migrate runs the migrations in the directory on the given filesystem against the provided database.
Record of the migrations running will be stored in the specified table which is created if necessary. Note tha there is no escaping done on the table name so if it comes from untrusted input you need to escape it yourself using the database driver specific methods.
Each migration is transactional but running all the migrations is not. If the migrations fail part way through the ones that have already successfully run won't be rolled back. Their record of running will have been stored though so the migration won't be re-run on retry.
Types ¶
This section is empty.