12032: Update structure.sql from master schema + migration only.
authorPeter Amstutz <peter.amstutz@curoverse.com>
Wed, 13 Sep 2017 15:32:24 +0000 (11:32 -0400)
committerPeter Amstutz <peter.amstutz@curoverse.com>
Thu, 14 Sep 2017 23:39:06 +0000 (19:39 -0400)
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <pamstutz@veritasgenetics.com>

services/api/db/structure.sql

index 4a874fbdd92c4985f785991a2366bf0d2c5b0f54..ba91b306c30b1a99e2c62306cbaace4df895d25a 100644 (file)
@@ -709,24 +709,12 @@ CREATE SEQUENCE links_id_seq
 ALTER SEQUENCE links_id_seq OWNED BY links.id;
 
 
---
--- Name: logs_id_seq; Type: SEQUENCE; Schema: public; Owner: -
---
-
-CREATE SEQUENCE logs_id_seq
-    START WITH 1
-    INCREMENT BY 1
-    NO MINVALUE
-    NO MAXVALUE
-    CACHE 1;
-
-
 --
 -- Name: logs; Type: TABLE; Schema: public; Owner: -
 --
 
 CREATE TABLE logs (
-    id integer DEFAULT nextval('logs_id_seq'::regclass) NOT NULL,
+    id integer NOT NULL,
     uuid character varying(255),
     owner_uuid character varying(255),
     modified_by_client_uuid character varying(255),
@@ -743,6 +731,25 @@ CREATE TABLE logs (
 );
 
 
+--
+-- Name: logs_id_seq; Type: SEQUENCE; Schema: public; Owner: -
+--
+
+CREATE SEQUENCE logs_id_seq
+    START WITH 1
+    INCREMENT BY 1
+    NO MINVALUE
+    NO MAXVALUE
+    CACHE 1;
+
+
+--
+-- Name: logs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
+--
+
+ALTER SEQUENCE logs_id_seq OWNED BY logs.id;
+
+
 --
 -- Name: users; Type: TABLE; Schema: public; Owner: -
 --
@@ -956,30 +963,6 @@ CREATE SEQUENCE pipeline_templates_id_seq
 ALTER SEQUENCE pipeline_templates_id_seq OWNED BY pipeline_templates.id;
 
 
---
--- Name: read_permissions; Type: VIEW; Schema: public; Owner: -
---
-
-CREATE VIEW read_permissions AS
- WITH RECURSIVE read_permissions(follow, user_uuid, readable_uuid) AS (
-         SELECT true AS bool,
-            users.uuid,
-            users.uuid
-           FROM users
-        UNION
-         SELECT (((links.name)::text = 'can_manage'::text) OR ((links.head_uuid)::text ~~ 'su92l-j7d0g-%'::text)) AS follow,
-            rp.user_uuid,
-            links.head_uuid
-           FROM read_permissions rp,
-            links
-          WHERE (rp.follow AND ((links.tail_uuid)::text = (rp.readable_uuid)::text))
-        )
- SELECT read_permissions.follow,
-    read_permissions.user_uuid,
-    read_permissions.readable_uuid
-   FROM read_permissions;
-
-
 --
 -- Name: repositories; Type: TABLE; Schema: public; Owner: -
 --
@@ -1016,18 +999,6 @@ CREATE SEQUENCE repositories_id_seq
 ALTER SEQUENCE repositories_id_seq OWNED BY repositories.id;
 
 
---
--- Name: rp_cache; Type: MATERIALIZED VIEW; Schema: public; Owner: -
---
-
-CREATE MATERIALIZED VIEW rp_cache AS
- SELECT read_permissions.follow,
-    read_permissions.user_uuid,
-    read_permissions.readable_uuid
-   FROM read_permissions
-  WITH NO DATA;
-
-
 --
 -- Name: schema_migrations; Type: TABLE; Schema: public; Owner: -
 --
@@ -1309,6 +1280,13 @@ ALTER TABLE ONLY keep_services ALTER COLUMN id SET DEFAULT nextval('keep_service
 ALTER TABLE ONLY links ALTER COLUMN id SET DEFAULT nextval('links_id_seq'::regclass);
 
 
+--
+-- Name: logs id; Type: DEFAULT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY logs ALTER COLUMN id SET DEFAULT nextval('logs_id_seq'::regclass);
+
+
 --
 -- Name: nodes id; Type: DEFAULT; Schema: public; Owner: -
 --
@@ -2643,13 +2621,6 @@ CREATE INDEX repositories_search_index ON repositories USING btree (uuid, owner_
 CREATE INDEX specimens_search_index ON specimens USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, material);
 
 
---
--- Name: test_1; Type: INDEX; Schema: public; Owner: -
---
-
-CREATE INDEX test_1 ON collections USING btree (id) WHERE (delete_at IS NULL);
-
-
 --
 -- Name: traits_search_index; Type: INDEX; Schema: public; Owner: -
 --