mirror of
https://github.com/chatmail/core.git
synced 2026-05-08 17:36:29 +03:00
change default for bcc_self, preserve values for existing installations
This commit is contained in:
committed by
holger krekel
parent
85b4817a1e
commit
dabd431b1f
@@ -31,7 +31,7 @@ pub enum Config {
|
|||||||
Displayname,
|
Displayname,
|
||||||
Selfstatus,
|
Selfstatus,
|
||||||
Selfavatar,
|
Selfavatar,
|
||||||
#[strum(props(default = "1"))]
|
#[strum(props(default = "0"))]
|
||||||
BccSelf,
|
BccSelf,
|
||||||
#[strum(props(default = "1"))]
|
#[strum(props(default = "1"))]
|
||||||
E2eeEnabled,
|
E2eeEnabled,
|
||||||
|
|||||||
@@ -804,9 +804,15 @@ fn open(
|
|||||||
"ALTER TABLE locations ADD COLUMN independent INTEGER DEFAULT 0;",
|
"ALTER TABLE locations ADD COLUMN independent INTEGER DEFAULT 0;",
|
||||||
params![],
|
params![],
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
sql.set_raw_config_int(context, "dbversion", 55)?;
|
sql.set_raw_config_int(context, "dbversion", 55)?;
|
||||||
}
|
}
|
||||||
|
if dbversion < 56 {
|
||||||
|
info!(context, "[migration] v56");
|
||||||
|
if exists_before_update && sql.get_raw_config_int(context, "bcc_self").is_none() {
|
||||||
|
sql.set_raw_config_int(context, "bcc_self", 1)?;
|
||||||
|
}
|
||||||
|
sql.set_raw_config_int(context, "dbversion", 56)?;
|
||||||
|
}
|
||||||
|
|
||||||
// (2) updates that require high-level objects
|
// (2) updates that require high-level objects
|
||||||
// (the structure is complete now and all objects are usable)
|
// (the structure is complete now and all objects are usable)
|
||||||
|
|||||||
Reference in New Issue
Block a user