Help us shape the future of Go! Take the 2026 Go Developer Survey

coredb

package module
v0.0.0-...-13d600b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 5, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

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

func Reset(dbURL string) error

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.

func Status

func Status(dbURL string) error

Status prints the applied/pending state of every migration to stdout via goose's own logger.

func Up

func Up(dbURL string) error

Up runs every pending migration against dbURL.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL