Package database — migration runner.
// Source: https://github.com/Paca-AI/paca | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works // Provided via justclaw.it.com; keep this notice with the code. // Package database — migration runner. package database import ( "context" "database/sql" "fmt" "io/fs" "os" "path/filepath" "sort" ) // migrationsAdvisoryLockKey is an arbitrary, fixed Postgres advisory-lock // key serializing concurrent migration runs — e.g. two app instances // booting at the same time during a rolling deploy. The value itself is // meaningless; what matters is that it never changes, since changing it // would let an old and a new binary version run migrations unserialized // against each other during a deploy that briefly overlaps both. const migrationsAdvisory ... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key