source: trunk/dnsbl/dnsbl.sql@ 7

Last change on this file since 7 was 2, checked in by Kris Deugau, 15 years ago

/trunk/dnsbl

Import work to date

File size: 2.0 KB
Line 
1--
2-- PostgreSQL database dump
3--
4
5SET client_encoding = 'UTF8';
6SET check_function_bodies = false;
7SET client_min_messages = warning;
8
9--
10-- Name: SCHEMA public; Type: COMMENT; Schema: -; Owner: postgres
11--
12
13COMMENT ON SCHEMA public IS 'Standard public schema';
14
15
16SET search_path = public, pg_catalog;
17
18SET default_tablespace = '';
19
20SET default_with_oids = false;
21
22--
23-- Name: blocks; Type: TABLE; Schema: public; Owner: dnsbl; Tablespace:
24--
25
26CREATE TABLE blocks (
27 block cidr NOT NULL,
28 listme boolean DEFAULT false,
29 orgid integer,
30 "level" integer DEFAULT 0,
31 comments text DEFAULT ''::text
32);
33
34
35--
36-- Name: iplist; Type: TABLE; Schema: public; Owner: dnsbl; Tablespace:
37--
38
39CREATE TABLE iplist (
40 ip inet NOT NULL,
41 count integer DEFAULT 1,
42 s4list boolean DEFAULT false,
43 added timestamp with time zone DEFAULT now()
44);
45
46
47--
48-- Name: orgs; Type: TABLE; Schema: public; Owner: dnsbl; Tablespace:
49--
50
51CREATE TABLE orgs (
52 orgid serial NOT NULL,
53 listme boolean DEFAULT false,
54 orgname character varying(100) DEFAULT ''::character varying NOT NULL,
55 comments text
56);
57
58
59--
60-- Name: blocks_pkey; Type: CONSTRAINT; Schema: public; Owner: dnsbl; Tablespace:
61--
62
63ALTER TABLE ONLY blocks
64 ADD CONSTRAINT blocks_pkey PRIMARY KEY (block);
65
66
67--
68-- Name: iplist_pkey; Type: CONSTRAINT; Schema: public; Owner: dnsbl; Tablespace:
69--
70
71ALTER TABLE ONLY iplist
72 ADD CONSTRAINT iplist_pkey PRIMARY KEY (ip);
73
74
75--
76-- Name: orgs_pkey; Type: CONSTRAINT; Schema: public; Owner: dnsbl; Tablespace:
77--
78
79ALTER TABLE ONLY orgs
80 ADD CONSTRAINT orgs_pkey PRIMARY KEY (orgid);
81
82
83--
84-- Name: blocks_orgid_fkey; Type: FK CONSTRAINT; Schema: public; Owner: dnsbl
85--
86
87ALTER TABLE ONLY blocks
88 ADD CONSTRAINT blocks_orgid_fkey FOREIGN KEY (orgid) REFERENCES orgs(orgid);
89
90
91--
92-- Name: public; Type: ACL; Schema: -; Owner: postgres
93--
94
95REVOKE ALL ON SCHEMA public FROM PUBLIC;
96REVOKE ALL ON SCHEMA public FROM postgres;
97GRANT ALL ON SCHEMA public TO postgres;
98GRANT ALL ON SCHEMA public TO PUBLIC;
99
100
101--
102-- PostgreSQL database dump complete
103--
104
Note: See TracBrowser for help on using the repository browser.