[Collab-qa-commits] r1075 - in udd/src: schema udd
neronus-guest at alioth.debian.org
neronus-guest at alioth.debian.org
Mon Aug 11 17:10:30 UTC 2008
Author: neronus-guest
Date: 2008-08-11 17:10:30 +0000 (Mon, 11 Aug 2008)
New Revision: 1075
Modified:
udd/src/schema/bugs
udd/src/schema/packages
udd/src/udd/upload_history_gatherer.py
Log:
Added summary table to packages schema
modified bugs schema to use summary table from packages
use db api qupting for upload history, too
Modified: udd/src/schema/bugs
===================================================================
--- udd/src/schema/bugs 2008-08-11 16:20:33 UTC (rev 1074)
+++ udd/src/schema/bugs 2008-08-11 17:10:30 UTC (rev 1075)
@@ -4,6 +4,7 @@
last_modified timestamp, affects_stable boolean,
affects_testing boolean, affects_unstable boolean);
+
CREATE TABLE %(table)s_merged_with
(id int, merged_with int,
PRIMARY KEY(id, merged_with));
@@ -46,7 +47,7 @@
AND (id NOT IN (SELECT id FROM %(table)s_tags WHERE tag IN ('sid', 'sarge', 'lenny', 'experimental'))
OR id IN (SELECT id FROM %(table)s_tags WHERE tag = 'etch'))
AND id IN (select id FROM %(table)s_tags WHERE tag = 'etch-ignore')
-AND ( package IN (SELECT DISTINCT package FROM %(packages-table)s p WHERE release = 'etch')
+AND ( package IN (SELECT DISTINCT package FROM %(packages-table)s_summary p WHERE release = 'etch')
OR source IN (SELECT DISTINCT package FROM %(sources-table)s WHERE release = 'etch'));
CREATE VIEW bugs_rt_affects_testing AS
@@ -55,7 +56,7 @@
AND (id NOT IN (SELECT id FROM %(table)s_tags WHERE tag IN ('sid', 'sarge', 'etch', 'experimental'))
OR id IN (SELECT id FROM %(table)s_tags WHERE tag = 'lenny'))
AND id IN (select id FROM %(table)s_tags WHERE tag = 'lenny-ignore')
-AND ( package IN (SELECT DISTINCT package FROM %(packages-table)s p WHERE release = 'lenny')
+AND ( package IN (SELECT DISTINCT package FROM %(packages-table)s_summary p WHERE release = 'lenny')
OR source IN (SELECT DISTINCT package FROM %(sources-table)s WHERE release = 'lenny'));
CREATE VIEW bugs_rt_affects_unstable AS
@@ -63,7 +64,7 @@
WHERE affects_unstable
AND (id NOT IN (SELECT id FROM %(table)s_tags WHERE tag IN ('lenny', 'sarge', 'etch', 'experimental'))
OR id IN (SELECT id FROM %(table)s_tags WHERE tag = 'sid'))
-AND ( package IN (SELECT DISTINCT package FROM %(packages-table)s p WHERE release = 'sid')
+AND ( package IN (SELECT DISTINCT package FROM %(packages-table)s_summary p WHERE release = 'sid')
OR source IN (SELECT DISTINCT package FROM %(sources-table)s WHERE release = 'sid'));
CREATE VIEW bugs_rt_affects_testing_and_unstable AS
Modified: udd/src/schema/packages
===================================================================
--- udd/src/schema/packages 2008-08-11 16:20:33 UTC (rev 1074)
+++ udd/src/schema/packages 2008-08-11 17:10:30 UTC (rev 1075)
@@ -9,7 +9,13 @@
distribution text, release text, component text,
PRIMARY KEY (package, version, architecture, distribution, release, component));
+CREATE TABLE %(packages-table)s_summary ( package text, version text, source text,
+source_version text, maintainer text, distribution text, release text,
+component text,
+PRIMARY KEY (package, version, distribution, release, component));
+
GRANT SELECT ON %(packages-table)s TO PUBLIC;
+GRANT SELECT ON %(packages-table)s_summary TO PUBLIC;
CREATE INDEX %(packages-table)s_source_idx on %(packages-table)s(source);
CREATE INDEX %(packages-table)s_distrelcomp_idx on %(packages-table)s(distribution, release, component);
Modified: udd/src/udd/upload_history_gatherer.py
===================================================================
--- udd/src/udd/upload_history_gatherer.py 2008-08-11 16:20:33 UTC (rev 1074)
+++ udd/src/udd/upload_history_gatherer.py 2008-08-11 17:10:30 UTC (rev 1075)
@@ -1,4 +1,4 @@
-# Last-Modified: <Sun Aug 10 15:21:06 2008>
+# Last-Modified: <Mon Aug 11 15:55:07 2008>
# This file is part of the Ultimate Debian Database Project
from gatherer import gatherer
@@ -44,9 +44,9 @@
# Stupid multi-line maintainer fields *grml*
if line == '':
query = "EXECUTE uh_insert(%(Source)s, %(Version)s, %(Date)s, %(Changed-By)s, \
- %(Maintainer)s, %(NMU)s, %(Key)s, %(Signed-By)s)" % current
+ %(Maintainer)s, %(NMU)s, %(Key)s, %(Signed-By)s)"
try:
- cursor.execute(query)
+ cursor.execute(query, current)
except psycopg2.ProgrammingError, s:
print "Error at line %d of file %s" % (line_count, name)
raise
More information about the Collab-qa-commits
mailing list