db

package module
v0.0.0-...-cf536c2 Latest Latest
Warning

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

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

Documentation

Overview

Package db carries the schema migrations of the shared PostgreSQL database in the binary, so tests and tools apply the same files the migrator applies without reading them from a checkout.

Index

Constants

View Source
const RiverSchema = "river"

RiverSchema keeps River's job tables out of public. A goose migration creates it; River's migrator fills it.

View Source
const TrackingTable = "_migrations"

TrackingTable is goose's bookkeeping table for Migrations.

Variables

This section is empty.

Functions

func Migrate

func Migrate(ctx context.Context, database *sql.DB) error

Migrate applies the goose and River migration streams under one lock: River does not share goose's.

func Migrations

func Migrations() fs.FS

Migrations returns the goose migration files rooted like the directory the migrator reads, so a provider over either sees the same set.

func RiverMigrator

func RiverMigrator[TTx any](driver riverdriver.Driver[TTx]) (*rivermigrate.Migrator[TTx], error)

RiverMigrator targets RiverSchema; the default resolves against search_path and silently lands in public. Use it for every migrate and validate call.

Types

This section is empty.

Directories

Path Synopsis
pkg
outbox
Package outbox holds the River job arguments shared by the service that enqueues a job and the API, which works it, through the shared database.
Package outbox holds the River job arguments shared by the service that enqueues a job and the API, which works it, through the shared database.
seed/postgres command

Jump to

Keyboard shortcuts

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