Documentation
¶
Overview ¶
Package coredb embeds the goose migrations that define firepit's PostgreSQL schema and exposes Up/Reset/Status so both api/cmd/firepit-api and coredb/cmd/migrate (backing `./tools.sh migrate`) can apply them programmatically against a DB URL.
See migrations/000001_baseline.sql (PLANDOC.md §4) for the schema itself.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Migrations embed.FS
Functions ¶
func Reset ¶
Reset rolls every applied migration back, leaving the database at version zero. This is what `./tools.sh migrate down` invokes: with a single baseline migration today, "down" and "down to zero" are the same operation, but Reset keeps that true as more migrations land.
Types ¶
This section is empty.
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
migrate
command
Command migrate is the CLI backing `./tools.sh migrate`: it runs goose up/down/status against a Postgres DB URL, embedding coredb's migrations.
|
Command migrate is the CLI backing `./tools.sh migrate`: it runs goose up/down/status against a Postgres DB URL, embedding coredb's migrations. |
Click to show internal directories.
Click to hide internal directories.