postgres

package
v0.19.1 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrIntegrity  = regexp.MustCompile("^ERROR #23000")
	ErrRestrict   = regexp.MustCompile("^ERROR #23001")
	ErrNotNull    = regexp.MustCompile("^ERROR #23502")
	ErrForeignKey = regexp.MustCompile("^ERROR #23503")
	ErrDuplicate  = regexp.MustCompile("^ERROR #23505")
)

Functions

func Migrate

func Migrate(dir, dbName, schema string, postgresURL string) error

Migrate runs the SQL migration files in dir using go-migrate. This means you have to ensure the SQL files follow the go-migrate format Also note that the directory must be an absolute path

Types

This section is empty.

Jump to

Keyboard shortcuts

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