From 9ea1ab90b4705ef4d5ce37ded36a214f276c0a18 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Sun, 31 Mar 2013 18:32:13 +0200 Subject: add and delete accounts, db will be resetted --- module/database/DatabaseBackend.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'module/database/DatabaseBackend.py') diff --git a/module/database/DatabaseBackend.py b/module/database/DatabaseBackend.py index e77fc0966..54d1c54bb 100644 --- a/module/database/DatabaseBackend.py +++ b/module/database/DatabaseBackend.py @@ -30,7 +30,7 @@ except: import sqlite3 DB = None -DB_VERSION = 5 +DB_VERSION = 6 def set_DB(db): global DB @@ -162,9 +162,9 @@ class DatabaseBackend(Thread): self.conn.close() try: - self.manager.core.log.warning(_("File database was deleted due to incompatible version.")) + self.manager.core.log.warning(_("Database was deleted due to incompatible version.")) except: - print "File database was deleted due to incompatible version." + print "Database was deleted due to incompatible version." remove(self.VERSION_FILE) move(self.DB_FILE, self.DB_FILE + ".backup") @@ -225,7 +225,7 @@ class DatabaseBackend(Thread): #--convert scripts start - def _convertV5(self): + def _convertV6(self): return False #--convert scripts end @@ -364,7 +364,7 @@ class DatabaseBackend(Thread): 'CREATE TABLE IF NOT EXISTS "accounts" (' '"plugin" TEXT NOT NULL, ' '"loginname" TEXT NOT NULL, ' - '"owner", INTEGER NOT NULL, ' + '"owner" INTEGER NOT NULL DEFAULT -1, ' '"activated" INTEGER DEFAULT 1, ' '"password" TEXT DEFAULT "", ' '"shared" INTEGER DEFAULT 0, ' -- cgit v1.2.3