[Collab-qa-commits] r963 - udd/src

lucas at alioth.debian.org lucas at alioth.debian.org
Mon Jul 28 16:04:17 UTC 2008


Author: lucas
Date: 2008-07-28 16:04:16 +0000 (Mon, 28 Jul 2008)
New Revision: 963

Modified:
   udd/src/setup-db.sql
Log:
added some primary keys (not tested, might break in horrible ways)

Modified: udd/src/setup-db.sql
===================================================================
--- udd/src/setup-db.sql	2008-07-28 16:03:44 UTC (rev 962)
+++ udd/src/setup-db.sql	2008-07-28 16:04:16 UTC (rev 963)
@@ -4,7 +4,7 @@
     Recommends text, Suggests text, Enhances text, Pre_Depends text,
     Installed_Size int, Homepage text, Size int, MD5Sum text, Distribution
     text, Release text, Component text,
-  UNIQUE (Package, Version, Architecture, Distribution, Release, Component));
+  PRIMARY KEY (Package, Version, Architecture, Distribution, Release, Component));
 
 CREATE TABLE sources
   (Package text, Version text, Maintainer text, Format text, Files text,
@@ -15,35 +15,41 @@
     Vcs_Browser text, Vcs_Bzr text, Vcs_Cvs text, Vcs_Darcs text, Vcs_Git text,
     Vcs_Hg text, Vcs_Svn text, X_Vcs_Browser text, X_Vcs_Bzr text, X_Vcs_Darcs
     text, X_Vcs_Svn text,
-    UNIQUE (package, version, distribution, release, component));
+    PRIMARY KEY (package, version, distribution, release, component));
 
 CREATE TABLE migrations
-  (package text, in_testing date, testing_version text, in_unstable date, unstable_version text, sync date, sync_version text, first_seen date,
-  UNIQUE (package));
+  (package text PRIMARY KEY, in_testing date, testing_version text, in_unstable date, unstable_version text, sync date, sync_version text, first_seen date);
 
-CREATE TABLE popcon
-  (Name text, insts int, vote int, olde int, recent int, nofiles int, distribution text, UNIQUE (Name, distribution));
+CREATE TABLE popcon (
+   Name text, insts int, vote int, olde int, recent int, nofiles int,
+   distribution text,
+   PRIMARY KEY (Name, distribution));
 
 CREATE TABLE bugs
-  (id int, package text, source text, arrival timestamp, status text,
+  (id int PRIMARY KEY, package text, source text, arrival timestamp, status text,
      severity text, tags text, submitter text, owner text, title text,
      last_modified timestamp, affects_stable boolean,
-    affects_testing boolean, affects_unstable boolean, UNIQUE (id), is_archived boolean);
+    affects_testing boolean, affects_unstable boolean,
+is_archived boolean);
 
 CREATE TABLE bug_merged_with
-  (bug int, merged_with int);
+  (bug int, merged_with int,
+PRIMARY KEY(bug, merged_with));
 
 CREATE TABLE bug_user_tags
   (bug_user text, tag text, bug_nr text);
 
 CREATE TABLE bug_found_in
-  (id int, version text);
+  (id int, version text,
+   PRIMARY KEY(id, version));
 
 CREATE TABLE bug_fixed_in
-  (id int, version text);
+  (id int, version text,
+   PRIMARY KEY(id, version));
 
 CREATE TABLE upload_history
- (package text, version text, date timestamp with time zone, changed_by text, maintainer text, nmu boolean, signed_by text, key_id text);
+ (package text, version text, date timestamp with time zone, changed_by text,
+  maintainer text, nmu boolean, signed_by text, key_id text);
 
 CREATE VIEW popcon_src_average AS
   SELECT package, avg(insts) AS insts, avg(vote) AS vote, avg(olde) AS old, avg(recent) AS recent, avg(nofiles) as nofiles, packages.distribution




More information about the Collab-qa-commits mailing list