db

package
v0.0.79 Latest Latest
Warning

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

Go to latest
Published: May 3, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MigratePostgres

func MigratePostgres(pool *pgxpool.Pool) error

MigratePostgres creates the schema_version table if needed and applies any pending migrations in order, each wrapped in its own transaction.

Multi-version upgrades: the runner always iterates the full pgMigrations slice in order and applies every version not yet recorded in schema_version. This guarantees a database at any past version (e.g. v1) is safely and completely brought to the latest version (e.g. v5) without skipping steps or corrupting data. Each migration runs in its own transaction; if one fails the database is left at the last successfully applied version.

Types

This section is empty.

Jump to

Keyboard shortcuts

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