@@ -23,11 +23,11 @@ import (
2323 "github.com/supabase/cli/internal/db/start"
2424 "github.com/supabase/cli/internal/gen/keys"
2525 "github.com/supabase/cli/internal/migration/apply"
26- "github.com/supabase/cli/internal/migration/list"
2726 "github.com/supabase/cli/internal/migration/repair"
2827 "github.com/supabase/cli/internal/seed/buckets"
2928 "github.com/supabase/cli/internal/utils"
3029 "github.com/supabase/cli/pkg/migration"
30+ "github.com/supabase/cli/pkg/vault"
3131)
3232
3333func Run (ctx context.Context , version string , config pgconn.Config , fsys afero.Fs , options ... func (* pgx.ConnConfig )) error {
@@ -242,22 +242,10 @@ func resetRemote(ctx context.Context, version string, config pgconn.Config, fsys
242242 if err := migration .DropUserSchemas (ctx , conn ); err != nil {
243243 return err
244244 }
245- migrations , err := list .LoadPartialMigrations (version , fsys )
246- if err != nil {
247- return err
248- }
249- if err := migration .ApplyMigrations (ctx , migrations , conn , afero .NewIOFS (fsys )); err != nil {
245+ if err := vault .UpsertVaultSecrets (ctx , utils .Config .Db .Vault , conn ); err != nil {
250246 return err
251247 }
252- if ! utils .Config .Db .Seed .Enabled {
253- // Skip because --no-seed flag is set
254- return nil
255- }
256- seeds , err := migration .GetPendingSeeds (ctx , utils .Config .Db .Seed .SqlPaths , conn , afero .NewIOFS (fsys ))
257- if err != nil {
258- return err
259- }
260- return migration .SeedData (ctx , seeds , conn , afero .NewIOFS (fsys ))
248+ return apply .MigrateAndSeed (ctx , version , conn , fsys )
261249}
262250
263251func LikeEscapeSchema (schemas []string ) (result []string ) {
0 commit comments