Documentation
¶
Overview ¶
Package migrations provides SQL migration generation.
To generate migrations, use the migrate-gen command:
go run github.com/getpup/pupsourcing/cmd/migrate-gen -output migrations
Or add a go generate directive to your code:
//go:generate go run github.com/getpup/pupsourcing/cmd/migrate-gen -output ../../migrations
Then run:
go generate ./...
Package migrations provides SQL migration generation for event sourcing infrastructure.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateMySQL ¶
GenerateMySQL generates a MySQL/MariaDB migration file.
func GeneratePostgres ¶
GeneratePostgres generates a PostgreSQL migration file.
func GenerateSQLite ¶
GenerateSQLite generates a SQLite migration file.
Types ¶
type Config ¶
type Config struct {
// OutputFolder is the directory where the migration file will be written
OutputFolder string
// OutputFilename is the name of the migration file
OutputFilename string
// EventsTable is the name of the events table
EventsTable string
// CheckpointsTable is the name of the projection checkpoints table
CheckpointsTable string
// AggregateHeadsTable is the name of the aggregate version tracking table
AggregateHeadsTable string
}
Config configures migration generation.
Click to show internal directories.
Click to hide internal directories.