Added a link back to the home page
[infodrom.org/infocon.infodrom.org] / misc / schemes
index 851bbac..be6cb86 100644 (file)
@@ -4,6 +4,7 @@ DROP TABLE spool;
 DROP TABLE customer;
 DROP TABLE dispatch;
 DROP TABLE dispatchlist;
+DROP TABLE status;
 
 CREATE TABLE article (
        article VARCHAR(10),
@@ -59,8 +60,7 @@ CREATE UNIQUE INDEX "customer_id" on "customer" using btree ( customer );
 CREATE TABLE dispatch (
        dispatch int4,
        customer int4,
-       date datetime,
-       status int4
+       date datetime
 );
 CREATE UNIQUE INDEX "dispatch_id" on "dispatch" using btree ( dispatch );
 
@@ -73,6 +73,15 @@ CREATE TABLE dispatchlist (
 CREATE  INDEX "dispatchlist_orderid" on "dispatchlist" using btree ( dispatch );
 CREATE  INDEX "dispatchlist_artid"   on "dispatchlist" using btree ( articleid );
 
+CREATE TABLE status (
+       dispatch int4,
+       status int4,
+       staff TEXT,
+       date datetime
+);
+CREATE  INDEX "status_disp" on "status" using btree ( dispatch );
+
+
 REVOKE ALL on "article" from PUBLIC;
 GRANT  ALL on "article" to "www";
 GRANT  ALL on "article" to "joey";
@@ -96,3 +105,7 @@ GRANT  ALL on "customer" to "joey";
 REVOKE ALL on "spool" from PUBLIC;
 GRANT  ALL on "spool" to "www";
 GRANT  ALL on "spool" to "joey";
+
+REVOKE ALL on "status" from PUBLIC;
+GRANT  ALL on "status" to "www";
+GRANT  ALL on "status" to "joey";