mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-03 20:46:28 +00:00
fix(MainDb): fix sql schema
This commit is contained in:
parent
b764f9bb60
commit
ad05dbbdba
3 changed files with 4 additions and 3 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -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 () {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue