add v4_attachment migration: sectionPath on attachment, hasAttachments on message
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user