fix db creation

This commit is contained in:
Dimitur Kirov 2006-04-19 08:53:27 +00:00
parent 27f1461abe
commit 70da8ae011
2 changed files with 10 additions and 2 deletions

View File

@ -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')

View File

@ -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,