diff --git a/core/include/db_manager.h b/core/include/db_manager.h index 67f0f1d..3f0fdbe 100644 --- a/core/include/db_manager.h +++ b/core/include/db_manager.h @@ -18,7 +18,7 @@ #ifndef BAN_MANAGER_H #define BAN_MANAGER_H -#define DB_VERSION 1 +#define DB_VERSION 2 #include #include diff --git a/core/src/db_manager.cpp b/core/src/db_manager.cpp index afae5b1..34aec81 100644 --- a/core/src/db_manager.cpp +++ b/core/src/db_manager.cpp @@ -399,6 +399,10 @@ void DBManager::updateDB(int current_version) QSqlQuery("ALTER TABLE bans ADD COLUMN MODERATOR TEXT"); Q_FALLTHROUGH(); case 1: + QSqlQuery("PRAGMA user_version = " + QString::number(1)); + Q_FALLTHROUGH(); + case 2: + QSqlQuery("UPDATE users SET ACL = 'SUPER' WHERE USERNAME = 'root'"); QSqlQuery("PRAGMA user_version = " + QString::number(DB_VERSION)); break; }