schema

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package schema applies a system's embedded SQL migrations. Each system owns its migrations and records them in its own <system>_migrations table.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Migrate

func Migrate(ctx context.Context, database *sql.DB, system string, files fs.FS) error

Migrate applies the files in files named migrations/NNN_description.sql that are newer than the version recorded for system, in order, each in its own transaction. It refuses a database migrated by a newer binary.

func Open

func Open(ctx context.Context, path string) (*sql.DB, error)

Open opens the application database at path with the settings every AppKit application uses: foreign keys, a five-second busy timeout, WAL, and one connection.

Types

This section is empty.

Jump to

Keyboard shortcuts

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