migrations

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package migrations embeds the wowapi kernel SQL migrations and exposes them as an fs.FS for the migration runner (kernel/database.Migrate) and the wowapi CLI.

Kernel migrations always run before product-module migrations. Each source (the kernel, then each module) is applied with its OWN goose history table keyed by a source name — database.Migrate(ctx, pool, src, source). This is what lets independently-numbered sources coexist: a module numbering its files 0001.. does not collide with the kernel's 00001.. because their version histories are separate tables (see docs/blueprint/03 §5 and docs/blueprint/11 §4). The ordering contract is: apply the "wowapi" source first, then each module's source in dependency-graph order.

File naming

goose requires numeric-ascending file names. The blueprint's "000/001" logical names map to on-disk "00001/00002":

Blueprint 000 → 00001_bootstrap.sql    (extensions, roles, app_tenant_id)
Blueprint 001 → 00002_core_identity.sql (tenants, users, user_tenant_access)

Phase 2 ships only these two migrations (see decision D-0025).

Index

Constants

View Source
const SourceName = "wowapi"

SourceName is the kernel's migration source identifier — the history-table key passed to database.Migrate for the framework's own migrations.

Variables

This section is empty.

Functions

func Kernel

func Kernel() fs.FS

Kernel returns the framework's migrations as an fs.FS for the migration runner (database.Migrate) and the wowapi CLI.

Types

This section is empty.

Jump to

Keyboard shortcuts

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