migrate

package
v0.0.31 Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnableSchemaMigrate

func EnableSchemaMigrate(fs embed.FS, baseDir string, startVersion string)

Enable auto schema migration.

Put all SQL scripts in a specific directory. Embed the directory as follows:

//go:embed schema/managed/*.sql
var schemaFs embed.FS

SQL files should start with 'v' using a name that clearly indicates which version it belongs to, E.g., 'schema/managed/v0.0.1.sql'.

func EnableSchemaMigrateOnProd

func EnableSchemaMigrateOnProd(fs embed.FS, baseDir string, startVersion string)

Enable auto schema migration on production mode.

func ExcludeSchemaFile

func ExcludeSchemaFile(name string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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