pgsql/create_tables.pgsql
branchv0.6.x
changeset 538 1f9ea5658627
parent 530 95dd123b552e
child 547 5020c56f9388
equal deleted inserted replaced
537:9a23043b0530 538:1f9ea5658627
   102     gid         bigint NOT NULL DEFAULT nextval('domain_gid'),
   102     gid         bigint NOT NULL DEFAULT nextval('domain_gid'),
   103     qid         bigint NOT NULL DEFAULT 1, -- default quota limit
   103     qid         bigint NOT NULL DEFAULT 1, -- default quota limit
   104     ssid        bigint NOT NULL DEFAULT 1, -- default service_set
   104     ssid        bigint NOT NULL DEFAULT 1, -- default service_set
   105     tid         bigint NOT NULL DEFAULT 1, -- default transport
   105     tid         bigint NOT NULL DEFAULT 1, -- default transport
   106     domaindir   varchar(40) NOT NULL, --/srv/mail/$RAND/4294967294
   106     domaindir   varchar(40) NOT NULL, --/srv/mail/$RAND/4294967294
       
   107     note        varchar NULL DEFAULT NULL,
   107     CONSTRAINT  pkey_domain_data PRIMARY KEY (gid),
   108     CONSTRAINT  pkey_domain_data PRIMARY KEY (gid),
   108     CONSTRAINT  fkey_domain_data_qid_quotalimit FOREIGN KEY (qid)
   109     CONSTRAINT  fkey_domain_data_qid_quotalimit FOREIGN KEY (qid)
   109         REFERENCES quotalimit (qid),
   110         REFERENCES quotalimit (qid),
   110     CONSTRAINT  fkey_domain_data_ssid_service_set FOREIGN KEY (ssid)
   111     CONSTRAINT  fkey_domain_data_ssid_service_set FOREIGN KEY (ssid)
   111         REFERENCES service_set (ssid),
   112         REFERENCES service_set (ssid),
   130     gid         bigint NOT NULL,
   131     gid         bigint NOT NULL,
   131     mid         bigint NOT NULL DEFAULT 1,
   132     mid         bigint NOT NULL DEFAULT 1,
   132     qid         bigint NULL DEFAULT NULL,
   133     qid         bigint NULL DEFAULT NULL,
   133     ssid        bigint NULL DEFAULT NULL,
   134     ssid        bigint NULL DEFAULT NULL,
   134     tid         bigint NULL DEFAULT NULL,
   135     tid         bigint NULL DEFAULT NULL,
       
   136     note        varchar NULL DEFAULT NULL,
   135     CONSTRAINT  pkey_users PRIMARY KEY (local_part, gid),
   137     CONSTRAINT  pkey_users PRIMARY KEY (local_part, gid),
   136     CONSTRAINT  ukey_users_uid UNIQUE (uid),
   138     CONSTRAINT  ukey_users_uid UNIQUE (uid),
   137     CONSTRAINT  fkey_users_gid_domain_data FOREIGN KEY (gid)
   139     CONSTRAINT  fkey_users_gid_domain_data FOREIGN KEY (gid)
   138         REFERENCES domain_data (gid),
   140         REFERENCES domain_data (gid),
   139     CONSTRAINT  fkey_users_mid_maillocation FOREIGN KEY (mid)
   141     CONSTRAINT  fkey_users_mid_maillocation FOREIGN KEY (mid)