Changeset 262 for branches/dns/cgi-bin/ipdb.psql
- Timestamp:
- 06/17/05 16:42:45 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/dns/cgi-bin/ipdb.psql
r189 r262 23 23 24 24 CREATE TABLE "masterblocks" ( 25 "cidr" cidr DEFAULT '255.255.255.255/32' NOT NULL PRIMARY KEY 25 "cidr" cidr DEFAULT '255.255.255.255/32' NOT NULL PRIMARY KEY, 26 "ctime" timestamp DEFAULT now() 26 27 ); 27 28 … … 33 34 "cidr" cidr DEFAULT '255.255.255.255/32' NOT NULL PRIMARY KEY, 34 35 "maskbits" integer DEFAULT 128, 35 "city" character varying(30) DEFAULT '' 36 "city" character varying(30) DEFAULT '', 37 "ctime" timestamp DEFAULT now() 36 38 ); 37 39 … … 70 72 "circuitid" character varying(128) DEFAULT '' NOT NULL, 71 73 "newcustid" integer, 74 "createstamp" timestamp DEFAULT now(), 75 "modifystamp" timestamp DEFAULT now(), 72 76 CHECK (((available = 'y'::bpchar) OR (available = 'n'::bpchar))) 73 77 ); … … 86 90 "maskbits" integer DEFAULT 128, 87 91 "circuitid" character varying(128) DEFAULT '', 92 "createstamp" timestamp DEFAULT now(), 93 "modifystamp" timestamp DEFAULT now(), 88 94 "newcustid" integer 89 95 ); … … 112 118 113 119 CREATE TABLE "cities" ( 114 "city" character varying(30) DEFAULT '' NOT NULL PRIMARY KEY, 120 "id" serial NOT NULL PRIMARY KEY, 121 "city" character varying(30) DEFAULT '' NOT NULL, 115 122 "routing" character(1) DEFAULT 'n' NOT NULL 116 123 ); … … 119 126 GRANT ALL on "cities" to "kdeugau"; 120 127 GRANT ALL on "cities" to "ipdb"; 121 122 --123 -- Selected TOC Entries:124 --125 \connect - ipdb126 127 --128 -- TOC Entry ID 2 (OID 92809)129 --130 -- Name: alloctypes Type: TABLE Owner: ipdb131 --132 128 133 129 CREATE TABLE "alloctypes" ( … … 140 136 ); 141 137 142 --143 -- TOC Entry ID 3 (OID 92809)144 --145 -- Name: alloctypes Type: ACL Owner:146 --147 148 138 REVOKE ALL on "alloctypes" from PUBLIC; 149 139 GRANT ALL on "alloctypes" to "kdeugau"; 150 140 GRANT ALL on "alloctypes" to "ipdb"; 151 152 --153 -- Data for TOC Entry ID 4 (OID 92809)154 --155 -- Name: alloctypes Type: TABLE DATA Owner: ipdb156 --157 158 141 159 142 COPY "alloctypes" FROM stdin; … … 172 155 si Static IP - Server pool Server pool IP 20 6750400 173 156 wc Reserve for WAN blocks WAN IP blocks 200 6750400 174 wr Internal WAN block Internal WAN block 201 6750400175 pc Reserve for dynamic-route DSL netblocks Dynamic-route netblocks 202 6750400176 157 en End-use netblock End-use netblock 100 6750400 177 158 me Dialup netblock Dialup netblock 101 DIAL-RES … … 180 161 we Dynamic WiFi block Dynamic WiFi block 104 WL-RES 181 162 rm Routing Routed netblock 500 6750400 182 pr Dynamic-route DSL netblock Dynamic-route DSL 203 163 pc Reserve for dynamic-route DSL netblocks Dynamic-route netblocks 201 6750400 164 pr Dynamic-route DSL netblock Dynamic-route DSL 221 165 wr WAN block WAN block 220 6750400 183 166 \. 167 168 -- 169 -- Trigger and matching function to update modifystamp on allocations, poolips 170 -- 171 CREATE FUNCTION up_modtime () RETURNS OPAQUE AS ' 172 BEGIN 173 NEW.modifystamp := ''now''; 174 RETURN NEW; 175 END; 176 ' LANGUAGE 'plpgsql'; 177 178 CREATE TRIGGER up_modtime BEFORE UPDATE ON allocations 179 FOR EACH ROW EXECUTE PROCEDURE up_modtime(); 180 181 CREATE TRIGGER up_modtime BEFORE UPDATE ON poolips 182 FOR EACH ROW EXECUTE PROCEDURE up_modtime(); 183 184 -- 185 -- User data table - required for proper ACLs 186 -- 187 188 CREATE TABLE "users" ( 189 "username" varchar(16) NOT NULL PRIMARY KEY, 190 "password" varchar(16) DEFAULT '', 191 "acl" varchar(16) DEFAULT 'b' 192 ); 193 194 CREATE TABLE "dns" ( 195 "ip" inet NOT NULL PRIMARY KEY, 196 "hostname" character varying(128), 197 "auto" character(1) DEFAULT 'y' 198 );
Note:
See TracChangeset
for help on using the changeset viewer.