Automated schema migration
This commit is contained in:
@@ -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) => {
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user