Module notifier_migrate

Versioned SQL migrations.

Description

Versioned SQL migrations.

Applies every priv/migrations/NNN_name.sql not yet recorded in the schema_migrations table, in lexicographic order, all inside one transaction guarded by a transaction-scoped advisory lock — so several replicas booting at once never apply a migration twice, and a failing migration leaves the schema untouched.

Crashes the boot on failure: starting on a half-migrated schema is worse than not starting.

Function Index

run/0

Function Details

run/0

run() -> ok


Generated by EDoc