pgsql/create_tables-dovecot-1.2.x.pgsql
branchv0.6.x
changeset 503 492c179094c9
parent 502 e1b32377032f
child 511 0244f1344b04
equal deleted inserted replaced
502:e1b32377032f 503:492c179094c9
   168     gid         bigint NOT NULL,
   168     gid         bigint NOT NULL,
   169     address     varchar(64) NOT NULL,
   169     address     varchar(64) NOT NULL,
   170     destination varchar(320) NOT NULL,
   170     destination varchar(320) NOT NULL,
   171     CONSTRAINT  pkey_relocated PRIMARY KEY (gid, address),
   171     CONSTRAINT  pkey_relocated PRIMARY KEY (gid, address),
   172     CONSTRAINT  fkey_relocated_gid_domain_data FOREIGN KEY (gid)
   172     CONSTRAINT  fkey_relocated_gid_domain_data FOREIGN KEY (gid)
       
   173         REFERENCES domain_data (gid)
       
   174 );
       
   175 
       
   176 CREATE TABLE catchall (
       
   177     gid         bigint NOT NULL,
       
   178     destination varchar(320) NOT NULL,
       
   179     CONSTRAINT  pkey_catchall PRIMARY KEY (gid, destination),
       
   180     CONSTRAINT  fkey_catchall_gid_domain_data FOREIGN KEY (gid)
   173         REFERENCES domain_data (gid)
   181         REFERENCES domain_data (gid)
   174 );
   182 );
   175 
   183 
   176 CREATE OR REPLACE VIEW postfix_gid AS
   184 CREATE OR REPLACE VIEW postfix_gid AS
   177     SELECT gid, domainname
   185     SELECT gid, domainname