Commit e5c3a5a9 authored by Ronan's avatar Ronan

feat(EventsDb): add new table => message_participant

parent f8abe9ad
......@@ -127,7 +127,7 @@ constexpr T *getPublicHelper (Object *object, const ObjectPrivate *) {
friend class CLASS;
#define L_DISABLE_COPY(CLASS) \
CLASS(const CLASS &) = delete; \
CLASS (const CLASS &) = delete; \
CLASS &operator= (const CLASS &) = delete;
#define L_D() decltype(std::declval<decltype(*this)>().getPrivate()) const d = getPrivate();
......
......@@ -30,7 +30,7 @@ class ContentTypePrivate;
class LINPHONE_PUBLIC ContentType : public ClonableObject {
public:
ContentType (const std::string &contentType = "");
explicit ContentType (const std::string &contentType = "");
ContentType (const std::string &type, const std::string &subType);
ContentType (const std::string &type, const std::string &subType, const std::string &parameter);
ContentType (const ContentType &src);
......
......@@ -305,9 +305,10 @@ EventsDb::EventsDb () : AbstractDb(*new EventsDbPrivate) {}
{ content }
);
const bool noAppData = false;
const string appData = getValueFromLegacyMessage<string>(message, 10, const_cast<bool &>(noAppData));
(void)appData;
bool noAppData = false;
const string appData = getValueFromLegacyMessage<string>(message, 10, noAppData);
if (!noAppData)
return;
}
tr.commit();
......@@ -385,6 +386,21 @@ EventsDb::EventsDb () : AbstractDb(*new EventsDbPrivate) {}
" ON DELETE CASCADE"
")";
*session <<
"CREATE TABLE IF NOT EXISTS message_participant ("
" message_event_id INT UNSIGNED NOT NULL,"
" sip_address_id INT UNSIGNED NOT NULL,"
" state TINYINT UNSIGNED NOT NULL,"
" PRIMARY KEY (message_event_id, sip_address_id),"
" FOREIGN KEY (message_event_id)"
" REFERENCES message_event(id)"
" ON DELETE CASCADE,"
" FOREIGN KEY (sip_address_id)"
" REFERENCES sip_address(id)"
" ON DELETE CASCADE,"
")";
*session <<
"CREATE TABLE IF NOT EXISTS message_content ("
" id" + primaryKeyAutoIncrementStr() + ","
......
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