1 | --
|
---|
2 | -- PostgreSQL database dump
|
---|
3 | --
|
---|
4 |
|
---|
5 | SET client_encoding = 'UTF8';
|
---|
6 | SET check_function_bodies = false;
|
---|
7 | SET client_min_messages = warning;
|
---|
8 |
|
---|
9 | --
|
---|
10 | -- Name: SCHEMA public; Type: COMMENT; Schema: -; Owner: postgres
|
---|
11 | --
|
---|
12 |
|
---|
13 | COMMENT ON SCHEMA public IS 'Standard public schema';
|
---|
14 |
|
---|
15 |
|
---|
16 | SET search_path = public, pg_catalog;
|
---|
17 |
|
---|
18 | SET default_tablespace = '';
|
---|
19 |
|
---|
20 | SET default_with_oids = false;
|
---|
21 |
|
---|
22 | --
|
---|
23 | -- Name: blocks; Type: TABLE; Schema: public; Owner: dnsbl; Tablespace:
|
---|
24 | --
|
---|
25 |
|
---|
26 | CREATE 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 |
|
---|
39 | CREATE 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 |
|
---|
51 | CREATE 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 |
|
---|
63 | ALTER 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 |
|
---|
71 | ALTER 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 |
|
---|
79 | ALTER 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 |
|
---|
87 | ALTER 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 |
|
---|
95 | REVOKE ALL ON SCHEMA public FROM PUBLIC;
|
---|
96 | REVOKE ALL ON SCHEMA public FROM postgres;
|
---|
97 | GRANT ALL ON SCHEMA public TO postgres;
|
---|
98 | GRANT ALL ON SCHEMA public TO PUBLIC;
|
---|
99 |
|
---|
100 |
|
---|
101 | --
|
---|
102 | -- PostgreSQL database dump complete
|
---|
103 | --
|
---|
104 |
|
---|