summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-08-02 15:27:11 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-08-02 15:27:11 +0200
commit306a9c7482bcceae3a6e63ccb82f4dfbf8661c58 (patch)
tree08207855b06169b08490dd5e05153b79994e9595
parentfixes, cleanup, summary for each package (diff)
downloadpyload-306a9c7482bcceae3a6e63ccb82f4dfbf8661c58.tar.xz
fix db
-rw-r--r--module/database/DatabaseBackend.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/module/database/DatabaseBackend.py b/module/database/DatabaseBackend.py
index 812575a91..d330262f9 100644
--- a/module/database/DatabaseBackend.py
+++ b/module/database/DatabaseBackend.py
@@ -219,9 +219,9 @@ class DatabaseBackend(Thread):
self.c.execute('CREATE TABLE IF NOT EXISTS "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT, "name" TEXT NOT NULL, "email" TEXT DEFAULT "" NOT NULL, "password" TEXT NOT NULL, "role" INTEGER DEFAULT 0 NOT NULL, "permission" INTEGER DEFAULT 0 NOT NULL, "template" TEXT DEFAULT "default" NOT NULL)')
self.c.execute('CREATE VIEW IF NOT EXISTS "pstats" AS \
- SELECT p.id, SUM(l.size) AS sizetotal, COUNT(l.id) AS linkstotal, linksdone, sizedone\
+ SELECT p.id AS id, SUM(l.size) AS sizetotal, COUNT(l.id) AS linkstotal, linksdone, sizedone\
FROM packages p JOIN links l ON p.id = l.package LEFT OUTER JOIN\
- (SELECT p.id, COUNT(*) AS linksdone, SUM(l.size) AS sizedone \
+ (SELECT p.id AS id, COUNT(*) AS linksdone, SUM(l.size) AS sizedone \
FROM packages p JOIN links l ON p.id = l.package AND l.status in (0,4,13) GROUP BY p.id) s ON s.id = p.id \
GROUP BY p.id')