source: trunk/dns-upd-1.2.6.sql@ 802

Last change on this file since 802 was 718, checked in by Kris Deugau, 9 years ago

/trunk

Refine SQL initial definition and 1.2.6 update file to match each other
and production.

File size: 631 bytes
Line 
1-- SQL to update DNS DB schema for 1.2.6
2
3-- Allow zones to be duplicated, so long as each version is in a unique location
4ALTER TABLE ONLY domains
5 DROP CONSTRAINT domains_pkey;
6ALTER TABLE ONLY domains
7 ADD PRIMARY KEY (domain,default_location);
8
9ALTER TABLE ONLY revzones
10 DROP CONSTRAINT revzones_pkey;
11ALTER TABLE ONLY revzones
12 ADD PRIMARY KEY (revnet,default_location);
13
14-- MIA unique constraint to match domains table. Arguably not strictly necessary.
15ALTER TABLE ONLY revzones
16 ADD CONSTRAINT revzones_rdns_id_key UNIQUE (rdns_id);
17
18-- Update dbversion
19UPDATE misc SET value='1.2.6' WHERE key='dbversion';
Note: See TracBrowser for help on using the repository browser.