- Timestamp:
- 04/29/16 16:39:12 (9 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dns-upd-1.2.6.sql
r704 r718 2 2 3 3 -- Allow zones to be duplicated, so long as each version is in a unique location 4 ALTER TABLE domains DROP CONSTRAINT domains_pkey; 5 ALTER TABLE domains ADD PRIMARY KEY (domain,default_location); 4 ALTER TABLE ONLY domains 5 DROP CONSTRAINT domains_pkey; 6 ALTER TABLE ONLY domains 7 ADD PRIMARY KEY (domain,default_location); 6 8 7 ALTER TABLE revzones DROP CONSTRAINT revzones_pkey; 8 ALTER TABLE revzones ADD PRIMARY KEY (revnet,default_location); 9 ALTER TABLE ONLY revzones 10 DROP CONSTRAINT revzones_pkey; 11 ALTER TABLE ONLY revzones 12 ADD PRIMARY KEY (revnet,default_location); 13 14 -- MIA unique constraint to match domains table. Arguably not strictly necessary. 15 ALTER TABLE ONLY revzones 16 ADD CONSTRAINT revzones_rdns_id_key UNIQUE (rdns_id); 17 18 -- Update dbversion 19 UPDATE misc SET value='1.2.6' WHERE key='dbversion'; -
trunk/dns.sql
r599 r718 31 31 32 32 COPY misc (misc_id, key, value) FROM stdin; 33 1 dbversion 1.2. 433 1 dbversion 1.2.6 34 34 \. 35 35 … … 86 86 CREATE TABLE domains ( 87 87 domain_id serial NOT NULL, 88 "domain" character varying(80) NOT NULL PRIMARY KEY,88 "domain" character varying(80) NOT NULL, 89 89 group_id integer DEFAULT 1 NOT NULL, 90 90 description character varying(255) DEFAULT ''::character varying NOT NULL, … … 101 101 CREATE TABLE revzones ( 102 102 rdns_id serial NOT NULL, 103 revnet cidr NOT NULL PRIMARY KEY,103 revnet cidr NOT NULL, 104 104 group_id integer DEFAULT 1 NOT NULL, 105 105 description character varying(255) DEFAULT ''::character varying NOT NULL, … … 108 108 sertype character(1) DEFAULT 'D'::bpchar, 109 109 changed boolean DEFAULT true NOT NULL, 110 default_location character varying (4) DEFAULT ''NOT NULL110 default_location character varying(4) DEFAULT ''::character varying NOT NULL 111 111 ); 112 112 CREATE INDEX rev_status_index ON revzones USING btree (status); … … 313 313 ADD CONSTRAINT domains_domain_id_key UNIQUE (domain_id); 314 314 315 ALTER TABLE ONLY domains 316 ADD CONSTRAINT domains_pkey PRIMARY KEY ("domain", default_location); 317 315 318 ALTER TABLE ONLY default_records 316 319 ADD CONSTRAINT default_records_pkey PRIMARY KEY (record_id); … … 321 324 ALTER TABLE ONLY rectypes 322 325 ADD CONSTRAINT rectypes_pkey PRIMARY KEY (val, name); 326 327 ALTER TABLE ONLY revzones 328 ADD CONSTRAINT revzones_rdns_id_key UNIQUE (rdns_id); 329 330 ALTER TABLE ONLY revzones 331 ADD CONSTRAINT revzones_pkey PRIMARY KEY (revnet, default_location); 323 332 324 333 ALTER TABLE ONLY users
Note:
See TracChangeset
for help on using the changeset viewer.