From 45691d6448490cf637c2d9ef5ebc68ccd92b9230 Mon Sep 17 00:00:00 2001 From: Peter Amstutz Date: Wed, 13 Sep 2017 11:32:24 -0400 Subject: [PATCH] 12032: Update structure.sql from master schema + migration only. Arvados-DCO-1.1-Signed-off-by: Peter Amstutz --- services/api/db/structure.sql | 83 ++++++++++++----------------------- 1 file changed, 27 insertions(+), 56 deletions(-) diff --git a/services/api/db/structure.sql b/services/api/db/structure.sql index 4a874fbdd9..ba91b306c3 100644 --- a/services/api/db/structure.sql +++ b/services/api/db/structure.sql @@ -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: - -- -- 2.30.2