]> gitweb.michael.orlitzky.com - mailshears.git/blobdiff - test/sql/agendav.sql
mailshears.gemspec: update the version to 0.0.5.
[mailshears.git] / test / sql / agendav.sql
index e9458a9cc1ddb8f69ea312c541c7db4829cae2ef..9b84ac64f7b49b7fd7ee91677d371a187ee4fe6c 100644 (file)
@@ -3,10 +3,12 @@
 --
 
 SET statement_timeout = 0;
+SET lock_timeout = 0;
 SET client_encoding = 'UTF8';
 SET standard_conforming_strings = on;
 SET check_function_bodies = false;
 SET client_min_messages = warning;
+SET row_security = off;
 
 --
 -- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: 
@@ -29,48 +31,76 @@ SET default_tablespace = '';
 SET default_with_oids = false;
 
 --
--- Name: migrations; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
+-- Name: prefs; Type: TABLE; Schema: public; Owner: agendav
 --
 
-CREATE TABLE migrations (
-    version integer NOT NULL
+CREATE TABLE prefs (
+    username character varying(255) NOT NULL,
+    options text NOT NULL
 );
 
 
-ALTER TABLE public.migrations OWNER TO postgres;
+ALTER TABLE prefs OWNER to postgres;
 
 --
--- Name: prefs; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
+-- Name: principals; Type: TABLE; Schema: public; Owner: agendav
 --
 
-CREATE TABLE prefs (
-    username character varying(255) NOT NULL,
-    options text NOT NULL
+CREATE TABLE principals (
+    url character varying(255) NOT NULL,
+    displayname character varying(255) NOT NULL,
+    email character varying(255) NOT NULL
 );
 
 
-ALTER TABLE public.prefs OWNER TO postgres;
+ALTER TABLE principals OWNER to postgres;
 
 --
--- Name: sessions; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
+-- Name: schema_versions; Type: TABLE; Schema: public; Owner: agendav
+--
+
+CREATE TABLE schema_versions (
+    version character varying(255) NOT NULL
+);
+
+
+ALTER TABLE schema_versions OWNER to postgres;
+
+--
+-- Name: sessions; Type: TABLE; Schema: public; Owner: agendav
 --
 
 CREATE TABLE sessions (
-    session_id character varying(40) DEFAULT 0 NOT NULL,
-    ip_address character varying(16) DEFAULT 0 NOT NULL,
-    user_agent character varying(120) DEFAULT NULL::character varying,
-    last_activity bigint DEFAULT 0 NOT NULL,
-    user_data text NOT NULL
+    sess_id character varying(128) NOT NULL,
+    sess_data bytea NOT NULL,
+    sess_lifetime integer NOT NULL,
+    sess_time integer NOT NULL
+);
+
+
+ALTER TABLE sessions OWNER to postgres;
+
+--
+-- Name: shares; Type: TABLE; Schema: public; Owner: agendav
+--
+
+CREATE TABLE shares (
+    sid integer NOT NULL,
+    owner character varying(255) NOT NULL,
+    calendar character varying(255) NOT NULL,
+    "with" character varying(255) NOT NULL,
+    options text NOT NULL,
+    rw boolean NOT NULL
 );
 
 
-ALTER TABLE public.sessions OWNER TO postgres;
+ALTER TABLE shares OWNER to postgres;
 
 --
--- Name: shared_sid_seq; Type: SEQUENCE; Schema: public; Owner: postgres
+-- Name: shares_sid_seq; Type: SEQUENCE; Schema: public; Owner: agendav
 --
 
-CREATE SEQUENCE shared_sid_seq
+CREATE SEQUENCE shares_sid_seq
     START WITH 1
     INCREMENT BY 1
     NO MINVALUE
@@ -78,26 +108,24 @@ CREATE SEQUENCE shared_sid_seq
     CACHE 1;
 
 
-ALTER TABLE public.shared_sid_seq OWNER TO postgres;
+ALTER TABLE shares_sid_seq OWNER to postgres;
 
 --
--- Name: shared; Type: TABLE; Schema: public; Owner: postgres; Tablespace: 
+-- Name: shares_sid_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: agendav
 --
 
-CREATE TABLE shared (
-    sid integer DEFAULT nextval('shared_sid_seq'::regclass) NOT NULL,
-    user_from character varying(255) NOT NULL,
-    calendar character varying(255) NOT NULL,
-    user_which character varying(255) NOT NULL,
-    options text DEFAULT ''::text NOT NULL,
-    write_access boolean DEFAULT false NOT NULL
-);
+ALTER SEQUENCE shares_sid_seq OWNED BY shares.sid;
+
 
+--
+-- Name: sid; Type: DEFAULT; Schema: public; Owner: agendav
+--
+
+ALTER TABLE ONLY shares ALTER COLUMN sid SET DEFAULT nextval('shares_sid_seq'::regclass);
 
-ALTER TABLE public.shared OWNER TO postgres;
 
 --
--- Name: prefs_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
+-- Name: prefs_pkey; Type: CONSTRAINT; Schema: public; Owner: agendav
 --
 
 ALTER TABLE ONLY prefs
@@ -105,40 +133,49 @@ ALTER TABLE ONLY prefs
 
 
 --
--- Name: sessions_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
+-- Name: principals_pkey; Type: CONSTRAINT; Schema: public; Owner: agendav
 --
 
-ALTER TABLE ONLY sessions
-    ADD CONSTRAINT sessions_pkey PRIMARY KEY (session_id);
+ALTER TABLE ONLY principals
+    ADD CONSTRAINT principals_pkey PRIMARY KEY (url);
+
+
+--
+-- Name: schema_versions_pkey; Type: CONSTRAINT; Schema: public; Owner: agendav
+--
+
+ALTER TABLE ONLY schema_versions
+    ADD CONSTRAINT schema_versions_pkey PRIMARY KEY (version);
 
 
 --
--- Name: shared_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: 
+-- Name: sessions_pkey; Type: CONSTRAINT; Schema: public; Owner: agendav
 --
 
-ALTER TABLE ONLY shared
-    ADD CONSTRAINT shared_pkey PRIMARY KEY (sid);
+ALTER TABLE ONLY sessions
+    ADD CONSTRAINT sessions_pkey PRIMARY KEY (sess_id);
 
 
 --
--- Name: last_activity_idx; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
+-- Name: shares_pkey; Type: CONSTRAINT; Schema: public; Owner: agendav
 --
 
-CREATE INDEX last_activity_idx ON sessions USING btree (last_activity);
+ALTER TABLE ONLY shares
+    ADD CONSTRAINT shares_pkey PRIMARY KEY (sid);
 
 
 --
--- Name: sharedwithidx; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
+-- Name: idx_905f717c9890e20e; Type: INDEX; Schema: public; Owner: agendav
 --
 
-CREATE INDEX sharedwithidx ON shared USING btree (user_which);
+CREATE INDEX idx_905f717c9890e20e ON shares USING btree ("with");
 
 
 --
--- Name: shareidx; Type: INDEX; Schema: public; Owner: postgres; Tablespace: 
+-- Name: idx_905f717ccf60e67c6ea9a146; Type: INDEX; Schema: public; Owner: agendav
 --
 
-CREATE INDEX shareidx ON shared USING btree (user_from, calendar);
+CREATE INDEX idx_905f717ccf60e67c6ea9a146 ON shares USING btree (owner, calendar);
 
 
 --