add v4_attachment migration: sectionPath on attachment, hasAttachments on message

This commit is contained in:
2026-03-14 13:29:29 +01:00
parent aac7c7c0af
commit 17d47cfddd
4 changed files with 29 additions and 2 deletions
@@ -186,6 +186,15 @@ public enum DatabaseSetup {
try db.create(index: "idx_deferral_deferUntil", on: "deferral", columns: ["deferUntil"])
}
migrator.registerMigration("v4_attachment") { db in
try db.alter(table: "attachment") { t in
t.add(column: "sectionPath", .text)
}
try db.alter(table: "message") { t in
t.add(column: "hasAttachments", .boolean).notNull().defaults(to: false)
}
}
return migrator
}