mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-28 06:26:01 +01:00
Set database version on initialization
This commit is contained in:
parent
806fa70a7c
commit
5a5316ca61
1 changed files with 4 additions and 1 deletions
|
@ -265,8 +265,11 @@ sqlite_db_check_layout(sqlite3* session, const int database_version, const bool
|
|||
return;
|
||||
}
|
||||
}
|
||||
if (new_db == true)
|
||||
if (new_db == true) {
|
||||
/* set version if initializing a new database */
|
||||
sqlite3_exec(session, "PRAGMA user_version = " G_STRINGIFY(DATABASE_VERSION) ";", NULL, 0, NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
#ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS
|
||||
if (sqlite3_compileoption_used("SQLITE_OMIT_ALTERTABLE") == 1) {
|
||||
|
|
Loading…
Reference in a new issue