Changeset 32 for trunk/dnsbl/dnsbl.sql
- Timestamp:
- 03/25/11 17:16:38 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dnsbl/dnsbl.sql
r29 r32 5 5 SET client_encoding = 'UTF8'; 6 6 SET check_function_bodies = false; 7 SET client_min_messages = warning; 7 8 8 9 -- 9 -- TOC entry 7 (OID 196077)10 10 -- Name: blocks; Type: TABLE; Schema: public; Owner: dnsbl 11 11 -- … … 16 16 orgid integer, 17 17 "level" integer DEFAULT 0, 18 comments text DEFAULT ''::text 18 comments text DEFAULT ''::text, 19 parent cidr NOT NULL, 20 ipcount integer NOT NULL 19 21 ); 20 22 21 23 22 24 -- 23 -- TOC entry 8 (OID 196085)24 25 -- Name: iplist; Type: TABLE; Schema: public; Owner: dnsbl 25 26 -- … … 29 30 count integer DEFAULT 1, 30 31 s4list boolean DEFAULT false, 31 added timestamp with time zone DEFAULT now() 32 added timestamp with time zone DEFAULT now(), 33 parent cidr NOT NULL 32 34 ); 33 35 34 36 35 37 -- 36 -- TOC entry 9 (OID 196090)37 38 -- Name: orgs; Type: TABLE; Schema: public; Owner: dnsbl 38 39 -- … … 47 48 48 49 -- 49 -- TOC entry 10 (OID 196099)50 50 -- Name: autolist; Type: TABLE; Schema: public; Owner: dnsbl 51 51 -- … … 58 58 59 59 -- 60 -- TOC entry 11 (OID 196147)61 60 -- Name: misc; Type: TABLE; Schema: public; Owner: dnsbl 62 61 -- … … 70 69 -- for tracking IPs that get removed from listing 71 70 -- note we don't want a PK on IP as with iplist, since we may end up removing an IP more than once. :/ 71 -- 72 -- Name: waslisted; Type: TABLE; Schema: public; Owner: dnsbl 73 -- 72 74 73 75 CREATE TABLE waslisted ( … … 79 81 ); 80 82 83 81 84 -- 82 -- Data for TOC entry 23 (OID 196099) 85 -- Name: autolist_pkey; Type: CONSTRAINT; Schema: public; Owner: dnsbl 86 -- 87 88 ALTER TABLE ONLY autolist 89 ADD CONSTRAINT autolist_pkey PRIMARY KEY (masklen); 90 91 92 -- 93 -- Name: blocks_pkey; Type: CONSTRAINT; Schema: public; Owner: dnsbl 94 -- 95 96 ALTER TABLE ONLY blocks 97 ADD CONSTRAINT blocks_pkey PRIMARY KEY (block); 98 99 100 -- 101 -- Name: iplist_pkey; Type: CONSTRAINT; Schema: public; Owner: dnsbl 102 -- 103 104 ALTER TABLE ONLY iplist 105 ADD CONSTRAINT iplist_pkey PRIMARY KEY (ip); 106 107 108 -- 109 -- Name: orgs_pkey; Type: CONSTRAINT; Schema: public; Owner: dnsbl 110 -- 111 112 ALTER TABLE ONLY orgs 113 ADD CONSTRAINT orgs_pkey PRIMARY KEY (orgid); 114 115 116 -- 117 -- Name: blocks_parent_index; Type: INDEX; Schema: public; Owner: dnsbl 118 -- 119 120 CREATE INDEX blocks_parent_index ON blocks USING btree (parent); 121 122 123 -- 124 -- Name: ip_parent_index; Type: INDEX; Schema: public; Owner: dnsbl 125 -- 126 127 CREATE INDEX ip_parent_index ON iplist USING btree (parent); 128 129 130 -- 131 -- Name: blocks_orgid_fkey; Type: FK CONSTRAINT; Schema: public; Owner: dnsbl 132 -- 133 134 ALTER TABLE ONLY blocks 135 ADD CONSTRAINT blocks_orgid_fkey FOREIGN KEY (orgid) REFERENCES orgs(orgid); 136 137 138 -- 83 139 -- Name: autolist; Type: TABLE DATA; Schema: public; Owner: dnsbl 84 140 -- … … 118 174 0 2147483648 119 175 \. 120 121 122 --123 -- TOC entry 12 (OID 196101)124 -- Name: blocks_pkey; Type: CONSTRAINT; Schema: public; Owner: dnsbl125 --126 127 ALTER TABLE ONLY blocks128 ADD CONSTRAINT blocks_pkey PRIMARY KEY (block);129 130 131 --132 -- TOC entry 13 (OID 196103)133 -- Name: iplist_pkey; Type: CONSTRAINT; Schema: public; Owner: dnsbl134 --135 136 ALTER TABLE ONLY iplist137 ADD CONSTRAINT iplist_pkey PRIMARY KEY (ip);138 139 140 --141 -- TOC entry 14 (OID 196105)142 -- Name: orgs_pkey; Type: CONSTRAINT; Schema: public; Owner: dnsbl143 --144 145 ALTER TABLE ONLY orgs146 ADD CONSTRAINT orgs_pkey PRIMARY KEY (orgid);147 148 149 --150 -- TOC entry 15 (OID 196215)151 -- Name: autolist_pkey; Type: CONSTRAINT; Schema: public; Owner: dnsbl152 --153 154 ALTER TABLE ONLY autolist155 ADD CONSTRAINT autolist_pkey PRIMARY KEY (masklen);156 157 158 --159 -- TOC entry 25 (OID 196107)160 -- Name: blocks_orgid_fkey; Type: FK CONSTRAINT; Schema: public; Owner: dnsbl161 --162 163 ALTER TABLE ONLY blocks164 ADD CONSTRAINT blocks_orgid_fkey FOREIGN KEY (orgid) REFERENCES orgs(orgid);165
Note:
See TracChangeset
for help on using the changeset viewer.