goose/tests/gomigrations/error/testdata/003_truncate.go

18 lines
225 B
Go

package gomigrations
import (
"database/sql"
"github.com/pressly/goose/v3"
)
func init() {
goose.AddMigration(up003, nil)
}
func up003(tx *sql.Tx) error {
q := "TRUNCATE TABLE foo"
_, err := tx.Exec(q)
return err
}