sql-migrate icon indicating copy to clipboard operation
sql-migrate copied to clipboard

fix(planMigrate): Bad files are send when IgnoreUnknown is set

Open Mama59 opened this issue 2 years ago • 2 comments

No get exising file on other folder if IgnoreUnknown is true

Mama59 avatar Mar 03 '22 13:03 Mama59

@Mama59 Could you add a unit test that demonstrates what goes wrong here and what it fixes?

rubenv avatar Aug 12 '22 06:08 rubenv

@Mama59 Could you add a unit test that demonstrates what goes wrong here and what it fixes?

@rubenv Test added, result without the change

----------------------------------------------------------------------
FAIL: migrate_test.go:669: SqliteMigrateSuite.TestMigrateWith2Folders

migrate_test.go:685:
    c.Assert(len(migrationsOtherPlanned), Equals, 1)
... obtained int = 0
... expected int = 1

OOPS: 35 passed, 1 FAILED
--- FAIL: Test (0.03s)
FAIL
exit status 1
FAIL	github.com/rubenv/sql-migrate	0.742s

Result with the change

OK: 36 passed
PASS
ok  	github.com/rubenv/sql-migrate	0.861s

Mama59 avatar Aug 16 '22 14:08 Mama59