You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this iteration then calls out to migrationsFromFile (ref: https://github.com/rubenv/sql-migrate/blob/master/migrate.go#L277) which then also calls open on the filename of the file being iterated over. This is where the problem is surfacing. Because the filepath doesn't have the leading / in the string, it is failing to find the file.
Changing this to the following resolves this issue:
Hi team, love sql-migrate but have found an issue working with it and using the https://github.com/markbates/pkger/ solution for embedding static files.
Like #167 we are seeing issues related to file not found when traversing the files in the migration directory.
The steps used in sql-migrate are:
FindMigrationsis called on aHttpFileSystemMigrationSourcehttps://github.com/rubenv/sql-migrate/blob/master/migrate.go#L232findMigrations(ref: https://github.com/rubenv/sql-migrate/blob/master/migrate.go#L247) and sets the directory to the base of the file system and then traverses its contents at that level (ref: https://github.com/rubenv/sql-migrate/blob/master/migrate.go#L260-L269)/in the string, it is failing to find the file.Changing this to the following resolves this issue: