goose/tests/gomigrations/error/testdata/001_up_no_tx.go

18 lines
236 B
Go

package gomigrations
import (
"database/sql"
"github.com/pressly/goose/v3"
)
func init() {
goose.AddMigrationNoTx(up001, nil)
}
func up001(db *sql.DB) error {
q := "CREATE TABLE foo (id INT)"
_, err := db.Exec(q)
return err
}