Changeset 347 for trunk/cgi-bin
- Timestamp:
- 10/06/06 12:18:44 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cgi-bin/ipdb.psql
r329 r347 1 DROP DATABASE ipdb; 2 3 CREATE USER ipdb WITH PASSWORD 'ipdbpwd'; 4 1 5 CREATE DATABASE ipdb; 2 6 7 -- Need to do this or our triggers don't work. Why do we need to do this? 8 CREATE FUNCTION "plpgsql_call_handler" () RETURNS language_handler AS '$libdir/plpgsql' LANGUAGE C; 9 CREATE TRUSTED LANGUAGE "plpgsql" HANDLER "plpgsql_call_handler"; 10 11 UPDATE pg_database SET datdba=(SELECT usesysid FROM pg_shadow WHERE usename='ipdb') 12 WHERE datname='ipdb'; 13 3 14 \connect ipdb ipdb 4 15 5 16 CREATE TABLE "customers" ( 6 "custid" character varying(16) DEFAULT '' NOT NULL PRIMARY KEY 7 "name" character varying(64) DEFAULT '', 8 "street" character varying(25) DEFAULT '', 9 "street2" character varying(25) DEFAULT '', 10 "city" character varying(30) DEFAULT '', 11 "province" character(2) DEFAULT 'ON', 12 "country" character(2) DEFAULT 'CA', 13 "pocode" character varying(7) DEFAULT '', 14 "phone" character varying(15) DEFAULT '', 15 "tech_handle" character varying(50) DEFAULT 'VH25-ORG-ARIN', 16 "abuse_handle" character varying(50) DEFAULT '', 17 "admin_handle" character varying(50) DEFAULT '', 18 "def_rdns" character varying(40) DEFAULT '', 19 "special" text DEFAULT '' 17 "custid" character varying(16) DEFAULT '' NOT NULL, 18 "name" character varying(64), 19 "street" character varying(25), 20 "street2" character varying(25), 21 "city" character varying(30), 22 "province" character(2), 23 "country" character(2), 24 "pocode" character varying(7), 25 "phone" character varying(15), 26 "tech_handle" character varying(50), 27 "abuse_handle" character varying(50), 28 "admin_handle" character varying(50), 29 "def_rdns" character varying(40), 30 "special" text, 31 Constraint "customers_pkey" Primary Key ("custid") 20 32 ); 21 33 … … 63 75 "pool" cidr DEFAULT '255.255.255.255/32' NOT NULL, 64 76 "ip" cidr DEFAULT '255.255.255.255/32' NOT NULL PRIMARY KEY, 65 " custid" character varying(16) DEFAULT '' NOT NULL,77 "oldcustid" character varying(16) DEFAULT '' NOT NULL, 66 78 "city" character varying(30) DEFAULT '' NOT NULL, 67 79 "type" character(2) DEFAULT '' NOT NULL, … … 71 83 "circuitid" character varying(128) DEFAULT '' NOT NULL, 72 84 "privdata" text DEFAULT '' NOT NULL, 73 " newcustid" character varying(16) DEFAULT '',85 "custid" character varying(16) DEFAULT '', 74 86 "createstamp" timestamp DEFAULT now(), 75 87 "modifystamp" timestamp DEFAULT now(), … … 82 94 CREATE TABLE "allocations" ( 83 95 "cidr" cidr DEFAULT '255.255.255.255/32' NOT NULL PRIMARY KEY, 84 " custid" character varying(16) DEFAULT '',96 "oldcustid" character varying(16) DEFAULT '', 85 97 "type" character(2) DEFAULT '', 86 98 "city" character varying(30) DEFAULT '', … … 92 104 "modifystamp" timestamp DEFAULT now(), 93 105 "privdata" text DEFAULT '' NOT NULL, 94 " newcustid" character varying(16) DEFAULT '',106 "custid" character varying(16) DEFAULT '', 95 107 swip character(1) DEFAULT 'n' 96 108 ); … … 110 122 "listorder" integer DEFAULT 0, 111 123 "def_custid" character varying(16) DEFAULT '', 112 "arin_netname" character varying(20) DEFA ILT 'ISP'124 "arin_netname" character varying(20) DEFAULT 'ISP' 113 125 ); 114 126 … … 140 152 pc Reserve for dynamic-route DSL netblocks Dynamic-route netblocks 201 6750400 ISP-STATIC-DSL 141 153 ac Reserve for ATM ATM blocks 202 6750400 ISP 154 fc Reserve for fibre Fibre blocks 203 6750400 ISP 142 155 wr CORE/WAN block CORE/WAN block 220 6750400 ISP 143 156 pr Dynamic-route DSL netblock Dynamic-route DSL 221 ISP 144 157 ar ATM block ATM block 222 ISP 158 fr Fibre Fibre 223 ISP 145 159 rm Routing Routed netblock 500 6750400 ISP 146 160 in Internal netblock Internal netblock 990 6750400 ISP … … 186 200 ); 187 201 202 -- Default password is admin 203 INSERT INTO users VALUES ('admin','luef5C4XumqIs','bacdsA'); 204 188 205 CREATE TABLE "dns" ( 189 206 "ip" inet NOT NULL PRIMARY KEY,
Note:
See TracChangeset
for help on using the changeset viewer.