Skip to content
Snippets Groups Projects
Commit e75425a6 authored by dkirov's avatar dkirov
Browse files

IF NOT EXISTS is not present in some sqlite

versions
parent 58f7a20e
No related branches found
No related tags found
No related merge requests found
......@@ -37,7 +37,21 @@
def assert_um_exists():
''' create table unread_messages if there is no such table '''
pass
con = sqlite.connect(logger.LOG_DB_PATH)
cur = con.cursor()
cur.executescript(
'''
CREATE TABLE unread_messages (
message_id INTEGER PRIMARY KEY AUTOINCREMENT UNIQUE
);
'''
)
try:
con.commit()
gajim.logger.init_vars()
except sqlite.OperationalError, e:
pass
con.close()
def create_log_db():
print _('creating logs database')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment