migrationsLib

package
v0.4.11 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2024 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyMigrationSQL

func ApplyMigrationSQL(migStat types.MigrationStatus, isUpMigration bool) error

func DiffDBSchema

func DiffDBSchema(currentState, prevState *types.DbSchema) []types.MigAction

func GetSQLFromDiffChanges

func GetSQLFromDiffChanges(currentState, prevState *types.DbSchema, changes []types.MigAction) (string, error)

func Status

func Status(dbname string, currentState *types.DbSchema) (types.MigrationStatus, error)

returns: list of migrations, the active migration index (-1 if no active migration found) and "isInit" to check if the migrations directory was initialized

Types

This section is empty.

Jump to

Keyboard shortcuts

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