pgsql/create_tables.pgsql
branchv0.6.x
changeset 503 492c179094c9
parent 502 e1b32377032f
child 511 0244f1344b04
--- a/pgsql/create_tables.pgsql	Sun Apr 08 19:05:25 2012 +0000
+++ b/pgsql/create_tables.pgsql	Mon Apr 09 17:45:02 2012 +0200
@@ -173,6 +173,14 @@
         REFERENCES domain_data (gid)
 );
 
+CREATE TABLE catchall (
+    gid         bigint NOT NULL,
+    destination varchar(320) NOT NULL,
+    CONSTRAINT  pkey_catchall PRIMARY KEY (gid, destination),
+    CONSTRAINT  fkey_catchall_gid_domain_data FOREIGN KEY (gid)
+        REFERENCES domain_data (gid)
+);
+
 CREATE OR REPLACE VIEW postfix_gid AS
     SELECT gid, domainname
       FROM domain_name;