mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-18 19:48:07 +00:00
feat(MainDb): enforce conference_event table, primary key is now (event_id, chat_room_id)
This commit is contained in:
parent
82f04ddb29
commit
e3ff46be75
1 changed files with 4 additions and 2 deletions
|
|
@ -746,6 +746,7 @@ MainDb::MainDb (const shared_ptr<Core> &core) : AbstractDb(*new MainDbPrivate),
|
|||
" is_admin BOOLEAN NOT NULL,"
|
||||
|
||||
" PRIMARY KEY (chat_room_id, sip_address_id),"
|
||||
|
||||
" FOREIGN KEY (chat_room_id)"
|
||||
" REFERENCES chat_room(id)"
|
||||
" ON DELETE CASCADE,"
|
||||
|
|
@ -756,10 +757,11 @@ MainDb::MainDb (const shared_ptr<Core> &core) : AbstractDb(*new MainDbPrivate),
|
|||
|
||||
*session <<
|
||||
"CREATE TABLE IF NOT EXISTS conference_event ("
|
||||
" event_id" + primaryKeyStr("BIGINT UNSIGNED") + ","
|
||||
|
||||
" event_id" + primaryKeyRefStr("BIGINT UNSIGNED") + ","
|
||||
" chat_room_id" + primaryKeyRefStr("BIGINT UNSIGNED") + ","
|
||||
|
||||
" PRIMARY KEY (event_id, chat_room_id),"
|
||||
|
||||
" FOREIGN KEY (event_id)"
|
||||
" REFERENCES event(id)"
|
||||
" ON DELETE CASCADE,"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue