db

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package db carries the migrations into the binary.

The alternative would be to ship the .sql files beside the image and hope the two versions match. They would not: a pod running one release with the migrations of another is exactly the schema drift that /readyz is supposed to catch, and it is cheaper to make it impossible than to detect it (ADR-0003, deployment.md §5).

Only the migrations are embedded. db/queries is sqlc's input and exists at build time, not at run time, and db/schema.sql is a reference for readers.

Index

Constants

This section is empty.

Variables

View Source
var Migrations embed.FS

Migrations is db/migrations, in the order goose applies them.

Functions

func Versions

func Versions() []int64

Versions answers the version of every embedded migration, ascending - the set a database must hold all of before this binary may serve against it (deployment.md §5). The set rather than the highest, because migrations are applied out of order.

Types

This section is empty.

Jump to

Keyboard shortcuts

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