Skip to content

Commit ab09078

Browse files
committed
Fix failing test for merged migration that merges itself
1 parent 267e1ea commit ab09078

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

GRDB/Migration/DatabaseMigrator.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,13 @@ public struct DatabaseMigrator: Sendable {
327327
case .immediate:
328328
migrationChecks = .immediate
329329
}
330+
331+
// Remove the migration identifier from the list of merged identifiers.
332+
// Arguably, the semantics are ambiguous. And raising a fatal error
333+
// is a high price when we can just fix the input.
334+
var mergedIdentifiers = mergedIdentifiers
335+
mergedIdentifiers.remove(identifier)
336+
330337
registerMigration(Migration(
331338
identifier: identifier,
332339
mergedIdentifiers: mergedIdentifiers,

0 commit comments

Comments
 (0)