Changeset 177


Ignore:
Timestamp:
03/01/05 13:33:45 (19 years ago)
Author:
Kris Deugau
Message:

/branches/stable

Update ipdb.psql database definition with corrections from
/trunk r175,176

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/cgi-bin/ipdb.psql

    r91 r177  
    1 --
    2 -- Selected TOC Entries:
    3 --
    41\connect - postgres
    52
    6 --
    7 -- TOC Entry ID 22 (OID 16556)
    8 --
    9 -- Name: "plpgsql_call_handler" () Type: FUNCTION Owner: postgres
    10 --
    11 
    12 CREATE FUNCTION "plpgsql_call_handler" () RETURNS opaque AS '$libdir/plpgsql', 'plpgsql_call_handler' LANGUAGE 'C';
    13 
    14 --
    15 -- TOC Entry ID 23 (OID 16557)
    16 --
    17 -- Name: plpgsql Type: PROCEDURAL LANGUAGE Owner:
    18 --
    19 
    20 CREATE TRUSTED PROCEDURAL LANGUAGE 'plpgsql' HANDLER "plpgsql_call_handler" LANCOMPILER '';
    21 
    22 \connect - ipdb
    23 
    24 --
    25 -- TOC Entry ID 2 (OID 25854)
    26 --
    27 -- Name: customers Type: TABLE Owner: ipdb
    28 --
     3\connect ipdb ipdb
    294
    305CREATE TABLE "customers" (
     
    4318);
    4419
    45 --
    46 -- TOC Entry ID 3 (OID 25854)
    47 --
    48 -- Name: customers Type: ACL Owner:
    49 --
    50 
    5120REVOKE ALL on "customers" from PUBLIC;
    5221GRANT ALL on "customers" to "kdeugau";
    5322GRANT ALL on "customers" to "ipdb";
    5423
    55 --
    56 -- TOC Entry ID 4 (OID 25872)
    57 --
    58 -- Name: masterblocks Type: TABLE Owner: ipdb
    59 --
    60 
    6124CREATE TABLE "masterblocks" (
    62         "cidr" cidr DEFAULT '255.255.255.255/32' NOT NULL,
    63         Constraint "masterblocks_pkey" Primary Key ("cidr")
     25        "cidr" cidr DEFAULT '255.255.255.255/32' NOT NULL PRIMARY KEY
    6426);
    65 
    66 --
    67 -- TOC Entry ID 5 (OID 25872)
    68 --
    69 -- Name: masterblocks Type: ACL Owner:
    70 --
    7127
    7228REVOKE ALL on "masterblocks" from PUBLIC;
     
    7430GRANT ALL on "masterblocks" to "ipdb";
    7531
    76 --
    77 -- TOC Entry ID 6 (OID 25875)
    78 --
    79 -- Name: routed Type: TABLE Owner: ipdb
    80 --
    81 
    8232CREATE TABLE "routed" (
    83         "cidr" cidr DEFAULT '255.255.255.255/32' NOT NULL,
     33        "cidr" cidr DEFAULT '255.255.255.255/32' NOT NULL PRIMARY KEY,
    8434        "maskbits" integer DEFAULT 128,
    85         "city" character varying(30) DEFAULT '',
    86         Constraint "routed_pkey" Primary Key ("cidr")
     35        "city" character varying(30) DEFAULT ''
    8736);
    88 
    89 --
    90 -- TOC Entry ID 7 (OID 25875)
    91 --
    92 -- Name: routed Type: ACL Owner:
    93 --
    9437
    9538REVOKE ALL on "routed" from PUBLIC;
     
    9740GRANT ALL on "routed" to "ipdb";
    9841
    99 --
    100 -- TOC Entry ID 8 (OID 31131)
    101 --
    102 -- Name: temp Type: TABLE Owner: ipdb
    103 --
    104 
    10542CREATE TABLE "temp" (
    10643        "ofs" integer
    10744);
    108 
    109 --
    110 -- TOC Entry ID 9 (OID 31131)
    111 --
    112 -- Name: temp Type: ACL Owner:
    113 --
    11445
    11546REVOKE ALL on "temp" from PUBLIC;
     
    11748GRANT ALL on "temp" to "ipdb";
    11849
    119 --
    120 -- TOC Entry ID 10 (OID 73917)
    121 --
    122 -- Name: searchme Type: VIEW Owner: ipdb
    123 --
    124 
    125 CREATE VIEW "searchme" as SELECT allocations.cidr, allocations.custid, allocations."type", allocations.city, allocations.description FROM allocations UNION SELECT poolips.ip, poolips.custid, poolips.ptype, poolips.city, poolips.description FROM poolips;
    126 
    127 --
    128 -- TOC Entry ID 11 (OID 73917)
    129 --
    130 -- Name: searchme Type: ACL Owner:
    131 --
    132 
    133 REVOKE ALL on "searchme" from PUBLIC;
    134 GRANT ALL on "searchme" to "kdeugau";
    135 GRANT ALL on "searchme" to "ipdb";
    136 
    137 --
    138 -- TOC Entry ID 12 (OID 91065)
    139 --
    140 -- Name: freeblocks Type: TABLE Owner: ipdb
    141 --
    142 
    14350CREATE TABLE "freeblocks" (
    144         "cidr" cidr DEFAULT '255.255.255.255/32' NOT NULL,
     51        "cidr" cidr DEFAULT '255.255.255.255/32' NOT NULL PRIMARY KEY
    14552        "maskbits" integer DEFAULT 128,
    14653        "city" character varying(30) DEFAULT '',
    147         "routed" character(1) DEFAULT 'n',
    148         Constraint "freeblocks_pkey" Primary Key ("cidr")
     54        "routed" character(1) DEFAULT 'n'
    14955);
    150 
    151 --
    152 -- TOC Entry ID 13 (OID 91065)
    153 --
    154 -- Name: freeblocks Type: ACL Owner:
    155 --
    15656
    15757REVOKE ALL on "freeblocks" from PUBLIC;
     
    15959GRANT ALL on "freeblocks" to "ipdb";
    16060
    161 --
    162 -- TOC Entry ID 14 (OID 92444)
    163 --
    164 -- Name: poolips Type: TABLE Owner: ipdb
    165 --
    166 
    16761CREATE TABLE "poolips" (
    16862        "pool" cidr DEFAULT '255.255.255.255/32' NOT NULL,
    169         "ip" cidr DEFAULT '255.255.255.255/32' NOT NULL,
     63        "ip" cidr DEFAULT '255.255.255.255/32' NOT NULL PRIMARY KEY,
    17064        "custid" character varying(16) DEFAULT '' NOT NULL,
    171         "city" character varying(30) DEFAULT '',
    172         "ptype" character(1) DEFAULT 'c' NOT NULL,
    173         "available" character(1) DEFAULT 'y',
    174         "notes" text DEFAULT '',
    175         "description" character varying(64) DEFAULT '',
    176         "circuitid" character varying(128) DEFAULT '',
    177         CHECK (((available = 'y'::bpchar) OR (available = 'n'::bpchar))),
    178         Constraint "poolips_pkey" Primary Key ("ip")
     65        "city" character varying(30) DEFAULT '' NOT NULL,
     66        "type" character(2) DEFAULT '' NOT NULL,
     67        "available" character(1) DEFAULT 'y' NOT NULL,
     68        "notes" text DEFAULT '' NOT NULL,
     69        "description" character varying(64) DEFAULT '' NOT NULL,
     70        "circuitid" character varying(128) DEFAULT '' NOT NULL,
     71        "newcustid" integer,
     72        CHECK (((available = 'y'::bpchar) OR (available = 'n'::bpchar)))
    17973);
    180 
    181 --
    182 -- TOC Entry ID 15 (OID 92444)
    183 --
    184 -- Name: poolips Type: ACL Owner:
    185 --
    18674
    18775REVOKE ALL on "poolips" from PUBLIC;
     
    18977GRANT ALL on "poolips" to "ipdb";
    19078
    191 --
    192 -- TOC Entry ID 16 (OID 92725)
    193 --
    194 -- Name: allocations Type: TABLE Owner: ipdb
    195 --
    196 
    19779CREATE TABLE "allocations" (
    198         "cidr" cidr DEFAULT '255.255.255.255/32' NOT NULL,
     80        "cidr" cidr DEFAULT '255.255.255.255/32' NOT NULL PRIMARY KEY,
    19981        "custid" character varying(16) DEFAULT '',
    20082        "type" character(2) DEFAULT '',
     
    20486        "maskbits" integer DEFAULT 128,
    20587        "circuitid" character varying(128) DEFAULT '',
    206         Constraint "allocations_pkey" Primary Key ("cidr")
     88        "newcustid" integer
    20789);
    208 
    209 --
    210 -- TOC Entry ID 17 (OID 92725)
    211 --
    212 -- Name: allocations Type: ACL Owner:
    213 --
    21490
    21591REVOKE ALL on "allocations" from PUBLIC;
     
    21793GRANT ALL on "allocations" to "ipdb";
    21894
    219 --
    220 -- TOC Entry ID 18 (OID 92809)
    221 --
    222 -- Name: alloctypes Type: TABLE Owner: ipdb
    223 --
     95CREATE VIEW "searchme" as SELECT allocations.cidr, allocations.custid, allocations."type", allocations.city, allocations.description FROM allocations UNION SELECT poolips.ip, poolips.custid, poolips.type, poolips.city, poolips.description FROM poolips;
     96
     97REVOKE ALL on "searchme" from PUBLIC;
     98GRANT ALL on "searchme" to "kdeugau";
     99GRANT ALL on "searchme" to "ipdb";
    224100
    225101CREATE TABLE "alloctypes" (
    226         "type" character(2) DEFAULT '' NOT NULL,
     102        "type" character(2) DEFAULT '' NOT NULL PRIMARY KEY,
    227103        "listname" character varying(40) DEFAULT '',
    228104        "dispname" character varying(40) DEFAULT '',
    229105        "listorder" integer DEFAULT 0,
    230         Constraint "alloctypes_pkey" Primary Key ("type")
     106        "def_custid" character varying(16) DEFAULT ''
    231107);
    232 
    233 --
    234 -- TOC Entry ID 19 (OID 92809)
    235 --
    236 -- Name: alloctypes Type: ACL Owner:
    237 --
    238108
    239109REVOKE ALL on "alloctypes" from PUBLIC;
     
    241111GRANT ALL on "alloctypes" to "ipdb";
    242112
    243 --
    244 -- TOC Entry ID 20 (OID 93964)
    245 --
    246 -- Name: cities Type: TABLE Owner: ipdb
    247 --
    248 
    249113CREATE TABLE "cities" (
    250         "city" character varying(30) DEFAULT '' NOT NULL,
     114        "city" character varying(30) DEFAULT '' NOT NULL PRIMARY KEY,
    251115        "routing" character(1) DEFAULT 'n' NOT NULL,
    252         Constraint "cities_pkey" Primary Key ("city")
    253116);
    254 
    255 --
    256 -- TOC Entry ID 21 (OID 93964)
    257 --
    258 -- Name: cities Type: ACL Owner:
    259 --
    260117
    261118REVOKE ALL on "cities" from PUBLIC;
Note: See TracChangeset for help on using the changeset viewer.