pressly / goose

A database migration tool. Supports SQL migrations and Go functions.
http://pressly.github.io/goose/
Other
7.18k stars 523 forks source link

Go migrations not registering #826

Closed nicholaschiarulli closed 2 months ago

nicholaschiarulli commented 2 months ago

I registered the migration

func init() { goose.AddMigrationContext(Up, Down) }

but I get this error when running

if err := goose.Up(dbConn, "migrations"); err != nil {
    panic(err)
}

failed to run Go migration: Go functions must be registered and built into a custom binary (see https://github.com/pressly/goose/tree/master/examples/go-migrations)

nicholaschiarulli commented 2 months ago

never mind I was importing the package wrong