csfpgconsumer

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package csfpgconsumer is a copyable example of an application's own migrations stacked on CSF's schema in one PostgreSQL database. The binary applies CSF's schema first, under csf_schema_version, then its own, under its own version table:

handle := pool.OpenSQL()
defer handle.Close()
if err := csfpg.ApplySchema(ctx, handle); err != nil { ... }
if err := sqlmigrate.ApplyVersioned(ctx, handle, csfpgconsumer.Migrations,
	csfpgconsumer.MigrationDirectory, csfpgconsumer.VersionTable); err != nil { ... }

Any migration tool works for the second call, provided it keeps its own version table. csfpg's specs load this exact directory, so the example stays runnable.

Index

Constants

View Source
const MigrationDirectory = "migrations"

MigrationDirectory is the directory of Migrations holding the files.

View Source
const VersionTable = "csfpg_consumer_schema_version"

VersionTable is the example consumer's own version table.

Variables

View Source
var Migrations embed.FS

Migrations holds the example consumer's migrations.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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