mirror of
https://github.com/pressly/goose.git
synced 2025-09-04 19:37:19 +00:00
18 lines
240 B
Go
18 lines
240 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 INTEGER)"
|
|
_, err := db.Exec(q)
|
|
return err
|
|
}
|