Skip to content

Commit

Permalink
chore: recommend updating git repo before repair
Browse files Browse the repository at this point in the history
  • Loading branch information
sweatybridge committed Jul 31, 2023
1 parent 3a96e53 commit 66d00a5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/migration/up/up.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
)

var (
errMissingRemote = errors.New("Found local migration files created before the last migration on remote database.")
errMissingRemote = errors.New("Found local migration files to be inserted before the last migration on remote database.")
errMissingLocal = errors.New("Remote migration versions not found in " + utils.MigrationsDir + " directory.")
)

Expand Down Expand Up @@ -72,7 +72,7 @@ func GetPendingMigrations(ctx context.Context, includeAll bool, conn *pgx.Conn,
}

func suggestRevertHistory(versions []string) string {
result := fmt.Sprintln("\nTry repairing the migration history table:")
result := fmt.Sprintln("\nMake sure your local git repo is up-to-date. If the error persists, try repairing the migration history table:")
for _, ver := range versions {
result += fmt.Sprintln(utils.Bold("supabase migration repair --status reverted " + ver))
}
Expand Down

0 comments on commit 66d00a5

Please sign in to comment.