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

neronus-guest at alioth.debian.org neronus-guest at alioth.debian.org
Thu Aug 14 11:59:27 UTC 2008


Author: neronus-guest
Date: 2008-08-14 11:59:26 +0000 (Thu, 14 Aug 2008)
New Revision: 1094

Modified:
   udd/TODO
   udd/src/schema/bugs
   udd/src/schema/carnivore
   udd/src/schema/upload_history
   udd/src/test.yaml
Log:
TODO: Mark as done: elevator pitch
schemata: Add primary/foreign keys


Modified: udd/TODO
===================================================================
--- udd/TODO	2008-08-14 04:11:53 UTC (rev 1093)
+++ udd/TODO	2008-08-14 11:59:26 UTC (rev 1094)
@@ -13,7 +13,6 @@
 - (prio: high) clarify debian-backports-etch and debian-volatile-etch. HE
   will talk to Ganneff.
 - (prio: high) user documentation, on the Debian wiki.
-  - what UDD is ("elevator pitch")
   - tables structure, in a relatively friendly format
   - some example queries
 - (prio: medium) primary key for tables which have none yet

Modified: udd/src/schema/bugs
===================================================================
--- udd/src/schema/bugs	2008-08-14 04:11:53 UTC (rev 1093)
+++ udd/src/schema/bugs	2008-08-14 11:59:26 UTC (rev 1094)
@@ -4,21 +4,20 @@
      last_modified timestamp, affects_stable boolean,
     affects_testing boolean, affects_unstable boolean);
 
-
 CREATE TABLE %(table)s_merged_with
-  (id int, merged_with int,
+  (id int REFERENCES %(table)s, merged_with int,
 PRIMARY KEY(id, merged_with));
 
 CREATE TABLE %(table)s_found_in
-  (id int, version text,
+  (id int REFERENCES %(table)s, version text,
    PRIMARY KEY(id, version));
 
 CREATE TABLE %(table)s_fixed_in
-  (id int, version text,
+  (id int REFERENCES %(table)s, version text,
    PRIMARY KEY(id, version));
 
 CREATE TABLE %(table)s_tags
-  (id int, tag text, PRIMARY KEY (id, tag));
+  (id int REFERENCES %(table)s, tag text, PRIMARY KEY (id, tag));
 
 CREATE TABLE %(archived-table)s
   (id int PRIMARY KEY, package text, source text, arrival timestamp, status text,
@@ -27,19 +26,19 @@
     affects_testing boolean, affects_unsarchived_table boolean);
 
 CREATE TABLE %(archived-table)s_merged_with
-  (id int, merged_with int,
+  (id int REFERENCES %(archived-table)s, merged_with int,
 PRIMARY KEY(id, merged_with));
 
 CREATE TABLE %(archived-table)s_found_in
-  (id int, version text,
+  (id int REFERENCES %(archived-table)s, version text,
    PRIMARY KEY(id, version));
 
 CREATE TABLE %(archived-table)s_fixed_in
-  (id int, version text,
+  (id int REFERENCES %(archived-table)s, version text,
    PRIMARY KEY(id, version));
 
 CREATE TABLE %(archived-table)s_tags
-  (id int, tag text, PRIMARY KEY (id, tag));
+  (id int REFERENCES %(archived-table)s, tag text, PRIMARY KEY (id, tag));
 
 CREATE VIEW bugs_rt_affects_stable AS
 SELECT id, package, source FROM %(table)s

Modified: udd/src/schema/carnivore
===================================================================
--- udd/src/schema/carnivore	2008-08-14 04:11:53 UTC (rev 1093)
+++ udd/src/schema/carnivore	2008-08-14 11:59:26 UTC (rev 1094)
@@ -1,16 +1,21 @@
 CREATE TABLE %(emails-table)s
- (id int, email text);
+ (id int, email text,
+ PRIMARY KEY (id, email));
 
 CREATE TABLE %(names-table)s
- (id int, name text);
+ (id int, name text,
+ PRIMARY KEY (id, name));
 
 CREATE TABLE %(keys-table)s
- (id int, key text, key_type text);
+ (id int, key text, key_type text,
+ PRIMARY KEY (key, key_type));
 
 CREATE TABLE %(login-table)s
  (id int, login text,
    PRIMARY KEY(id));
 
+CREATE INDEX %(keys-table)s_id_idx ON %(keys-table)s (id);
+
 GRANT SELECT on %(emails-table)s TO PUBLIC;
 GRANT SELECT on %(names-table)s TO PUBLIC;
 GRANT SELECT on %(keys-table)s TO PUBLIC;

Modified: udd/src/schema/upload_history
===================================================================
--- udd/src/schema/upload_history	2008-08-14 04:11:53 UTC (rev 1093)
+++ udd/src/schema/upload_history	2008-08-14 11:59:26 UTC (rev 1094)
@@ -3,11 +3,11 @@
  changed_by text, maintainer text, nmu boolean, signed_by text, key_id text);
 
 CREATE TABLE %(table)s_architecture
- (id int, architecture text,
+ (id int FOREIGN KEY %(table)s, architecture text,
  PRIMARY KEY (id, architecture));
   
 CREATE TABLE %(table)s_closes
- (id int, bug int,
+ (id int FOREIGN KEY %(table)s, bug int,
  PRIMARY KEY (id, bug));
 
 GRANT SELECT ON %(table)s TO PUBLIC;

Modified: udd/src/test.yaml
===================================================================
--- udd/src/test.yaml	2008-08-14 04:11:53 UTC (rev 1093)
+++ udd/src/test.yaml	2008-08-14 11:59:26 UTC (rev 1094)
@@ -177,6 +177,7 @@
   archived: false
   table: bugs
   schema: bugs
+  debug: 1
   archived-table: archived_bugs
   packages-table: packages
   usertags-table: bugs_usertags




More information about the Collab-qa-commits mailing list