Skip to main content

internal/migrate

github.com/ensera-ai/taisce/internal/migrate · 6 files · 929 lines · 64 tests · source

Package migrate applies the schema and provisions a project's storage.

The SQL lives beside the code because go:embed cannot reach outside its package directory, and one embedded copy is what makes the binary self-contained: a deployment ships a schema rather than depending on a file being present next to it.

Where it sits

Imports: internal/infra/pg

Imported by: cmd/taisce, internal/docsite

Files

FileLinesDeclarationsWhat it is for
connectionbound.go955ErrConnectionBudget is a deployment that asked for more than the substrate has.
memorywrites.go1097memoryWrites is every memory-namespace table the memory role may change, and how.
migrate.go21814Carries the package documentation.
planes.go2225One instance has separate control and memory database identities.
privileges.go1689ValidateRolePrivileges inspects effective privileges, including roles whose privileges are immediately inherited or reachable with SET ROLE.
provision.go1176scopePattern is what a project identifier may contain.

64 tests hold this package's behaviour; the list is named for what each one proves.

Files it carries

Not Go, and part of what the package is: embedded, rendered or read at build time.