Documentation
¶
Overview ¶
Package store owns the Postgres schema. It embeds the SQL migrations and applies them on Open, so every binary converges the database to the current schema at startup.
Index ¶
Constants ¶
const SessionTombstoneInsertSQL = `` /* 184-byte string literal not displayed */
SessionTombstoneInsertSQL writes a session's deleted_sessions tombstone — id and environment kind, read while the sessions row can still be joined, so it must run before the DELETE in the same transaction. One definition on the schema's owner: the API's deleteSession executes it in production and the reaper's tests use it to stage deleted sessions, so the shape the reaper consumes cannot drift from the shape the API writes (the tombstone is the reaper's deleted-tier evidence — plan 24).
Variables ¶
This section is empty.
Functions ¶
func Migrate ¶
Migrate applies any migrations not yet recorded in schema_migrations, in filename order, all inside one transaction: either the database reaches the current schema or it is left untouched. (Consequence: a migration can never use statements Postgres forbids inside a transaction block, e.g. CREATE INDEX CONCURRENTLY — extend the migrator if that day comes.)
Types ¶
This section is empty.