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.
Click to show internal directories.
Click to hide internal directories.