migrate

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 21, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package migrate applies authz's embedded schema migrations.

It is deliberately a separate package: consumers that use only the role github.com/infodancer/authz.Store and Resolver get a pure-standard- library dependency, and only those that want authz to manage its own schema import this package and pull in goose. Hosts that run their own migration tooling can ignore it entirely and apply the SQL under migrations/ themselves.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Postgres

func Postgres(ctx context.Context, db *sql.DB) error

Postgres applies the embedded PostgreSQL migrations against db. Safe to call repeatedly; goose tracks applied versions in authz_goose_db_version. The caller owns db and its driver registration (typically the pgx stdlib driver).

func SQLite

func SQLite(ctx context.Context, db *sql.DB) error

SQLite applies the embedded SQLite migrations against db. Safe to call repeatedly. The caller owns db and its driver registration (typically modernc.org/sqlite).

Types

This section is empty.

Jump to

Keyboard shortcuts

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