This commit is contained in:
mdecimus
2025-09-30 15:54:53 +02:00
parent 4a96357b2b
commit b39b4ec141
34 changed files with 246 additions and 113 deletions

View File

@@ -232,6 +232,7 @@ pub(crate) async fn migrate_emails(server: &Server, account_id: u32) -> trc::Res
}
// Delete messageId index, now in References
const MESSAGE_ID_FIELD: u8 = 11;
server
.store()
.delete_range(
@@ -240,7 +241,7 @@ pub(crate) async fn migrate_emails(server: &Server, account_id: u32) -> trc::Res
key: KeySerializer::new(U64_LEN)
.write(account_id)
.write(u8::from(Collection::Email))
.write(u8::from(EmailField::MessageId))
.write(MESSAGE_ID_FIELD)
.finalize(),
},
AnyKey {
@@ -248,7 +249,7 @@ pub(crate) async fn migrate_emails(server: &Server, account_id: u32) -> trc::Res
key: KeySerializer::new(U64_LEN)
.write(account_id)
.write(u8::from(Collection::Email))
.write(u8::from(EmailField::MessageId))
.write(MESSAGE_ID_FIELD)
.write(&[u8::MAX; 8][..])
.finalize(),
},