mirror of
https://github.com/hanzoai/migrate.git
synced 2026-09-30 22:55:10 +00:00
* used uber atomic bool instead standard in lock/unlock db * fixing local lock optimization implementation * fixing mysql local lock optimization implementation * fixing cockroachdb local lock optimization implementation * CAS wrapper to automatically restore * added test for cas with restore * added atomic lock to sqlite & mongo * added atomic lock to sqlite & mongo * fix/refactor test cas restore function * disable lock for mongo * mongo local lock before acquiring the db lock Co-authored-by: a.prinkov <[email protected]>
sqlite3
sqlite3://path/to/database?query
Unlike other migrate database drivers, the sqlite3 driver will automatically wrap each migration in an implicit transaction by default. Migrations must not contain explicit BEGIN or COMMIT statements. This behavior may change in a future major release. (See below for a workaround.)
Refer to upstream documentation for a complete list of query parameters supported by the sqlite3 database driver. The auxiliary query parameters listed below may be supplied to tailor migrate behavior. All auxiliary query parameters are optional.
| URL Query | WithInstance Config | Description |
|---|---|---|
x-migrations-table |
MigrationsTable |
Name of the migrations table. Defaults to schema_migrations. |
x-no-tx-wrap |
NoTxWrap |
Disable implicit transactions when true. Migrations may, and should, contain explicit BEGIN and COMMIT statements. |
Notes
- Uses the
github.com/mattn/go-sqlite3sqlite db driver (cgo)