Commit db683ee6 authored by Ronan's avatar Ronan

feat(MainDb): create events table for subject, participant...

parent 15fcc695
...@@ -328,6 +328,55 @@ MainDb::MainDb () : AbstractDb(*new MainDbPrivate) {} ...@@ -328,6 +328,55 @@ MainDb::MainDb () : AbstractDb(*new MainDbPrivate) {}
" ON DELETE CASCADE" " ON DELETE CASCADE"
")"; ")";
*session <<
"CREATE TABLE IF NOT EXISTS conference_event ("
" event_id INT UNSIGNED PRIMARY KEY,"
" chat_room_id INT UNSIGNED NOT NULL,"
" FOREIGN KEY (event_id)"
" REFERENCES event(id)"
" ON DELETE CASCADE,"
" FOREIGN KEY (chat_room_id)"
" REFERENCES chat_room(peer_sip_address_id)"
" ON DELETE CASCADE"
")";
*session <<
"CREATE TABLE IF NOT EXISTS conference_participant_event ("
" conference_event_id INT UNSIGNED PRIMARY KEY,"
" participant_address_id INT UNSIGNED NOT NULL,"
" FOREIGN KEY (conference_event_id)"
" REFERENCES event(event_id)"
" ON DELETE CASCADE,"
" FOREIGN KEY (participant_address_id)"
" REFERENCES sip_address(id)"
" ON DELETE CASCADE"
")";
*session <<
"CREATE TABLE IF NOT EXISTS conference_participant_device_event ("
" conference_participant_event_id INT UNSIGNED PRIMARY KEY,"
" gruu_address_id INT UNSIGNED NOT NULL,"
" FOREIGN KEY (conference_participant_event_id)"
" REFERENCES conference_participant_event(conference_event_id)"
" ON DELETE CASCADE,"
" FOREIGN KEY (gruu_address_id)"
" REFERENCES sip_address(id)"
" ON DELETE CASCADE"
")";
*session <<
"CREATE TABLE IF NOT EXISTS conference_subject_event ("
" conference_event_id INT UNSIGNED PRIMARY KEY,"
" subject VARCHAR(255),"
" FOREIGN KEY (conference_event_id)"
" REFERENCES event(event_id)"
" ON DELETE CASCADE"
")";
*session << *session <<
"CREATE TABLE IF NOT EXISTS message_event (" "CREATE TABLE IF NOT EXISTS message_event ("
" event_id INT UNSIGNED PRIMARY KEY," " event_id INT UNSIGNED PRIMARY KEY,"
......
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