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
When running a migration against a particular directory without go migrations, getting the registered migrations too. How to filter those out? #588, I see this pr addresses this but not able to make it work.
in my main.go have imported the ad-hoc package, in .go file have done goose.AddMigrationNoTxContext(). I run my binary against ./migrations where there are only sql files. Is there a way around this?
seeing this:
var sources []source
for _, fullpath := range goFiles {
v, err := NumericComponent(fullpath)
if err != nil {
continue // Skip any files that don't have version prefix.
}
if strings.HasSuffix(fullpath, "_test.go") {
continue // Skip Go test files.
}
if versionFilter(v, current, target) {
sources = append(sources, source{
fullpath: fullpath,
version: v,
})
}
}
var (
migrations Migrations
)
if len(sources) > 0 {
for _, s := range sources {
migration, ok := registeredGoMigrations[s.version]
if ok {
migrations = append(migrations, migration)
}
The text was updated successfully, but these errors were encountered:
When running a migration against a particular directory without go migrations, getting the registered migrations too. How to filter those out? #588, I see this pr addresses this but not able to make it work.
My directory structure:
migrations:
----ad-hoc:
--------1000_1000.go
----0001_1.sql
----0002_2.sql
in my main.go have imported the ad-hoc package, in .go file have done goose.AddMigrationNoTxContext(). I run my binary against ./migrations where there are only sql files. Is there a way around this?
seeing this:
The text was updated successfully, but these errors were encountered: