]> gitweb.michael.orlitzky.com - mailshears.git/blob - test/sql/agendav.sql
Fix ownership issues in the agendav.sql test schema.
[mailshears.git] / test / sql / agendav.sql
1 --
2 -- PostgreSQL database dump
3 --
4
5 SET statement_timeout = 0;
6 SET lock_timeout = 0;
7 SET client_encoding = 'UTF8';
8 SET standard_conforming_strings = on;
9 SET check_function_bodies = false;
10 SET client_min_messages = warning;
11 SET row_security = off;
12
13 --
14 -- Name: plpgsql; Type: EXTENSION; Schema: -; Owner:
15 --
16
17 CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
18
19
20 --
21 -- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner:
22 --
23
24 COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
25
26
27 SET search_path = public, pg_catalog;
28
29 SET default_tablespace = '';
30
31 SET default_with_oids = false;
32
33 --
34 -- Name: prefs; Type: TABLE; Schema: public; Owner: agendav
35 --
36
37 CREATE TABLE prefs (
38 username character varying(255) NOT NULL,
39 options text NOT NULL
40 );
41
42
43 ALTER TABLE prefs OWNER to postgres;
44
45 --
46 -- Name: principals; Type: TABLE; Schema: public; Owner: agendav
47 --
48
49 CREATE TABLE principals (
50 url character varying(255) NOT NULL,
51 displayname character varying(255) NOT NULL,
52 email character varying(255) NOT NULL
53 );
54
55
56 ALTER TABLE principals OWNER to postgres;
57
58 --
59 -- Name: schema_versions; Type: TABLE; Schema: public; Owner: agendav
60 --
61
62 CREATE TABLE schema_versions (
63 version character varying(255) NOT NULL
64 );
65
66
67 ALTER TABLE schema_versions OWNER to postgres;
68
69 --
70 -- Name: sessions; Type: TABLE; Schema: public; Owner: agendav
71 --
72
73 CREATE TABLE sessions (
74 sess_id character varying(128) NOT NULL,
75 sess_data bytea NOT NULL,
76 sess_lifetime integer NOT NULL,
77 sess_time integer NOT NULL
78 );
79
80
81 ALTER TABLE sessions OWNER to postgres;
82
83 --
84 -- Name: shares; Type: TABLE; Schema: public; Owner: agendav
85 --
86
87 CREATE TABLE shares (
88 sid integer NOT NULL,
89 owner character varying(255) NOT NULL,
90 calendar character varying(255) NOT NULL,
91 "with" character varying(255) NOT NULL,
92 options text NOT NULL,
93 rw boolean NOT NULL
94 );
95
96
97 ALTER TABLE shares OWNER to postgres;
98
99 --
100 -- Name: shares_sid_seq; Type: SEQUENCE; Schema: public; Owner: agendav
101 --
102
103 CREATE SEQUENCE shares_sid_seq
104 START WITH 1
105 INCREMENT BY 1
106 NO MINVALUE
107 NO MAXVALUE
108 CACHE 1;
109
110
111 ALTER TABLE shares_sid_seq OWNER to postgres;
112
113 --
114 -- Name: shares_sid_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: agendav
115 --
116
117 ALTER SEQUENCE shares_sid_seq OWNED BY shares.sid;
118
119
120 --
121 -- Name: sid; Type: DEFAULT; Schema: public; Owner: agendav
122 --
123
124 ALTER TABLE ONLY shares ALTER COLUMN sid SET DEFAULT nextval('shares_sid_seq'::regclass);
125
126
127 --
128 -- Name: prefs_pkey; Type: CONSTRAINT; Schema: public; Owner: agendav
129 --
130
131 ALTER TABLE ONLY prefs
132 ADD CONSTRAINT prefs_pkey PRIMARY KEY (username);
133
134
135 --
136 -- Name: principals_pkey; Type: CONSTRAINT; Schema: public; Owner: agendav
137 --
138
139 ALTER TABLE ONLY principals
140 ADD CONSTRAINT principals_pkey PRIMARY KEY (url);
141
142
143 --
144 -- Name: schema_versions_pkey; Type: CONSTRAINT; Schema: public; Owner: agendav
145 --
146
147 ALTER TABLE ONLY schema_versions
148 ADD CONSTRAINT schema_versions_pkey PRIMARY KEY (version);
149
150
151 --
152 -- Name: sessions_pkey; Type: CONSTRAINT; Schema: public; Owner: agendav
153 --
154
155 ALTER TABLE ONLY sessions
156 ADD CONSTRAINT sessions_pkey PRIMARY KEY (sess_id);
157
158
159 --
160 -- Name: shares_pkey; Type: CONSTRAINT; Schema: public; Owner: agendav
161 --
162
163 ALTER TABLE ONLY shares
164 ADD CONSTRAINT shares_pkey PRIMARY KEY (sid);
165
166
167 --
168 -- Name: idx_905f717c9890e20e; Type: INDEX; Schema: public; Owner: agendav
169 --
170
171 CREATE INDEX idx_905f717c9890e20e ON shares USING btree ("with");
172
173
174 --
175 -- Name: idx_905f717ccf60e67c6ea9a146; Type: INDEX; Schema: public; Owner: agendav
176 --
177
178 CREATE INDEX idx_905f717ccf60e67c6ea9a146 ON shares USING btree (owner, calendar);
179
180
181 --
182 -- Name: public; Type: ACL; Schema: -; Owner: postgres
183 --
184
185 REVOKE ALL ON SCHEMA public FROM PUBLIC;
186 REVOKE ALL ON SCHEMA public FROM postgres;
187 GRANT ALL ON SCHEMA public TO postgres;
188 GRANT ALL ON SCHEMA public TO PUBLIC;
189
190
191 --
192 -- PostgreSQL database dump complete
193 --
194