add: tag support for controller and relay
add: static on schedule
This commit is contained in:
parent
9a44bc494e
commit
636fdf8df1
11 changed files with 96 additions and 18 deletions
helpers
|
@ -5,6 +5,7 @@
|
|||
#include <config.h>
|
||||
|
||||
#include <sql/migration_0.h>
|
||||
#include <sql/migration_1.h>
|
||||
|
||||
int
|
||||
helpers::migrate_sql()
|
||||
|
@ -32,6 +33,7 @@ helpers::migrate_sql()
|
|||
switch(version_num)
|
||||
{
|
||||
case 0:
|
||||
LOG_INFO << "Migrating LEVEL 0";
|
||||
rc = sqlite3_exec(globals::db, (const char *)sql_migration_0_sql, nullptr, nullptr, &err_msg);
|
||||
if(rc != 0)
|
||||
{
|
||||
|
@ -39,6 +41,15 @@ helpers::migrate_sql()
|
|||
break;
|
||||
}
|
||||
new_version_num = 1;
|
||||
case 1:
|
||||
LOG_INFO << "Migrating LEVEL 1";
|
||||
rc = sqlite3_exec(globals::db, (const char *)sql_migration_1_sql, nullptr, nullptr, &err_msg);
|
||||
if(rc != 0)
|
||||
{
|
||||
LOG_FATAL << "Couldn't migrate LEVEL 1 (" << err_msg << ")";
|
||||
break;
|
||||
}
|
||||
new_version_num = 2;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue