diff --git a/src/config.rs b/src/config.rs index a63e555d6..ab8851714 100644 --- a/src/config.rs +++ b/src/config.rs @@ -31,7 +31,7 @@ pub enum Config { Displayname, Selfstatus, Selfavatar, - #[strum(props(default = "1"))] + #[strum(props(default = "0"))] BccSelf, #[strum(props(default = "1"))] E2eeEnabled, diff --git a/src/sql.rs b/src/sql.rs index 03a31b156..bf989142c 100644 --- a/src/sql.rs +++ b/src/sql.rs @@ -804,9 +804,15 @@ fn open( "ALTER TABLE locations ADD COLUMN independent INTEGER DEFAULT 0;", params![], )?; - 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 // (the structure is complete now and all objects are usable)