Index: trunk/cgi-bin/ipdb-2.7-3.0.sql
===================================================================
--- trunk/cgi-bin/ipdb-2.7-3.0.sql	(revision 761)
+++ trunk/cgi-bin/ipdb-2.7-3.0.sql	(revision 762)
@@ -5,4 +5,11 @@
 -- has run, IPDB v2.7 and older will NOT be able to properly manipulate
 -- the data!
+
+-- Flag table for deciding if we can usefully do rDNS RPC calls.
+CREATE TABLE dnsavail (
+    "zone" cidr PRIMARY KEY,
+    "location" varchar(2) DEFAULT '',
+    parent_alloc integer NOT NULL
+);
 
 -- Master and routed blocks now live in the allocations table.
@@ -15,8 +22,10 @@
 ALTER TABLE allocations DROP CONSTRAINT allocations_pkey;
 ALTER TABLE allocations ADD COLUMN id serial PRIMARY KEY;
+CREATE UNIQUE INDEX allocations_skey ON allocations (cidr,vrf,type);
 
 ALTER TABLE freeblocks ADD COLUMN vrf text NOT NULL DEFAULT '';
 ALTER TABLE freeblocks ADD COLUMN parent_id integer NOT NULL DEFAULT 0;
 ALTER TABLE freeblocks ADD COLUMN master_id integer NOT NULL DEFAULT 0;
+ALTER TABLE freeblocks ADD COLUMN reserve_for integer NOT NULL DEFAULT 0;
 ALTER TABLE freeblocks DROP CONSTRAINT freeblocks_pkey;
 ALTER TABLE freeblocks ADD CONSTRAINT freeblocks_pkey PRIMARY KEY ("cidr","parent_id");
