mirror of
https://github.com/chatmail/core.git
synced 2026-04-19 14:36:29 +03:00
use bool for exists_before_update
This commit is contained in:
committed by
holger krekel
parent
d330d890c0
commit
9506f8c38e
@@ -348,7 +348,7 @@ fn open(
|
||||
}
|
||||
|
||||
if !readonly {
|
||||
let mut exists_before_update = 0;
|
||||
let mut exists_before_update = false;
|
||||
let mut dbversion_before_update = 0;
|
||||
/* Init tables to dbversion=0 */
|
||||
if !sql.table_exists("config") {
|
||||
@@ -478,7 +478,7 @@ fn open(
|
||||
sql.set_raw_config_int(context, "dbversion", 0)?;
|
||||
}
|
||||
} else {
|
||||
exists_before_update = 1;
|
||||
exists_before_update = true;
|
||||
dbversion_before_update = sql
|
||||
.get_raw_config_int(context, "dbversion")
|
||||
.unwrap_or_default();
|
||||
@@ -735,7 +735,7 @@ fn open(
|
||||
}
|
||||
if dbversion < 50 {
|
||||
info!(context, "[migration] v50");
|
||||
if 0 != exists_before_update {
|
||||
if exists_before_update {
|
||||
sql.set_raw_config_int(context, "show_emails", 2)?;
|
||||
}
|
||||
dbversion = 50;
|
||||
|
||||
Reference in New Issue
Block a user