diff --git a/migrate.go b/migrate.go index 3c982f2..6fd5c08 100644 --- a/migrate.go +++ b/migrate.go @@ -95,9 +95,6 @@ func ModuleMigrations(cfg MigrationOpts) *app.Module { if cfg.BasePath == "" { cfg.BasePath = "." // default base path if not set } - if cfg.FS == nil { - panic("Migration filesystem (FS) must be set in the configuration") - } migrationsConfig = cfg // store configuration at package level @@ -136,6 +133,9 @@ func setupMigrations(_ *app.Module) error { return err } + // Set base filesystem for goose migrations + goose.SetBaseFS(migrationsConfig.FS) + // Initialize the goose migration provider Migration, err = goose.NewProvider(migrationsConfig.Dialect, migrationsConfig.SQLO(), migrationsConfig.FS) if err != nil {