migration

package
v0.0.0-...-04f3e75 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplySQLFiles

func ApplySQLFiles(ctx context.Context, conn sql.Executor, config AssetOptions) error

ApplySQLFiles initializes the database with data from a directory of SQL files

func RunMigrations

func RunMigrations(ctx context.Context, pool *pgxpool.Pool, opts Options) error

Types

type AssetOptions

type AssetOptions struct {
	FS   embed.FS
	Root string
}

type Options

type Options struct {
	TableName      string
	Redo           bool
	Reset          bool
	Rollback       bool
	Step           int
	MigrationAsset AssetOptions
}

Jump to

Keyboard shortcuts

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