Commit 42dd523d authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

Settings: Don't use an outdated & hardcoded default db model version

This prevents creating a DB version 1, to upgrade it to version 2 then
3 on the first launch
parent d1b147bf
......@@ -89,7 +89,8 @@ void Settings::setDbModelVersion(uint32_t dbModelVersion)
bool Settings::createTable( DBConnection dbConn )
{
const std::string req = "CREATE TABLE IF NOT EXISTS Settings("
"db_model_version UNSIGNED INTEGER NOT NULL DEFAULT 1"
"db_model_version UNSIGNED INTEGER NOT NULL DEFAULT " +
std::to_string( DbModelVersion ) +
")";
return sqlite::Tools::executeRequest( dbConn, req );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment