Skip to content
This repository has been archived by the owner on Feb 24, 2024. It is now read-only.

Moving the tests to use filemigrator instead of migrateup method #1092

Merged
merged 6 commits into from
Jun 10, 2018
7 changes: 6 additions & 1 deletion buffalo/cmd/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,12 @@ func findSchema() io.Reader {
}

if test, err := pop.Connect("test"); err == nil {
if err := test.MigrateUp("./migrations"); err == nil {
fm, err := pop.NewFileMigrator("./migrations", test)
if err != nil {
return nil
}

if err := fm.Up(); err == nil {
if f, err := os.Open(filepath.Join("migrations", "schema.sql")); err == nil {
return f
}
Expand Down