migrations

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2022 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckLatestVersion

func CheckLatestVersion(sourceDriver source.Driver, currentVersion uint) error

Returns nil if currentVersion corresponds to the latest available migration, otherwise an error explaining why not.

func Down

func Down(db *sql.DB) error

Down runs all down SQL migrations.

func EnsureClean

func EnsureClean(db *sql.DB) error

EnsureClean checks whether all migrations for the current version have been applied, without making any changes to the database. If not, returns a non-nil error.

func Up

func Up(db *sql.DB) (retErr error)

Up runs SQL migrations to ensure the database schema is up-to-date.

Types

This section is empty.

Jump to

Keyboard shortcuts

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