Automated schema migration

This commit is contained in:
mdecimus
2025-05-16 16:10:21 +02:00
parent 365c87af20
commit 10bb4e5661
40 changed files with 3371 additions and 156 deletions

View File

@@ -32,10 +32,10 @@ use jmap_proto::{
use rand::distr::Alphanumeric;
use sieve::compiler::ErrorType;
use store::{
BlobClass,
BlobClass, Serialize,
query::Filter,
rand::{Rng, rng},
write::{Archive, BatchBuilder},
write::{Archive, BatchBuilder, UnversionedArchiver},
};
use trc::AddContext;
@@ -468,7 +468,7 @@ impl SieveScriptSet for Server {
match self.core.sieve.untrusted_compiler.compile(&bytes) {
Ok(script) => {
changes.size = bytes.len() as u32;
bytes.extend(rkyv::to_bytes::<rkyv::rancor::Error>(&script)?.iter());
bytes.extend(UnversionedArchiver::new(script).serialize().caused_by(trc::location!())?);
bytes.into()
}
Err(err) => {

View File

@@ -27,7 +27,10 @@ use jmap_proto::{
use mail_builder::MessageBuilder;
use mail_parser::decoders::html::html_to_text;
use std::future::Future;
use store::write::BatchBuilder;
use store::{
Serialize,
write::{BatchBuilder, UnversionedArchiver},
};
use trc::AddContext;
pub trait VacationResponseSet: Sync + Send {
@@ -436,7 +439,11 @@ impl VacationResponseSet for Server {
obj.size = script.len() as u32;
// Serialize script
script.extend(rkyv::to_bytes::<rkyv::rancor::Error>(&compiled_script)?.iter());
script.extend(
UnversionedArchiver::new(compiled_script)
.serialize()
.caused_by(trc::location!())?,
);
Ok(script)
}