diff --git a/src/common/check_paths.py b/src/common/check_paths.py index 18c0bdca1..396db51da 100644 --- a/src/common/check_paths.py +++ b/src/common/check_paths.py @@ -57,7 +57,8 @@ def create_log_db(): ); CREATE TABLE unread_messages( - message_id INTEGER PRIMARY KEY AUTOINCREMENT UNIQUE + message_id INTEGER PRIMARY KEY AUTOINCREMENT UNIQUE, + jid_id INTEGER ); CREATE TABLE logs( @@ -74,6 +75,7 @@ def create_log_db(): ) con.commit() + con.close() def check_and_possibly_create_paths(): LOG_DB_PATH = logger.LOG_DB_PATH @@ -105,6 +107,7 @@ def check_and_possibly_create_paths(): if not os.path.exists(LOG_DB_PATH): create_log_db() + gajim.logger.init_vars() elif os.path.isdir(LOG_DB_PATH): print _('%s is directory but should be file') % LOG_DB_PATH print _('Gajim will now exit') diff --git a/src/migrate_logs_to_dot9_db.py b/src/migrate_logs_to_dot9_db.py index 94281cd4d..7566dd91c 100755 --- a/src/migrate_logs_to_dot9_db.py +++ b/src/migrate_logs_to_dot9_db.py @@ -217,7 +217,12 @@ class Migration: jid TEXT UNIQUE, type INTEGER ); - + + CREATE TABLE unread_messages( + message_id INTEGER PRIMARY KEY AUTOINCREMENT UNIQUE, + jid_id INTEGER + ); + CREATE TABLE logs( log_line_id INTEGER PRIMARY KEY AUTOINCREMENT UNIQUE, jid_id INTEGER,