Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
648119fd
Commit
648119fd
authored
Sep 06, 2017
by
Ronan
Browse files
fix(EventsDb): avoid duplication in db
parent
b83fe641
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
src/db/events-db.cpp
src/db/events-db.cpp
+4
-4
tester/db/linphone.db
tester/db/linphone.db
+0
-0
tester/events-db-tester.cpp
tester/events-db-tester.cpp
+1
-1
No files found.
src/db/events-db.cpp
View file @
648119fd
...
...
@@ -135,13 +135,13 @@ EventsDb::EventsDb () : AbstractDb(*new EventsDbPrivate) {}
*
session
<<
"CREATE TABLE IF NOT EXISTS sip_address ("
" id"
+
primaryKeyAutoIncrementStr
()
+
","
" value VARCHAR(255) NOT NULL"
" value VARCHAR(255)
UNIQUE
NOT NULL"
")"
;
*
session
<<
"CREATE TABLE IF NOT EXISTS event_type ("
" id TINYINT UNSIGNED,"
" value VARCHAR(255) NOT NULL"
" value VARCHAR(255)
UNIQUE
NOT NULL"
")"
;
*
session
<<
...
...
@@ -157,13 +157,13 @@ EventsDb::EventsDb () : AbstractDb(*new EventsDbPrivate) {}
*
session
<<
"CREATE TABLE IF NOT EXISTS message_state ("
" id TINYINT UNSIGNED,"
" value VARCHAR(255) NOT NULL"
" value VARCHAR(255)
UNIQUE
NOT NULL"
")"
;
*
session
<<
"CREATE TABLE IF NOT EXISTS message_direction ("
" id TINYINT UNSIGNED,"
" value VARCHAR(255) NOT NULL"
" value VARCHAR(255)
UNIQUE
NOT NULL"
")"
;
*
session
<<
...
...
tester/db/linphone.db
View file @
648119fd
No preview for this file type
tester/events-db-tester.cpp
View file @
648119fd
...
...
@@ -37,7 +37,7 @@ static const string getDatabasePath () {
static
void
open_database
()
{
EventsDb
eventsDb
;
eventsDb
.
connect
(
EventsDb
::
Sqlite3
,
getDatabasePath
());
BC_ASSERT_TRUE
(
eventsDb
.
connect
(
EventsDb
::
Sqlite3
,
getDatabasePath
())
)
;
}
test_t
events_db_tests
[]
=
{
...
...
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