feat(MainDb): create a new table: chat_message_file_content

This commit is contained in:
Ronan Abhamon 2017-11-08 17:05:19 +01:00
parent fc2fe482ec
commit ad896ab4f8

View file

@ -734,6 +734,19 @@ MainDb::MainDb (const shared_ptr<Core> &core) : AbstractDb(*new MainDbPrivate),
" ON DELETE CASCADE"
")";
*session <<
"CREATE TABLE IF NOT EXISTS chat_message_file_content ("
" chat_message_content_id" + primaryKeyStr("BIGINT UNSIGNED") + ","
" name VARCHAR(256) NOT NULL,"
" size INT UNSIGNED NOT NULL,"
" path VARCHAR(512) NOT NULL,"
" FOREIGN KEY (chat_message_content_id)"
" REFERENCES chat_message_content(id)"
" ON DELETE CASCADE"
")";
*session <<
"CREATE TABLE IF NOT EXISTS chat_message_content_app_data ("
" chat_message_content_id" + primaryKeyRefStr("BIGINT UNSIGNED") + ","