pgsql/update_tables_0.5.x-0.6-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
   163 ALTER TABLE users DROP COLUMN sieve;
   163 ALTER TABLE users DROP COLUMN sieve;
   164 ALTER TABLE users ADD CONSTRAINT fkey_users_ssid_service_set
   164 ALTER TABLE users ADD CONSTRAINT fkey_users_ssid_service_set
   165     FOREIGN KEY (ssid) REFERENCES service_set (ssid);
   165     FOREIGN KEY (ssid) REFERENCES service_set (ssid);
   166 
   166 
   167 -- ---
   167 -- ---
       
   168 -- Catchall
       
   169 -- ---
       
   170 
       
   171 CREATE TABLE catchall (
       
   172     gid         bigint NOT NULL,
       
   173     destination varchar(320) NOT NULL,
       
   174     CONSTRAINT  pkey_catchall PRIMARY KEY (gid, destination),
       
   175     CONSTRAINT  fkey_catchall_gid_domain_data FOREIGN KEY (gid)
       
   176         REFERENCES domain_data (gid)
       
   177 );
       
   178 
       
   179 -- ---
   168 -- Restore view
   180 -- Restore view
   169 -- ---
   181 -- ---
   170 CREATE VIEW vmm_domain_info AS
   182 CREATE VIEW vmm_domain_info AS
   171     SELECT gid, count(uid) AS accounts,
   183     SELECT gid, count(uid) AS accounts,
   172            (SELECT count(DISTINCT address)
   184            (SELECT count(DISTINCT address)