Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
BC
public
liblinphone
Commits
f2af53f2
Commit
f2af53f2
authored
Nov 09, 2017
by
Ronan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(MainDb): force utf8 charset
parent
6ef85b29
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
16 deletions
+16
-16
src/db/main-db.cpp
src/db/main-db.cpp
+16
-16
No files found.
src/db/main-db.cpp
View file @
f2af53f2
...
...
@@ -568,20 +568,20 @@ MainDb::MainDb (const shared_ptr<Core> &core) : AbstractDb(*new MainDbPrivate),
"CREATE TABLE IF NOT EXISTS sip_address ("
" id"
+
primaryKeyStr
(
"BIGINT UNSIGNED"
)
+
","
" value VARCHAR(255) UNIQUE NOT NULL"
")"
;
")
DEFAULT CHARSET=utf8
"
;
*
session
<<
"CREATE TABLE IF NOT EXISTS content_type ("
" id"
+
primaryKeyStr
(
"SMALLINT UNSIGNED"
)
+
","
" value VARCHAR(255) UNIQUE NOT NULL"
")"
;
")
DEFAULT CHARSET=utf8
"
;
*
session
<<
"CREATE TABLE IF NOT EXISTS event ("
" id"
+
primaryKeyStr
(
"BIGINT UNSIGNED"
)
+
","
" type TINYINT UNSIGNED NOT NULL,"
" date DATE NOT NULL"
")"
;
")
DEFAULT CHARSET=utf8
"
;
*
session
<<
"CREATE TABLE IF NOT EXISTS chat_room ("
...
...
@@ -605,7 +605,7 @@ MainDb::MainDb (const shared_ptr<Core> &core) : AbstractDb(*new MainDbPrivate),
" FOREIGN KEY (peer_sip_address_id)"
" REFERENCES sip_address(id)"
" ON DELETE CASCADE"
")"
;
")
DEFAULT CHARSET=utf8
"
;
*
session
<<
"CREATE TABLE IF NOT EXISTS chat_room_participant ("
...
...
@@ -621,7 +621,7 @@ MainDb::MainDb (const shared_ptr<Core> &core) : AbstractDb(*new MainDbPrivate),
" FOREIGN KEY (sip_address_id)"
" REFERENCES sip_address(id)"
" ON DELETE CASCADE"
")"
;
")
DEFAULT CHARSET=utf8
"
;
*
session
<<
"CREATE TABLE IF NOT EXISTS conference_event ("
...
...
@@ -635,7 +635,7 @@ MainDb::MainDb (const shared_ptr<Core> &core) : AbstractDb(*new MainDbPrivate),
" FOREIGN KEY (chat_room_id)"
" REFERENCES chat_room(peer_sip_address_id)"
" ON DELETE CASCADE"
")"
;
")
DEFAULT CHARSET=utf8
"
;
*
session
<<
"CREATE TABLE IF NOT EXISTS conference_notified_event ("
...
...
@@ -646,7 +646,7 @@ MainDb::MainDb (const shared_ptr<Core> &core) : AbstractDb(*new MainDbPrivate),
" FOREIGN KEY (event_id)"
" REFERENCES conference_event(event_id)"
" ON DELETE CASCADE"
")"
;
")
DEFAULT CHARSET=utf8
"
;
*
session
<<
"CREATE TABLE IF NOT EXISTS conference_participant_event ("
...
...
@@ -660,7 +660,7 @@ MainDb::MainDb (const shared_ptr<Core> &core) : AbstractDb(*new MainDbPrivate),
" FOREIGN KEY (participant_address_id)"
" REFERENCES sip_address(id)"
" ON DELETE CASCADE"
")"
;
")
DEFAULT CHARSET=utf8
"
;
*
session
<<
"CREATE TABLE IF NOT EXISTS conference_participant_device_event ("
...
...
@@ -674,7 +674,7 @@ MainDb::MainDb (const shared_ptr<Core> &core) : AbstractDb(*new MainDbPrivate),
" FOREIGN KEY (gruu_address_id)"
" REFERENCES sip_address(id)"
" ON DELETE CASCADE"
")"
;
")
DEFAULT CHARSET=utf8
"
;
*
session
<<
"CREATE TABLE IF NOT EXISTS conference_subject_event ("
...
...
@@ -685,7 +685,7 @@ MainDb::MainDb (const shared_ptr<Core> &core) : AbstractDb(*new MainDbPrivate),
" FOREIGN KEY (event_id)"
" REFERENCES conference_notified_event(event_id)"
" ON DELETE CASCADE"
")"
;
")
DEFAULT CHARSET=utf8
"
;
*
session
<<
"CREATE TABLE IF NOT EXISTS conference_chat_message_event ("
...
...
@@ -710,7 +710,7 @@ MainDb::MainDb (const shared_ptr<Core> &core) : AbstractDb(*new MainDbPrivate),
" FOREIGN KEY (remote_sip_address_id)"
" REFERENCES sip_address(id)"
" ON DELETE CASCADE"
")"
;
")
DEFAULT CHARSET=utf8
"
;
*
session
<<
"CREATE TABLE IF NOT EXISTS chat_message_participant ("
...
...
@@ -725,7 +725,7 @@ MainDb::MainDb (const shared_ptr<Core> &core) : AbstractDb(*new MainDbPrivate),
" FOREIGN KEY (sip_address_id)"
" REFERENCES sip_address(id)"
" ON DELETE CASCADE"
")"
;
")
DEFAULT CHARSET=utf8
"
;
*
session
<<
"CREATE TABLE IF NOT EXISTS chat_message_content ("
...
...
@@ -741,7 +741,7 @@ MainDb::MainDb (const shared_ptr<Core> &core) : AbstractDb(*new MainDbPrivate),
" FOREIGN KEY (content_type_id)"
" REFERENCES content_type(id)"
" ON DELETE CASCADE"
")"
;
")
DEFAULT CHARSET=utf8
"
;
*
session
<<
"CREATE TABLE IF NOT EXISTS chat_message_file_content ("
...
...
@@ -754,7 +754,7 @@ MainDb::MainDb (const shared_ptr<Core> &core) : AbstractDb(*new MainDbPrivate),
" FOREIGN KEY (chat_message_content_id)"
" REFERENCES chat_message_content(id)"
" ON DELETE CASCADE"
")"
;
")
DEFAULT CHARSET=utf8
"
;
*
session
<<
"CREATE TABLE IF NOT EXISTS chat_message_content_app_data ("
...
...
@@ -767,7 +767,7 @@ MainDb::MainDb (const shared_ptr<Core> &core) : AbstractDb(*new MainDbPrivate),
" FOREIGN KEY (chat_message_content_id)"
" REFERENCES chat_message_content(id)"
" ON DELETE CASCADE"
")"
;
")
DEFAULT CHARSET=utf8
"
;
*
session
<<
"CREATE TABLE IF NOT EXISTS conference_message_crypto_data ("
...
...
@@ -780,7 +780,7 @@ MainDb::MainDb (const shared_ptr<Core> &core) : AbstractDb(*new MainDbPrivate),
" FOREIGN KEY (event_id)"
" REFERENCES conference_chat_message_event(event_id)"
" ON DELETE CASCADE"
")"
;
")
DEFAULT CHARSET=utf8
"
;
// Trigger to delete participant_message cache entries.
string
displayedId
=
Utils
::
toString
(
static_cast
<
int
>
(
ChatMessage
::
State
::
Displayed
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment