mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-02-07 14:18:25 +00:00
fix(EventsDb): avoid duplication in db
This commit is contained in:
parent
b83fe6411a
commit
648119fd4b
3 changed files with 5 additions and 5 deletions
|
|
@ -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 <<
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -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[] = {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue