erlang_migrate_sqlite (erlang_migrate v0.2.1)

View Source

SQLite 3+ driver for erlang_migrate. Uses esqlite (https://github.com/mmzeeman/esqlite).

Locking: SQLite has no advisory locks. We use OTP global:set_lock/3 to serialize migrations across processes on the same node.

Summary

Functions

current_version(Conn, Table)

drop_table(Conn, Table)

ensure_table(Conn, Table)

exec_sql(Conn, SQL)

is_dirty(Conn, Table)

lock(Conn, LockId)

lock(Conn, LockId, Timeout)

set_version(Conn, Table, Version, Dirty)

unlock(Conn, LockId)