We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5136bb3 commit e03d678Copy full SHA for e03d678
sql-migrate/command_status.go
@@ -83,8 +83,13 @@ func (c *StatusCommand) Run(args []string) int {
83
}
84
85
for _, r := range records {
86
- rows[r.Id].Migrated = true
87
- rows[r.Id].AppliedAt = r.AppliedAt
+ status, ok := rows[r.Id]
+ if !ok {
88
+ ui.Warn(fmt.Sprintf("Migration in database %q unknown to sql-migrate; it will not be possible to migrate down this migration", r.Id))
89
+ continue
90
+ }
91
+ status.Migrated = true
92
+ status.AppliedAt = r.AppliedAt
93
94
95
for _, m := range migrations {
0 commit comments