db

package
v0.0.0-...-86cb503 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: Apache-2.0 Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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.

Jump to

Keyboard shortcuts

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