Commit ad05dbbd authored by Ronan's avatar Ronan

fix(MainDb): fix sql schema

parent b764f9bb
......@@ -143,8 +143,8 @@ MainDb::MainDb (const shared_ptr<Core> &core) : AbstractDb(*new MainDbPrivate),
long long messageContentId = q->getLastInsertId();
for (const auto &appData : content.getAppDataMap())
*session << "INSERT INTO chat_message_content_app_data (chat_message_content_id, key, data) VALUES"
" (:messageContentId, :key, :data)",
*session << "INSERT INTO chat_message_content_app_data (chat_message_content_id, name, data) VALUES"
" (:messageContentId, :name, :data)",
soci::use(messageContentId), soci::use(appData.first), soci::use(appData.second);
}
......
No preview for this file type
......@@ -45,7 +45,7 @@ public:
MainDbProvider () {
mCoreManager = linphone_core_manager_new("marie_rc");
mMainDb = new MainDb(mCoreManager->lc->cppCore->getSharedFromThis());
BC_ASSERT_TRUE(mMainDb->connect(MainDb::Sqlite3, getDatabasePath()));
mMainDb->connect(MainDb::Sqlite3, getDatabasePath());
}
~MainDbProvider () {
......@@ -66,6 +66,7 @@ private:
static void open_database () {
MainDbProvider provider;
BC_ASSERT_TRUE(provider.getMainDb().isConnected());
}
static void get_events_count () {
......
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