[Collab-qa-commits] r1040 - in udd/src: . udd

lucas at alioth.debian.org lucas at alioth.debian.org
Sat Aug 9 18:02:06 UTC 2008


Author: lucas
Date: 2008-08-09 18:02:05 +0000 (Sat, 09 Aug 2008)
New Revision: 1040

Modified:
   udd/src/setup-db.sql
   udd/src/udd/bugs_gatherer.pl
Log:
rename bugs_unarchived to bugs, bugs to bugs_both

Modified: udd/src/setup-db.sql
===================================================================
--- udd/src/setup-db.sql	2008-08-09 17:56:28 UTC (rev 1039)
+++ udd/src/setup-db.sql	2008-08-09 18:02:05 UTC (rev 1040)
@@ -69,7 +69,7 @@
    source text, insts int, vote int, olde int, recent int, nofiles int,
    PRIMARY KEY (source));
 
-CREATE TABLE bugs_unarchived
+CREATE TABLE bugs
   (id int PRIMARY KEY, package text, source text, arrival timestamp, status text,
      severity text, submitter text, owner text, title text,
      last_modified timestamp, affects_stable boolean,
@@ -99,7 +99,7 @@
 CREATE TABLE bug_tags
   (id int, tag text, PRIMARY KEY (id, tag));
 
-CREATE VIEW bugs AS
+CREATE VIEW bugs_both AS
   SELECT id, package, source, arrival, status, severity, submitter, owner,
         title, last_modified, affects_stable, affects_testing,
 	affects_unstable, TRUE as is_archived
@@ -107,7 +107,7 @@
   UNION
   SELECT id, package, source, arrival, status, severity, submitter, owner,
 	title, last_modified, affects_stable, affects_testing,
-	affects_unstable, FALSE as is_archived FROM bugs_unarchived;
+	affects_unstable, FALSE as is_archived FROM bugs;
 
 CREATE TABLE upload_history
  (package text, version text, date timestamp with time zone, changed_by text,

Modified: udd/src/udd/bugs_gatherer.pl
===================================================================
--- udd/src/udd/bugs_gatherer.pl	2008-08-09 17:56:28 UTC (rev 1039)
+++ udd/src/udd/bugs_gatherer.pl	2008-08-09 18:02:05 UTC (rev 1040)
@@ -153,7 +153,7 @@
 	for my $bug (@modified_bugs) {
 		map {
 			$dbh->prepare("DELETE FROM $_ WHERE id = $bug")->execute() or die $!
-		} qw{bugs_archived bugs_unarchived bug_merged_with bug_found_in bug_fixed_in bug_tags};
+		} qw{bugs_archived bugs bug_merged_with bug_found_in bug_fixed_in bug_tags};
 	}
 	print "Bugs deleted\n";
 
@@ -162,7 +162,7 @@
 
 	# XXX What if a bug is in location 'db' (which currently doesn't exist)
 	my $location = $src_config{archived} ? 'archive' : 'db_h';
-	my $table = $src_config{archived} ? 'bugs_archived' : 'bugs_unarchived';
+	my $table = $src_config{archived} ? 'bugs_archived' : 'bugs';
 	# Read all bugs
 	foreach my $bug_nr (@modified_bugs) {
 		# Fetch bug using Debbugs




More information about the Collab-qa-commits mailing list