1 -- Copyright (C) The Arvados Authors. All rights reserved.
3 -- SPDX-License-Identifier: AGPL-3.0
5 SET statement_timeout = 0;
6 SET client_encoding = 'UTF8';
7 SET standard_conforming_strings = on;
8 SELECT pg_catalog.set_config('search_path', '', false);
9 SET check_function_bodies = false;
10 SET xmloption = content;
11 SET client_min_messages = warning;
14 -- Name: pg_trgm; Type: EXTENSION; Schema: -; Owner: -
17 CREATE EXTENSION IF NOT EXISTS pg_trgm WITH SCHEMA public;
21 -- Name: EXTENSION pg_trgm; Type: COMMENT; Schema: -; Owner: -
24 -- COMMENT ON EXTENSION pg_trgm IS 'text similarity measurement and index searching based on trigrams';
28 -- Name: compute_permission_subgraph(character varying, character varying, integer, character varying); Type: FUNCTION; Schema: public; Owner: -
31 CREATE FUNCTION public.compute_permission_subgraph(perm_origin_uuid character varying, starting_uuid character varying, starting_perm integer, perm_edge_id character varying) RETURNS TABLE(user_uuid character varying, target_uuid character varying, val integer, traverse_owned boolean)
35 /* The purpose of this function is to compute the permissions for a
36 subgraph of the database, starting from a given edge. The newly
37 computed permissions are used to add and remove rows from the main
40 perm_origin_uuid: The object that 'gets' the permission.
42 starting_uuid: The starting object the permission applies to.
44 starting_perm: The permission that perm_origin_uuid 'has' on
45 starting_uuid One of 1, 2, 3 for can_read,
46 can_write, can_manage respectively, or 0 to revoke
49 perm_edge_id: Identifies the permission edge that is being updated.
50 Changes of ownership, this is starting_uuid.
51 For links, this is the uuid of the link object.
52 This is used to override the edge value in the database
53 with starting_perm. This is necessary when revoking
54 permissions because the update happens before edge is
58 /* Starting from starting_uuid, determine the set of objects that
59 could be affected by this permission change.
61 Note: We don't traverse users unless it is an "identity"
62 permission (permission origin is self).
64 perm_from_start(perm_origin_uuid, target_uuid, val, traverse_owned) as (
67 traverse_graph(origin_uuid, target_uuid, val, traverse_owned, starting_set) as (
69 values (perm_origin_uuid, starting_uuid, starting_perm,
70 should_traverse_owned(starting_uuid, starting_perm),
71 (perm_origin_uuid = starting_uuid or starting_uuid not like '_____-tpzed-_______________'))
74 (select traverse_graph.origin_uuid,
77 case (edges.edge_id = perm_edge_id)
78 when true then starting_perm
83 should_traverse_owned(edges.head_uuid, edges.val),
85 from permission_graph_edges as edges, traverse_graph
86 where traverse_graph.target_uuid = edges.tail_uuid
87 and (edges.tail_uuid like '_____-j7d0g-_______________' or
88 traverse_graph.starting_set)))
89 select traverse_graph.origin_uuid, target_uuid, max(val) as val, bool_or(traverse_owned) as traverse_owned from traverse_graph
90 group by (traverse_graph.origin_uuid, target_uuid)
93 /* Find other inbound edges that grant permissions to 'targets' in
94 perm_from_start, and compute permissions that originate from
97 This is necessary for two reasons:
99 1) Other users may have access to a subset of the objects
100 through other permission links than the one we started from.
101 If we don't recompute them, their permission will get dropped.
103 2) There may be more than one path through which a user gets
104 permission to an object. For example, a user owns a project
105 and also shares it can_read with a group the user belongs
106 to. adding the can_read link must not overwrite the existing
107 can_manage permission granted by ownership.
109 additional_perms(perm_origin_uuid, target_uuid, val, traverse_owned) as (
112 traverse_graph(origin_uuid, target_uuid, val, traverse_owned, starting_set) as (
114 select edges.tail_uuid as origin_uuid, edges.head_uuid as target_uuid, edges.val,
115 should_traverse_owned(edges.head_uuid, edges.val),
116 edges.head_uuid like '_____-j7d0g-_______________'
117 from permission_graph_edges as edges
118 where edges.edge_id != perm_edge_id and
119 edges.tail_uuid not in (select target_uuid from perm_from_start where target_uuid like '_____-j7d0g-_______________') and
120 edges.head_uuid in (select target_uuid from perm_from_start)
123 (select traverse_graph.origin_uuid,
126 case (edges.edge_id = perm_edge_id)
127 when true then starting_perm
132 should_traverse_owned(edges.head_uuid, edges.val),
134 from permission_graph_edges as edges, traverse_graph
135 where traverse_graph.target_uuid = edges.tail_uuid
136 and (edges.tail_uuid like '_____-j7d0g-_______________' or
137 traverse_graph.starting_set)))
138 select traverse_graph.origin_uuid, target_uuid, max(val) as val, bool_or(traverse_owned) as traverse_owned from traverse_graph
139 group by (traverse_graph.origin_uuid, target_uuid)
142 /* Combine the permissions computed in the first two phases. */
143 all_perms(perm_origin_uuid, target_uuid, val, traverse_owned) as (
144 select * from perm_from_start
146 select * from additional_perms
149 /* The actual query that produces rows to be added or removed
150 from the materialized_permissions table. This is the clever
155 * For every group, the materialized_permissions lists all users
156 that can access to that group.
158 * The all_perms subquery has computed permissions on on a set of
159 objects for all inbound "origins", which are users or groups.
161 * Permissions through groups are transitive.
165 1) The materialized_permissions table declares that user X has permission N on group Y
166 2) The all_perms result has determined group Y has permission M on object Z
167 3) Therefore, user X has permission min(N, M) on object Z
169 This allows us to efficiently determine the set of users that
170 have permissions on the subset of objects, without having to
171 follow the chain of permission back up to find those users.
173 In addition, because users always have permission on themselves, this
174 query also makes sure those permission rows are always
177 select v.user_uuid, v.target_uuid, max(v.perm_level), bool_or(v.traverse_owned) from
180 least(u.val, m.perm_level) as perm_level,
182 from all_perms as u, materialized_permissions as m
183 where u.perm_origin_uuid = m.target_uuid AND m.traverse_owned
184 AND (m.user_uuid = m.target_uuid or m.target_uuid not like '_____-tpzed-_______________')
186 select target_uuid as user_uuid, target_uuid, 3, true
188 where all_perms.target_uuid like '_____-tpzed-_______________') as v
189 group by v.user_uuid, v.target_uuid
194 -- Name: project_subtree_with_trash_at(character varying, timestamp without time zone); Type: FUNCTION; Schema: public; Owner: -
197 CREATE FUNCTION public.project_subtree_with_trash_at(starting_uuid character varying, starting_trash_at timestamp without time zone) RETURNS TABLE(target_uuid character varying, trash_at timestamp without time zone)
200 /* Starting from a project, recursively traverse all the projects
201 underneath it and return a set of project uuids and trash_at times
202 (may be null). The initial trash_at can be a timestamp or null.
203 The trash_at time propagates downward to groups it owns, i.e. when a
204 group is trashed, everything underneath it in the ownership
205 hierarchy is also considered trashed. However, this is fact is
206 recorded in the trashed_groups table, not by updating trash_at field
210 project_subtree(uuid, trash_at) as (
211 values (starting_uuid, starting_trash_at)
213 select groups.uuid, LEAST(project_subtree.trash_at, groups.trash_at)
214 from groups join project_subtree on (groups.owner_uuid = project_subtree.uuid)
216 select uuid, trash_at from project_subtree;
221 -- Name: should_traverse_owned(character varying, integer); Type: FUNCTION; Schema: public; Owner: -
224 CREATE FUNCTION public.should_traverse_owned(starting_uuid character varying, starting_perm integer) RETURNS boolean
225 LANGUAGE sql IMMUTABLE
227 /* Helper function. Determines if permission on an object implies
228 transitive permission to things the object owns. This is always
229 true for groups, but only true for users when the permission level
232 select starting_uuid like '_____-j7d0g-_______________' or
233 (starting_uuid like '_____-tpzed-_______________' and starting_perm >= 3);
237 SET default_tablespace = '';
239 SET default_with_oids = false;
242 -- Name: api_client_authorizations; Type: TABLE; Schema: public; Owner: -
245 CREATE TABLE public.api_client_authorizations (
247 api_token character varying(255) NOT NULL,
248 api_client_id integer NOT NULL,
249 user_id integer NOT NULL,
250 created_by_ip_address character varying(255),
251 last_used_by_ip_address character varying(255),
252 last_used_at timestamp without time zone,
253 expires_at timestamp without time zone,
254 created_at timestamp without time zone NOT NULL,
255 updated_at timestamp without time zone NOT NULL,
256 default_owner_uuid character varying(255),
257 scopes text DEFAULT '["all"]'::text,
258 uuid character varying(255) NOT NULL
263 -- Name: api_client_authorizations_id_seq; Type: SEQUENCE; Schema: public; Owner: -
266 CREATE SEQUENCE public.api_client_authorizations_id_seq
275 -- Name: api_client_authorizations_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
278 ALTER SEQUENCE public.api_client_authorizations_id_seq OWNED BY public.api_client_authorizations.id;
282 -- Name: api_clients; Type: TABLE; Schema: public; Owner: -
285 CREATE TABLE public.api_clients (
287 uuid character varying(255),
288 owner_uuid character varying(255),
289 modified_by_client_uuid character varying(255),
290 modified_by_user_uuid character varying(255),
291 modified_at timestamp without time zone,
292 name character varying(255),
293 url_prefix character varying(255),
294 created_at timestamp without time zone NOT NULL,
295 updated_at timestamp without time zone NOT NULL,
296 is_trusted boolean DEFAULT false
301 -- Name: api_clients_id_seq; Type: SEQUENCE; Schema: public; Owner: -
304 CREATE SEQUENCE public.api_clients_id_seq
313 -- Name: api_clients_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
316 ALTER SEQUENCE public.api_clients_id_seq OWNED BY public.api_clients.id;
320 -- Name: ar_internal_metadata; Type: TABLE; Schema: public; Owner: -
323 CREATE TABLE public.ar_internal_metadata (
324 key character varying NOT NULL,
325 value character varying,
326 created_at timestamp without time zone NOT NULL,
327 updated_at timestamp without time zone NOT NULL
332 -- Name: authorized_keys; Type: TABLE; Schema: public; Owner: -
335 CREATE TABLE public.authorized_keys (
337 uuid character varying(255) NOT NULL,
338 owner_uuid character varying(255) NOT NULL,
339 modified_by_client_uuid character varying(255),
340 modified_by_user_uuid character varying(255),
341 modified_at timestamp without time zone,
342 name character varying(255),
343 key_type character varying(255),
344 authorized_user_uuid character varying(255),
346 expires_at timestamp without time zone,
347 created_at timestamp without time zone NOT NULL,
348 updated_at timestamp without time zone NOT NULL
353 -- Name: authorized_keys_id_seq; Type: SEQUENCE; Schema: public; Owner: -
356 CREATE SEQUENCE public.authorized_keys_id_seq
365 -- Name: authorized_keys_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
368 ALTER SEQUENCE public.authorized_keys_id_seq OWNED BY public.authorized_keys.id;
372 -- Name: collections; Type: TABLE; Schema: public; Owner: -
375 CREATE TABLE public.collections (
377 owner_uuid character varying(255),
378 created_at timestamp without time zone NOT NULL,
379 modified_by_client_uuid character varying(255),
380 modified_by_user_uuid character varying(255),
381 modified_at timestamp without time zone,
382 portable_data_hash character varying(255),
383 replication_desired integer,
384 replication_confirmed_at timestamp without time zone,
385 replication_confirmed integer,
386 updated_at timestamp without time zone NOT NULL,
387 uuid character varying(255),
389 name character varying(255),
390 description character varying(524288),
392 delete_at timestamp without time zone,
394 trash_at timestamp without time zone,
395 is_trashed boolean DEFAULT false NOT NULL,
396 storage_classes_desired jsonb DEFAULT '["default"]'::jsonb,
397 storage_classes_confirmed jsonb DEFAULT '[]'::jsonb,
398 storage_classes_confirmed_at timestamp without time zone,
399 current_version_uuid character varying,
400 version integer DEFAULT 1 NOT NULL,
401 preserve_version boolean DEFAULT false,
402 file_count integer DEFAULT 0 NOT NULL,
403 file_size_total bigint DEFAULT 0 NOT NULL
408 -- Name: collections_id_seq; Type: SEQUENCE; Schema: public; Owner: -
411 CREATE SEQUENCE public.collections_id_seq
420 -- Name: collections_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
423 ALTER SEQUENCE public.collections_id_seq OWNED BY public.collections.id;
427 -- Name: container_requests; Type: TABLE; Schema: public; Owner: -
430 CREATE TABLE public.container_requests (
432 uuid character varying(255),
433 owner_uuid character varying(255),
434 created_at timestamp without time zone NOT NULL,
435 modified_at timestamp without time zone,
436 modified_by_client_uuid character varying(255),
437 modified_by_user_uuid character varying(255),
438 name character varying(255),
441 state character varying(255),
442 requesting_container_uuid character varying(255),
443 container_uuid character varying(255),
444 container_count_max integer,
446 runtime_constraints text,
447 container_image character varying(255),
449 cwd character varying(255),
451 output_path character varying(255),
453 expires_at timestamp without time zone,
455 updated_at timestamp without time zone NOT NULL,
456 container_count integer DEFAULT 0,
457 use_existing boolean DEFAULT true,
458 scheduling_parameters text,
459 output_uuid character varying(255),
460 log_uuid character varying(255),
461 output_name character varying(255) DEFAULT NULL::character varying,
462 output_ttl integer DEFAULT 0 NOT NULL,
463 secret_mounts jsonb DEFAULT '{}'::jsonb,
465 output_storage_classes jsonb DEFAULT '["default"]'::jsonb
470 -- Name: container_requests_id_seq; Type: SEQUENCE; Schema: public; Owner: -
473 CREATE SEQUENCE public.container_requests_id_seq
482 -- Name: container_requests_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
485 ALTER SEQUENCE public.container_requests_id_seq OWNED BY public.container_requests.id;
489 -- Name: containers; Type: TABLE; Schema: public; Owner: -
492 CREATE TABLE public.containers (
494 uuid character varying(255),
495 owner_uuid character varying(255),
496 created_at timestamp without time zone NOT NULL,
497 modified_at timestamp without time zone,
498 modified_by_client_uuid character varying(255),
499 modified_by_user_uuid character varying(255),
500 state character varying(255),
501 started_at timestamp without time zone,
502 finished_at timestamp without time zone,
503 log character varying(255),
505 cwd character varying(255),
507 output_path character varying(255),
509 runtime_constraints text,
510 output character varying(255),
511 container_image character varying(255),
512 progress double precision,
514 updated_at timestamp without time zone NOT NULL,
516 auth_uuid character varying(255),
517 locked_by_uuid character varying(255),
518 scheduling_parameters text,
519 secret_mounts jsonb DEFAULT '{}'::jsonb,
520 secret_mounts_md5 character varying DEFAULT '99914b932bd37a50b983c5e7c90ae93b'::character varying,
521 runtime_status jsonb DEFAULT '{}'::jsonb,
522 runtime_user_uuid text,
523 runtime_auth_scopes jsonb,
525 lock_count integer DEFAULT 0 NOT NULL,
526 gateway_address character varying,
527 interactive_session_started boolean DEFAULT false NOT NULL,
528 output_storage_classes jsonb DEFAULT '["default"]'::jsonb
533 -- Name: containers_id_seq; Type: SEQUENCE; Schema: public; Owner: -
536 CREATE SEQUENCE public.containers_id_seq
545 -- Name: containers_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
548 ALTER SEQUENCE public.containers_id_seq OWNED BY public.containers.id;
552 -- Name: groups; Type: TABLE; Schema: public; Owner: -
555 CREATE TABLE public.groups (
557 uuid character varying(255),
558 owner_uuid character varying(255),
559 created_at timestamp without time zone NOT NULL,
560 modified_by_client_uuid character varying(255),
561 modified_by_user_uuid character varying(255),
562 modified_at timestamp without time zone,
563 name character varying(255) NOT NULL,
564 description character varying(524288),
565 updated_at timestamp without time zone NOT NULL,
566 group_class character varying(255),
567 trash_at timestamp without time zone,
568 is_trashed boolean DEFAULT false NOT NULL,
569 delete_at timestamp without time zone,
570 properties jsonb DEFAULT '{}'::jsonb,
571 frozen_by_uuid character varying
576 -- Name: groups_id_seq; Type: SEQUENCE; Schema: public; Owner: -
579 CREATE SEQUENCE public.groups_id_seq
588 -- Name: groups_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
591 ALTER SEQUENCE public.groups_id_seq OWNED BY public.groups.id;
595 -- Name: humans; Type: TABLE; Schema: public; Owner: -
598 CREATE TABLE public.humans (
600 uuid character varying(255) NOT NULL,
601 owner_uuid character varying(255) NOT NULL,
602 modified_by_client_uuid character varying(255),
603 modified_by_user_uuid character varying(255),
604 modified_at timestamp without time zone,
606 created_at timestamp without time zone NOT NULL,
607 updated_at timestamp without time zone NOT NULL
612 -- Name: humans_id_seq; Type: SEQUENCE; Schema: public; Owner: -
615 CREATE SEQUENCE public.humans_id_seq
624 -- Name: humans_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
627 ALTER SEQUENCE public.humans_id_seq OWNED BY public.humans.id;
631 -- Name: job_tasks; Type: TABLE; Schema: public; Owner: -
634 CREATE TABLE public.job_tasks (
636 uuid character varying(255),
637 owner_uuid character varying(255),
638 modified_by_client_uuid character varying(255),
639 modified_by_user_uuid character varying(255),
640 modified_at timestamp without time zone,
641 job_uuid character varying(255),
645 progress double precision,
647 created_at timestamp without time zone NOT NULL,
648 updated_at timestamp without time zone NOT NULL,
649 created_by_job_task_uuid character varying(255),
651 started_at timestamp without time zone,
652 finished_at timestamp without time zone
657 -- Name: job_tasks_id_seq; Type: SEQUENCE; Schema: public; Owner: -
660 CREATE SEQUENCE public.job_tasks_id_seq
669 -- Name: job_tasks_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
672 ALTER SEQUENCE public.job_tasks_id_seq OWNED BY public.job_tasks.id;
676 -- Name: job_tasks_qsequence_seq; Type: SEQUENCE; Schema: public; Owner: -
679 CREATE SEQUENCE public.job_tasks_qsequence_seq
688 -- Name: job_tasks_qsequence_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
691 ALTER SEQUENCE public.job_tasks_qsequence_seq OWNED BY public.job_tasks.qsequence;
695 -- Name: jobs; Type: TABLE; Schema: public; Owner: -
698 CREATE TABLE public.jobs (
700 uuid character varying(255),
701 owner_uuid character varying(255),
702 modified_by_client_uuid character varying(255),
703 modified_by_user_uuid character varying(255),
704 modified_at timestamp without time zone,
705 submit_id character varying(255),
706 script character varying(255),
707 script_version character varying(255),
708 script_parameters text,
709 cancelled_by_client_uuid character varying(255),
710 cancelled_by_user_uuid character varying(255),
711 cancelled_at timestamp without time zone,
712 started_at timestamp without time zone,
713 finished_at timestamp without time zone,
716 output character varying(255),
717 created_at timestamp without time zone NOT NULL,
718 updated_at timestamp without time zone NOT NULL,
719 is_locked_by_uuid character varying(255),
720 log character varying(255),
722 runtime_constraints text,
723 nondeterministic boolean,
724 repository character varying(255),
725 supplied_script_version character varying(255),
726 docker_image_locator character varying(255),
727 priority integer DEFAULT 0 NOT NULL,
728 description character varying(524288),
729 state character varying(255),
730 arvados_sdk_version character varying(255),
732 script_parameters_digest character varying(255)
737 -- Name: jobs_id_seq; Type: SEQUENCE; Schema: public; Owner: -
740 CREATE SEQUENCE public.jobs_id_seq
749 -- Name: jobs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
752 ALTER SEQUENCE public.jobs_id_seq OWNED BY public.jobs.id;
756 -- Name: keep_disks; Type: TABLE; Schema: public; Owner: -
759 CREATE TABLE public.keep_disks (
761 uuid character varying(255) NOT NULL,
762 owner_uuid character varying(255) NOT NULL,
763 modified_by_client_uuid character varying(255),
764 modified_by_user_uuid character varying(255),
765 modified_at timestamp without time zone,
766 ping_secret character varying(255) NOT NULL,
767 node_uuid character varying(255),
768 filesystem_uuid character varying(255),
771 is_readable boolean DEFAULT true NOT NULL,
772 is_writable boolean DEFAULT true NOT NULL,
773 last_read_at timestamp without time zone,
774 last_write_at timestamp without time zone,
775 last_ping_at timestamp without time zone,
776 created_at timestamp without time zone NOT NULL,
777 updated_at timestamp without time zone NOT NULL,
778 keep_service_uuid character varying(255)
783 -- Name: keep_disks_id_seq; Type: SEQUENCE; Schema: public; Owner: -
786 CREATE SEQUENCE public.keep_disks_id_seq
795 -- Name: keep_disks_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
798 ALTER SEQUENCE public.keep_disks_id_seq OWNED BY public.keep_disks.id;
802 -- Name: keep_services; Type: TABLE; Schema: public; Owner: -
805 CREATE TABLE public.keep_services (
807 uuid character varying(255) NOT NULL,
808 owner_uuid character varying(255) NOT NULL,
809 modified_by_client_uuid character varying(255),
810 modified_by_user_uuid character varying(255),
811 modified_at timestamp without time zone,
812 service_host character varying(255),
813 service_port integer,
814 service_ssl_flag boolean,
815 service_type character varying(255),
816 created_at timestamp without time zone NOT NULL,
817 updated_at timestamp without time zone NOT NULL,
818 read_only boolean DEFAULT false NOT NULL
823 -- Name: keep_services_id_seq; Type: SEQUENCE; Schema: public; Owner: -
826 CREATE SEQUENCE public.keep_services_id_seq
835 -- Name: keep_services_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
838 ALTER SEQUENCE public.keep_services_id_seq OWNED BY public.keep_services.id;
842 -- Name: links; Type: TABLE; Schema: public; Owner: -
845 CREATE TABLE public.links (
847 uuid character varying(255),
848 owner_uuid character varying(255),
849 created_at timestamp without time zone NOT NULL,
850 modified_by_client_uuid character varying(255),
851 modified_by_user_uuid character varying(255),
852 modified_at timestamp without time zone,
853 tail_uuid character varying(255),
854 link_class character varying(255),
855 name character varying(255),
856 head_uuid character varying(255),
858 updated_at timestamp without time zone NOT NULL
863 -- Name: links_id_seq; Type: SEQUENCE; Schema: public; Owner: -
866 CREATE SEQUENCE public.links_id_seq
875 -- Name: links_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
878 ALTER SEQUENCE public.links_id_seq OWNED BY public.links.id;
882 -- Name: logs; Type: TABLE; Schema: public; Owner: -
885 CREATE TABLE public.logs (
887 uuid character varying(255),
888 owner_uuid character varying(255),
889 modified_by_client_uuid character varying(255),
890 modified_by_user_uuid character varying(255),
891 object_uuid character varying(255),
892 event_at timestamp without time zone,
893 event_type character varying(255),
896 created_at timestamp without time zone NOT NULL,
897 updated_at timestamp without time zone NOT NULL,
898 modified_at timestamp without time zone,
899 object_owner_uuid character varying(255)
904 -- Name: logs_id_seq; Type: SEQUENCE; Schema: public; Owner: -
907 CREATE SEQUENCE public.logs_id_seq
916 -- Name: logs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
919 ALTER SEQUENCE public.logs_id_seq OWNED BY public.logs.id;
923 -- Name: materialized_permissions; Type: TABLE; Schema: public; Owner: -
926 CREATE TABLE public.materialized_permissions (
927 user_uuid character varying,
928 target_uuid character varying,
930 traverse_owned boolean
935 -- Name: nodes; Type: TABLE; Schema: public; Owner: -
938 CREATE TABLE public.nodes (
940 uuid character varying(255),
941 owner_uuid character varying(255),
942 created_at timestamp without time zone NOT NULL,
943 modified_by_client_uuid character varying(255),
944 modified_by_user_uuid character varying(255),
945 modified_at timestamp without time zone,
947 hostname character varying(255),
948 domain character varying(255),
949 ip_address character varying(255),
950 first_ping_at timestamp without time zone,
951 last_ping_at timestamp without time zone,
953 updated_at timestamp without time zone NOT NULL,
955 job_uuid character varying(255)
960 -- Name: nodes_id_seq; Type: SEQUENCE; Schema: public; Owner: -
963 CREATE SEQUENCE public.nodes_id_seq
972 -- Name: nodes_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
975 ALTER SEQUENCE public.nodes_id_seq OWNED BY public.nodes.id;
979 -- Name: users; Type: TABLE; Schema: public; Owner: -
982 CREATE TABLE public.users (
984 uuid character varying(255),
985 owner_uuid character varying(255) NOT NULL,
986 created_at timestamp without time zone NOT NULL,
987 modified_by_client_uuid character varying(255),
988 modified_by_user_uuid character varying(255),
989 modified_at timestamp without time zone,
990 email character varying(255),
991 first_name character varying(255),
992 last_name character varying(255),
993 identity_url character varying(255),
996 updated_at timestamp without time zone NOT NULL,
997 default_owner_uuid character varying(255),
998 is_active boolean DEFAULT false,
999 username character varying(255),
1000 redirect_to_user_uuid character varying
1005 -- Name: permission_graph_edges; Type: VIEW; Schema: public; Owner: -
1008 CREATE VIEW public.permission_graph_edges AS
1009 SELECT groups.owner_uuid AS tail_uuid,
1010 groups.uuid AS head_uuid,
1012 groups.uuid AS edge_id
1015 SELECT users.owner_uuid AS tail_uuid,
1016 users.uuid AS head_uuid,
1018 users.uuid AS edge_id
1021 SELECT users.uuid AS tail_uuid,
1022 users.uuid AS head_uuid,
1024 ''::character varying AS edge_id
1027 SELECT links.tail_uuid,
1030 WHEN ((links.name)::text = 'can_read'::text) THEN 1
1031 WHEN ((links.name)::text = 'can_login'::text) THEN 1
1032 WHEN ((links.name)::text = 'can_write'::text) THEN 2
1033 WHEN ((links.name)::text = 'can_manage'::text) THEN 3
1036 links.uuid AS edge_id
1038 WHERE ((links.link_class)::text = 'permission'::text);
1042 -- Name: pipeline_instances; Type: TABLE; Schema: public; Owner: -
1045 CREATE TABLE public.pipeline_instances (
1046 id integer NOT NULL,
1047 uuid character varying(255),
1048 owner_uuid character varying(255),
1049 created_at timestamp without time zone NOT NULL,
1050 modified_by_client_uuid character varying(255),
1051 modified_by_user_uuid character varying(255),
1052 modified_at timestamp without time zone,
1053 pipeline_template_uuid character varying(255),
1054 name character varying(255),
1056 updated_at timestamp without time zone NOT NULL,
1058 state character varying(255),
1059 components_summary text,
1060 started_at timestamp without time zone,
1061 finished_at timestamp without time zone,
1062 description character varying(524288)
1067 -- Name: pipeline_instances_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1070 CREATE SEQUENCE public.pipeline_instances_id_seq
1079 -- Name: pipeline_instances_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1082 ALTER SEQUENCE public.pipeline_instances_id_seq OWNED BY public.pipeline_instances.id;
1086 -- Name: pipeline_templates; Type: TABLE; Schema: public; Owner: -
1089 CREATE TABLE public.pipeline_templates (
1090 id integer NOT NULL,
1091 uuid character varying(255),
1092 owner_uuid character varying(255),
1093 created_at timestamp without time zone NOT NULL,
1094 modified_by_client_uuid character varying(255),
1095 modified_by_user_uuid character varying(255),
1096 modified_at timestamp without time zone,
1097 name character varying(255),
1099 updated_at timestamp without time zone NOT NULL,
1100 description character varying(524288)
1105 -- Name: pipeline_templates_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1108 CREATE SEQUENCE public.pipeline_templates_id_seq
1117 -- Name: pipeline_templates_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1120 ALTER SEQUENCE public.pipeline_templates_id_seq OWNED BY public.pipeline_templates.id;
1124 -- Name: repositories; Type: TABLE; Schema: public; Owner: -
1127 CREATE TABLE public.repositories (
1128 id integer NOT NULL,
1129 uuid character varying(255) NOT NULL,
1130 owner_uuid character varying(255) NOT NULL,
1131 modified_by_client_uuid character varying(255),
1132 modified_by_user_uuid character varying(255),
1133 modified_at timestamp without time zone,
1134 name character varying(255),
1135 created_at timestamp without time zone NOT NULL,
1136 updated_at timestamp without time zone NOT NULL
1141 -- Name: repositories_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1144 CREATE SEQUENCE public.repositories_id_seq
1153 -- Name: repositories_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1156 ALTER SEQUENCE public.repositories_id_seq OWNED BY public.repositories.id;
1160 -- Name: schema_migrations; Type: TABLE; Schema: public; Owner: -
1163 CREATE TABLE public.schema_migrations (
1164 version character varying(255) NOT NULL
1169 -- Name: specimens; Type: TABLE; Schema: public; Owner: -
1172 CREATE TABLE public.specimens (
1173 id integer NOT NULL,
1174 uuid character varying(255),
1175 owner_uuid character varying(255),
1176 created_at timestamp without time zone NOT NULL,
1177 modified_by_client_uuid character varying(255),
1178 modified_by_user_uuid character varying(255),
1179 modified_at timestamp without time zone,
1180 material character varying(255),
1181 updated_at timestamp without time zone NOT NULL,
1187 -- Name: specimens_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1190 CREATE SEQUENCE public.specimens_id_seq
1199 -- Name: specimens_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1202 ALTER SEQUENCE public.specimens_id_seq OWNED BY public.specimens.id;
1206 -- Name: traits; Type: TABLE; Schema: public; Owner: -
1209 CREATE TABLE public.traits (
1210 id integer NOT NULL,
1211 uuid character varying(255) NOT NULL,
1212 owner_uuid character varying(255) NOT NULL,
1213 modified_by_client_uuid character varying(255),
1214 modified_by_user_uuid character varying(255),
1215 modified_at timestamp without time zone,
1216 name character varying(255),
1218 created_at timestamp without time zone NOT NULL,
1219 updated_at timestamp without time zone NOT NULL
1224 -- Name: traits_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1227 CREATE SEQUENCE public.traits_id_seq
1236 -- Name: traits_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1239 ALTER SEQUENCE public.traits_id_seq OWNED BY public.traits.id;
1243 -- Name: trashed_groups; Type: TABLE; Schema: public; Owner: -
1246 CREATE TABLE public.trashed_groups (
1247 group_uuid character varying,
1248 trash_at timestamp without time zone
1253 -- Name: users_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1256 CREATE SEQUENCE public.users_id_seq
1265 -- Name: users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1268 ALTER SEQUENCE public.users_id_seq OWNED BY public.users.id;
1272 -- Name: virtual_machines; Type: TABLE; Schema: public; Owner: -
1275 CREATE TABLE public.virtual_machines (
1276 id integer NOT NULL,
1277 uuid character varying(255) NOT NULL,
1278 owner_uuid character varying(255) NOT NULL,
1279 modified_by_client_uuid character varying(255),
1280 modified_by_user_uuid character varying(255),
1281 modified_at timestamp without time zone,
1282 hostname character varying(255),
1283 created_at timestamp without time zone NOT NULL,
1284 updated_at timestamp without time zone NOT NULL
1289 -- Name: virtual_machines_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1292 CREATE SEQUENCE public.virtual_machines_id_seq
1301 -- Name: virtual_machines_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1304 ALTER SEQUENCE public.virtual_machines_id_seq OWNED BY public.virtual_machines.id;
1308 -- Name: workflows; Type: TABLE; Schema: public; Owner: -
1311 CREATE TABLE public.workflows (
1312 id integer NOT NULL,
1313 uuid character varying(255),
1314 owner_uuid character varying(255),
1315 created_at timestamp without time zone NOT NULL,
1316 modified_at timestamp without time zone,
1317 modified_by_client_uuid character varying(255),
1318 modified_by_user_uuid character varying(255),
1319 name character varying(255),
1322 updated_at timestamp without time zone NOT NULL
1327 -- Name: workflows_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1330 CREATE SEQUENCE public.workflows_id_seq
1339 -- Name: workflows_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1342 ALTER SEQUENCE public.workflows_id_seq OWNED BY public.workflows.id;
1346 -- Name: api_client_authorizations id; Type: DEFAULT; Schema: public; Owner: -
1349 ALTER TABLE ONLY public.api_client_authorizations ALTER COLUMN id SET DEFAULT nextval('public.api_client_authorizations_id_seq'::regclass);
1353 -- Name: api_clients id; Type: DEFAULT; Schema: public; Owner: -
1356 ALTER TABLE ONLY public.api_clients ALTER COLUMN id SET DEFAULT nextval('public.api_clients_id_seq'::regclass);
1360 -- Name: authorized_keys id; Type: DEFAULT; Schema: public; Owner: -
1363 ALTER TABLE ONLY public.authorized_keys ALTER COLUMN id SET DEFAULT nextval('public.authorized_keys_id_seq'::regclass);
1367 -- Name: collections id; Type: DEFAULT; Schema: public; Owner: -
1370 ALTER TABLE ONLY public.collections ALTER COLUMN id SET DEFAULT nextval('public.collections_id_seq'::regclass);
1374 -- Name: container_requests id; Type: DEFAULT; Schema: public; Owner: -
1377 ALTER TABLE ONLY public.container_requests ALTER COLUMN id SET DEFAULT nextval('public.container_requests_id_seq'::regclass);
1381 -- Name: containers id; Type: DEFAULT; Schema: public; Owner: -
1384 ALTER TABLE ONLY public.containers ALTER COLUMN id SET DEFAULT nextval('public.containers_id_seq'::regclass);
1388 -- Name: groups id; Type: DEFAULT; Schema: public; Owner: -
1391 ALTER TABLE ONLY public.groups ALTER COLUMN id SET DEFAULT nextval('public.groups_id_seq'::regclass);
1395 -- Name: humans id; Type: DEFAULT; Schema: public; Owner: -
1398 ALTER TABLE ONLY public.humans ALTER COLUMN id SET DEFAULT nextval('public.humans_id_seq'::regclass);
1402 -- Name: job_tasks id; Type: DEFAULT; Schema: public; Owner: -
1405 ALTER TABLE ONLY public.job_tasks ALTER COLUMN id SET DEFAULT nextval('public.job_tasks_id_seq'::regclass);
1409 -- Name: jobs id; Type: DEFAULT; Schema: public; Owner: -
1412 ALTER TABLE ONLY public.jobs ALTER COLUMN id SET DEFAULT nextval('public.jobs_id_seq'::regclass);
1416 -- Name: keep_disks id; Type: DEFAULT; Schema: public; Owner: -
1419 ALTER TABLE ONLY public.keep_disks ALTER COLUMN id SET DEFAULT nextval('public.keep_disks_id_seq'::regclass);
1423 -- Name: keep_services id; Type: DEFAULT; Schema: public; Owner: -
1426 ALTER TABLE ONLY public.keep_services ALTER COLUMN id SET DEFAULT nextval('public.keep_services_id_seq'::regclass);
1430 -- Name: links id; Type: DEFAULT; Schema: public; Owner: -
1433 ALTER TABLE ONLY public.links ALTER COLUMN id SET DEFAULT nextval('public.links_id_seq'::regclass);
1437 -- Name: logs id; Type: DEFAULT; Schema: public; Owner: -
1440 ALTER TABLE ONLY public.logs ALTER COLUMN id SET DEFAULT nextval('public.logs_id_seq'::regclass);
1444 -- Name: nodes id; Type: DEFAULT; Schema: public; Owner: -
1447 ALTER TABLE ONLY public.nodes ALTER COLUMN id SET DEFAULT nextval('public.nodes_id_seq'::regclass);
1451 -- Name: pipeline_instances id; Type: DEFAULT; Schema: public; Owner: -
1454 ALTER TABLE ONLY public.pipeline_instances ALTER COLUMN id SET DEFAULT nextval('public.pipeline_instances_id_seq'::regclass);
1458 -- Name: pipeline_templates id; Type: DEFAULT; Schema: public; Owner: -
1461 ALTER TABLE ONLY public.pipeline_templates ALTER COLUMN id SET DEFAULT nextval('public.pipeline_templates_id_seq'::regclass);
1465 -- Name: repositories id; Type: DEFAULT; Schema: public; Owner: -
1468 ALTER TABLE ONLY public.repositories ALTER COLUMN id SET DEFAULT nextval('public.repositories_id_seq'::regclass);
1472 -- Name: specimens id; Type: DEFAULT; Schema: public; Owner: -
1475 ALTER TABLE ONLY public.specimens ALTER COLUMN id SET DEFAULT nextval('public.specimens_id_seq'::regclass);
1479 -- Name: traits id; Type: DEFAULT; Schema: public; Owner: -
1482 ALTER TABLE ONLY public.traits ALTER COLUMN id SET DEFAULT nextval('public.traits_id_seq'::regclass);
1486 -- Name: users id; Type: DEFAULT; Schema: public; Owner: -
1489 ALTER TABLE ONLY public.users ALTER COLUMN id SET DEFAULT nextval('public.users_id_seq'::regclass);
1493 -- Name: virtual_machines id; Type: DEFAULT; Schema: public; Owner: -
1496 ALTER TABLE ONLY public.virtual_machines ALTER COLUMN id SET DEFAULT nextval('public.virtual_machines_id_seq'::regclass);
1500 -- Name: workflows id; Type: DEFAULT; Schema: public; Owner: -
1503 ALTER TABLE ONLY public.workflows ALTER COLUMN id SET DEFAULT nextval('public.workflows_id_seq'::regclass);
1507 -- Name: api_client_authorizations api_client_authorizations_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1510 ALTER TABLE ONLY public.api_client_authorizations
1511 ADD CONSTRAINT api_client_authorizations_pkey PRIMARY KEY (id);
1515 -- Name: api_clients api_clients_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1518 ALTER TABLE ONLY public.api_clients
1519 ADD CONSTRAINT api_clients_pkey PRIMARY KEY (id);
1523 -- Name: ar_internal_metadata ar_internal_metadata_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1526 ALTER TABLE ONLY public.ar_internal_metadata
1527 ADD CONSTRAINT ar_internal_metadata_pkey PRIMARY KEY (key);
1531 -- Name: authorized_keys authorized_keys_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1534 ALTER TABLE ONLY public.authorized_keys
1535 ADD CONSTRAINT authorized_keys_pkey PRIMARY KEY (id);
1539 -- Name: collections collections_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1542 ALTER TABLE ONLY public.collections
1543 ADD CONSTRAINT collections_pkey PRIMARY KEY (id);
1547 -- Name: container_requests container_requests_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1550 ALTER TABLE ONLY public.container_requests
1551 ADD CONSTRAINT container_requests_pkey PRIMARY KEY (id);
1555 -- Name: containers containers_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1558 ALTER TABLE ONLY public.containers
1559 ADD CONSTRAINT containers_pkey PRIMARY KEY (id);
1563 -- Name: groups groups_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1566 ALTER TABLE ONLY public.groups
1567 ADD CONSTRAINT groups_pkey PRIMARY KEY (id);
1571 -- Name: humans humans_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1574 ALTER TABLE ONLY public.humans
1575 ADD CONSTRAINT humans_pkey PRIMARY KEY (id);
1579 -- Name: job_tasks job_tasks_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1582 ALTER TABLE ONLY public.job_tasks
1583 ADD CONSTRAINT job_tasks_pkey PRIMARY KEY (id);
1587 -- Name: jobs jobs_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1590 ALTER TABLE ONLY public.jobs
1591 ADD CONSTRAINT jobs_pkey PRIMARY KEY (id);
1595 -- Name: keep_disks keep_disks_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1598 ALTER TABLE ONLY public.keep_disks
1599 ADD CONSTRAINT keep_disks_pkey PRIMARY KEY (id);
1603 -- Name: keep_services keep_services_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1606 ALTER TABLE ONLY public.keep_services
1607 ADD CONSTRAINT keep_services_pkey PRIMARY KEY (id);
1611 -- Name: links links_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1614 ALTER TABLE ONLY public.links
1615 ADD CONSTRAINT links_pkey PRIMARY KEY (id);
1619 -- Name: logs logs_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1622 ALTER TABLE ONLY public.logs
1623 ADD CONSTRAINT logs_pkey PRIMARY KEY (id);
1627 -- Name: nodes nodes_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1630 ALTER TABLE ONLY public.nodes
1631 ADD CONSTRAINT nodes_pkey PRIMARY KEY (id);
1635 -- Name: pipeline_instances pipeline_instances_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1638 ALTER TABLE ONLY public.pipeline_instances
1639 ADD CONSTRAINT pipeline_instances_pkey PRIMARY KEY (id);
1643 -- Name: pipeline_templates pipeline_templates_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1646 ALTER TABLE ONLY public.pipeline_templates
1647 ADD CONSTRAINT pipeline_templates_pkey PRIMARY KEY (id);
1651 -- Name: repositories repositories_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1654 ALTER TABLE ONLY public.repositories
1655 ADD CONSTRAINT repositories_pkey PRIMARY KEY (id);
1659 -- Name: specimens specimens_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1662 ALTER TABLE ONLY public.specimens
1663 ADD CONSTRAINT specimens_pkey PRIMARY KEY (id);
1667 -- Name: traits traits_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1670 ALTER TABLE ONLY public.traits
1671 ADD CONSTRAINT traits_pkey PRIMARY KEY (id);
1675 -- Name: users users_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1678 ALTER TABLE ONLY public.users
1679 ADD CONSTRAINT users_pkey PRIMARY KEY (id);
1683 -- Name: virtual_machines virtual_machines_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1686 ALTER TABLE ONLY public.virtual_machines
1687 ADD CONSTRAINT virtual_machines_pkey PRIMARY KEY (id);
1691 -- Name: workflows workflows_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1694 ALTER TABLE ONLY public.workflows
1695 ADD CONSTRAINT workflows_pkey PRIMARY KEY (id);
1699 -- Name: api_client_authorizations_search_index; Type: INDEX; Schema: public; Owner: -
1702 CREATE INDEX api_client_authorizations_search_index ON public.api_client_authorizations USING btree (api_token, created_by_ip_address, last_used_by_ip_address, default_owner_uuid, uuid);
1706 -- Name: api_clients_search_index; Type: INDEX; Schema: public; Owner: -
1709 CREATE INDEX api_clients_search_index ON public.api_clients USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, name, url_prefix);
1713 -- Name: authorized_keys_search_index; Type: INDEX; Schema: public; Owner: -
1716 CREATE INDEX authorized_keys_search_index ON public.authorized_keys USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, name, key_type, authorized_user_uuid);
1720 -- Name: collection_index_on_properties; Type: INDEX; Schema: public; Owner: -
1723 CREATE INDEX collection_index_on_properties ON public.collections USING gin (properties);
1727 -- Name: collections_search_index; Type: INDEX; Schema: public; Owner: -
1730 CREATE INDEX collections_search_index ON public.collections USING btree (owner_uuid, modified_by_client_uuid, modified_by_user_uuid, portable_data_hash, uuid, name, current_version_uuid);
1734 -- Name: collections_trgm_text_search_idx; Type: INDEX; Schema: public; Owner: -
1737 CREATE INDEX collections_trgm_text_search_idx ON public.collections USING gin (((((((((((((((((((COALESCE(owner_uuid, ''::character varying))::text || ' '::text) || (COALESCE(modified_by_client_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(modified_by_user_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(portable_data_hash, ''::character varying))::text) || ' '::text) || (COALESCE(uuid, ''::character varying))::text) || ' '::text) || (COALESCE(name, ''::character varying))::text) || ' '::text) || (COALESCE(description, ''::character varying))::text) || ' '::text) || COALESCE((properties)::text, ''::text)) || ' '::text) || COALESCE(file_names, ''::text))) public.gin_trgm_ops);
1741 -- Name: container_requests_index_on_properties; Type: INDEX; Schema: public; Owner: -
1744 CREATE INDEX container_requests_index_on_properties ON public.container_requests USING gin (properties);
1748 -- Name: container_requests_search_index; Type: INDEX; Schema: public; Owner: -
1751 CREATE INDEX container_requests_search_index ON public.container_requests USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, name, state, requesting_container_uuid, container_uuid, container_image, cwd, output_path, output_uuid, log_uuid, output_name);
1755 -- Name: container_requests_trgm_text_search_idx; Type: INDEX; Schema: public; Owner: -
1758 CREATE INDEX container_requests_trgm_text_search_idx ON public.container_requests USING gin (((((((((((((((((((((((((((((((((((((((((((COALESCE(uuid, ''::character varying))::text || ' '::text) || (COALESCE(owner_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(modified_by_client_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(modified_by_user_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(name, ''::character varying))::text) || ' '::text) || COALESCE(description, ''::text)) || ' '::text) || COALESCE((properties)::text, ''::text)) || ' '::text) || (COALESCE(state, ''::character varying))::text) || ' '::text) || (COALESCE(requesting_container_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(container_uuid, ''::character varying))::text) || ' '::text) || COALESCE(runtime_constraints, ''::text)) || ' '::text) || (COALESCE(container_image, ''::character varying))::text) || ' '::text) || COALESCE(environment, ''::text)) || ' '::text) || (COALESCE(cwd, ''::character varying))::text) || ' '::text) || COALESCE(command, ''::text)) || ' '::text) || (COALESCE(output_path, ''::character varying))::text) || ' '::text) || COALESCE(filters, ''::text)) || ' '::text) || COALESCE(scheduling_parameters, ''::text)) || ' '::text) || (COALESCE(output_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(log_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(output_name, ''::character varying))::text)) public.gin_trgm_ops);
1762 -- Name: containers_search_index; Type: INDEX; Schema: public; Owner: -
1765 CREATE INDEX containers_search_index ON public.containers USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, state, log, cwd, output_path, output, container_image, auth_uuid, locked_by_uuid);
1769 -- Name: group_index_on_properties; Type: INDEX; Schema: public; Owner: -
1772 CREATE INDEX group_index_on_properties ON public.groups USING gin (properties);
1776 -- Name: groups_search_index; Type: INDEX; Schema: public; Owner: -
1779 CREATE INDEX groups_search_index ON public.groups USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, name, group_class);
1783 -- Name: groups_trgm_text_search_idx; Type: INDEX; Schema: public; Owner: -
1786 CREATE INDEX groups_trgm_text_search_idx ON public.groups USING gin (((((((((((((((((COALESCE(uuid, ''::character varying))::text || ' '::text) || (COALESCE(owner_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(modified_by_client_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(modified_by_user_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(name, ''::character varying))::text) || ' '::text) || (COALESCE(description, ''::character varying))::text) || ' '::text) || (COALESCE(group_class, ''::character varying))::text) || ' '::text) || COALESCE((properties)::text, ''::text))) public.gin_trgm_ops);
1790 -- Name: humans_search_index; Type: INDEX; Schema: public; Owner: -
1793 CREATE INDEX humans_search_index ON public.humans USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid);
1797 -- Name: index_api_client_authorizations_on_api_client_id; Type: INDEX; Schema: public; Owner: -
1800 CREATE INDEX index_api_client_authorizations_on_api_client_id ON public.api_client_authorizations USING btree (api_client_id);
1804 -- Name: index_api_client_authorizations_on_api_token; Type: INDEX; Schema: public; Owner: -
1807 CREATE UNIQUE INDEX index_api_client_authorizations_on_api_token ON public.api_client_authorizations USING btree (api_token);
1811 -- Name: index_api_client_authorizations_on_expires_at; Type: INDEX; Schema: public; Owner: -
1814 CREATE INDEX index_api_client_authorizations_on_expires_at ON public.api_client_authorizations USING btree (expires_at);
1818 -- Name: index_api_client_authorizations_on_user_id; Type: INDEX; Schema: public; Owner: -
1821 CREATE INDEX index_api_client_authorizations_on_user_id ON public.api_client_authorizations USING btree (user_id);
1825 -- Name: index_api_client_authorizations_on_uuid; Type: INDEX; Schema: public; Owner: -
1828 CREATE UNIQUE INDEX index_api_client_authorizations_on_uuid ON public.api_client_authorizations USING btree (uuid);
1832 -- Name: index_api_clients_on_created_at; Type: INDEX; Schema: public; Owner: -
1835 CREATE INDEX index_api_clients_on_created_at ON public.api_clients USING btree (created_at);
1839 -- Name: index_api_clients_on_modified_at; Type: INDEX; Schema: public; Owner: -
1842 CREATE INDEX index_api_clients_on_modified_at ON public.api_clients USING btree (modified_at);
1846 -- Name: index_api_clients_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
1849 CREATE INDEX index_api_clients_on_owner_uuid ON public.api_clients USING btree (owner_uuid);
1853 -- Name: index_api_clients_on_uuid; Type: INDEX; Schema: public; Owner: -
1856 CREATE UNIQUE INDEX index_api_clients_on_uuid ON public.api_clients USING btree (uuid);
1860 -- Name: index_authkeys_on_user_and_expires_at; Type: INDEX; Schema: public; Owner: -
1863 CREATE INDEX index_authkeys_on_user_and_expires_at ON public.authorized_keys USING btree (authorized_user_uuid, expires_at);
1867 -- Name: index_authorized_keys_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
1870 CREATE INDEX index_authorized_keys_on_owner_uuid ON public.authorized_keys USING btree (owner_uuid);
1874 -- Name: index_authorized_keys_on_uuid; Type: INDEX; Schema: public; Owner: -
1877 CREATE UNIQUE INDEX index_authorized_keys_on_uuid ON public.authorized_keys USING btree (uuid);
1881 -- Name: index_collections_on_created_at; Type: INDEX; Schema: public; Owner: -
1884 CREATE INDEX index_collections_on_created_at ON public.collections USING btree (created_at);
1888 -- Name: index_collections_on_current_version_uuid_and_version; Type: INDEX; Schema: public; Owner: -
1891 CREATE UNIQUE INDEX index_collections_on_current_version_uuid_and_version ON public.collections USING btree (current_version_uuid, version);
1895 -- Name: index_collections_on_delete_at; Type: INDEX; Schema: public; Owner: -
1898 CREATE INDEX index_collections_on_delete_at ON public.collections USING btree (delete_at);
1902 -- Name: index_collections_on_is_trashed; Type: INDEX; Schema: public; Owner: -
1905 CREATE INDEX index_collections_on_is_trashed ON public.collections USING btree (is_trashed);
1909 -- Name: index_collections_on_modified_at; Type: INDEX; Schema: public; Owner: -
1912 CREATE INDEX index_collections_on_modified_at ON public.collections USING btree (modified_at);
1916 -- Name: index_collections_on_modified_at_uuid; Type: INDEX; Schema: public; Owner: -
1919 CREATE INDEX index_collections_on_modified_at_uuid ON public.collections USING btree (modified_at DESC, uuid);
1923 -- Name: index_collections_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
1926 CREATE INDEX index_collections_on_owner_uuid ON public.collections USING btree (owner_uuid);
1930 -- Name: index_collections_on_owner_uuid_and_name; Type: INDEX; Schema: public; Owner: -
1933 CREATE UNIQUE INDEX index_collections_on_owner_uuid_and_name ON public.collections USING btree (owner_uuid, name) WHERE ((is_trashed = false) AND ((current_version_uuid)::text = (uuid)::text));
1937 -- Name: index_collections_on_portable_data_hash_and_trash_at; Type: INDEX; Schema: public; Owner: -
1940 CREATE INDEX index_collections_on_portable_data_hash_and_trash_at ON public.collections USING btree (portable_data_hash, trash_at);
1944 -- Name: index_collections_on_trash_at; Type: INDEX; Schema: public; Owner: -
1947 CREATE INDEX index_collections_on_trash_at ON public.collections USING btree (trash_at);
1951 -- Name: index_collections_on_uuid; Type: INDEX; Schema: public; Owner: -
1954 CREATE UNIQUE INDEX index_collections_on_uuid ON public.collections USING btree (uuid);
1958 -- Name: index_container_requests_on_container_uuid; Type: INDEX; Schema: public; Owner: -
1961 CREATE INDEX index_container_requests_on_container_uuid ON public.container_requests USING btree (container_uuid);
1965 -- Name: index_container_requests_on_modified_at_uuid; Type: INDEX; Schema: public; Owner: -
1968 CREATE INDEX index_container_requests_on_modified_at_uuid ON public.container_requests USING btree (modified_at DESC, uuid);
1972 -- Name: index_container_requests_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
1975 CREATE INDEX index_container_requests_on_owner_uuid ON public.container_requests USING btree (owner_uuid);
1979 -- Name: index_container_requests_on_requesting_container_uuid; Type: INDEX; Schema: public; Owner: -
1982 CREATE INDEX index_container_requests_on_requesting_container_uuid ON public.container_requests USING btree (requesting_container_uuid);
1986 -- Name: index_container_requests_on_uuid; Type: INDEX; Schema: public; Owner: -
1989 CREATE UNIQUE INDEX index_container_requests_on_uuid ON public.container_requests USING btree (uuid);
1993 -- Name: index_containers_on_auth_uuid; Type: INDEX; Schema: public; Owner: -
1996 CREATE INDEX index_containers_on_auth_uuid ON public.containers USING btree (auth_uuid);
2000 -- Name: index_containers_on_locked_by_uuid_and_priority; Type: INDEX; Schema: public; Owner: -
2003 CREATE INDEX index_containers_on_locked_by_uuid_and_priority ON public.containers USING btree (locked_by_uuid, priority);
2007 -- Name: index_containers_on_locked_by_uuid_and_uuid; Type: INDEX; Schema: public; Owner: -
2010 CREATE INDEX index_containers_on_locked_by_uuid_and_uuid ON public.containers USING btree (locked_by_uuid, uuid);
2014 -- Name: index_containers_on_modified_at_uuid; Type: INDEX; Schema: public; Owner: -
2017 CREATE INDEX index_containers_on_modified_at_uuid ON public.containers USING btree (modified_at DESC, uuid);
2021 -- Name: index_containers_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
2024 CREATE INDEX index_containers_on_owner_uuid ON public.containers USING btree (owner_uuid);
2028 -- Name: index_containers_on_queued_state; Type: INDEX; Schema: public; Owner: -
2031 CREATE INDEX index_containers_on_queued_state ON public.containers USING btree (state, ((priority > 0)));
2035 -- Name: index_containers_on_reuse_columns; Type: INDEX; Schema: public; Owner: -
2038 CREATE INDEX index_containers_on_reuse_columns ON public.containers USING btree (md5(command), cwd, md5(environment), output_path, container_image, md5(mounts), secret_mounts_md5, md5(runtime_constraints));
2042 -- Name: index_containers_on_runtime_status; Type: INDEX; Schema: public; Owner: -
2045 CREATE INDEX index_containers_on_runtime_status ON public.containers USING gin (runtime_status);
2049 -- Name: index_containers_on_secret_mounts_md5; Type: INDEX; Schema: public; Owner: -
2052 CREATE INDEX index_containers_on_secret_mounts_md5 ON public.containers USING btree (secret_mounts_md5);
2056 -- Name: index_containers_on_uuid; Type: INDEX; Schema: public; Owner: -
2059 CREATE UNIQUE INDEX index_containers_on_uuid ON public.containers USING btree (uuid);
2063 -- Name: index_groups_on_created_at; Type: INDEX; Schema: public; Owner: -
2066 CREATE INDEX index_groups_on_created_at ON public.groups USING btree (created_at);
2070 -- Name: index_groups_on_delete_at; Type: INDEX; Schema: public; Owner: -
2073 CREATE INDEX index_groups_on_delete_at ON public.groups USING btree (delete_at);
2077 -- Name: index_groups_on_group_class; Type: INDEX; Schema: public; Owner: -
2080 CREATE INDEX index_groups_on_group_class ON public.groups USING btree (group_class);
2084 -- Name: index_groups_on_is_trashed; Type: INDEX; Schema: public; Owner: -
2087 CREATE INDEX index_groups_on_is_trashed ON public.groups USING btree (is_trashed);
2091 -- Name: index_groups_on_modified_at; Type: INDEX; Schema: public; Owner: -
2094 CREATE INDEX index_groups_on_modified_at ON public.groups USING btree (modified_at);
2098 -- Name: index_groups_on_modified_at_uuid; Type: INDEX; Schema: public; Owner: -
2101 CREATE INDEX index_groups_on_modified_at_uuid ON public.groups USING btree (modified_at DESC, uuid);
2105 -- Name: index_groups_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
2108 CREATE INDEX index_groups_on_owner_uuid ON public.groups USING btree (owner_uuid);
2112 -- Name: index_groups_on_owner_uuid_and_name; Type: INDEX; Schema: public; Owner: -
2115 CREATE UNIQUE INDEX index_groups_on_owner_uuid_and_name ON public.groups USING btree (owner_uuid, name) WHERE (is_trashed = false);
2119 -- Name: index_groups_on_trash_at; Type: INDEX; Schema: public; Owner: -
2122 CREATE INDEX index_groups_on_trash_at ON public.groups USING btree (trash_at);
2126 -- Name: index_groups_on_uuid; Type: INDEX; Schema: public; Owner: -
2129 CREATE UNIQUE INDEX index_groups_on_uuid ON public.groups USING btree (uuid);
2133 -- Name: index_humans_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
2136 CREATE INDEX index_humans_on_owner_uuid ON public.humans USING btree (owner_uuid);
2140 -- Name: index_humans_on_uuid; Type: INDEX; Schema: public; Owner: -
2143 CREATE UNIQUE INDEX index_humans_on_uuid ON public.humans USING btree (uuid);
2147 -- Name: index_job_tasks_on_created_at; Type: INDEX; Schema: public; Owner: -
2150 CREATE INDEX index_job_tasks_on_created_at ON public.job_tasks USING btree (created_at);
2154 -- Name: index_job_tasks_on_created_by_job_task_uuid; Type: INDEX; Schema: public; Owner: -
2157 CREATE INDEX index_job_tasks_on_created_by_job_task_uuid ON public.job_tasks USING btree (created_by_job_task_uuid);
2161 -- Name: index_job_tasks_on_job_uuid; Type: INDEX; Schema: public; Owner: -
2164 CREATE INDEX index_job_tasks_on_job_uuid ON public.job_tasks USING btree (job_uuid);
2168 -- Name: index_job_tasks_on_modified_at; Type: INDEX; Schema: public; Owner: -
2171 CREATE INDEX index_job_tasks_on_modified_at ON public.job_tasks USING btree (modified_at);
2175 -- Name: index_job_tasks_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
2178 CREATE INDEX index_job_tasks_on_owner_uuid ON public.job_tasks USING btree (owner_uuid);
2182 -- Name: index_job_tasks_on_sequence; Type: INDEX; Schema: public; Owner: -
2185 CREATE INDEX index_job_tasks_on_sequence ON public.job_tasks USING btree (sequence);
2189 -- Name: index_job_tasks_on_success; Type: INDEX; Schema: public; Owner: -
2192 CREATE INDEX index_job_tasks_on_success ON public.job_tasks USING btree (success);
2196 -- Name: index_job_tasks_on_uuid; Type: INDEX; Schema: public; Owner: -
2199 CREATE UNIQUE INDEX index_job_tasks_on_uuid ON public.job_tasks USING btree (uuid);
2203 -- Name: index_jobs_on_created_at; Type: INDEX; Schema: public; Owner: -
2206 CREATE INDEX index_jobs_on_created_at ON public.jobs USING btree (created_at);
2210 -- Name: index_jobs_on_finished_at; Type: INDEX; Schema: public; Owner: -
2213 CREATE INDEX index_jobs_on_finished_at ON public.jobs USING btree (finished_at);
2217 -- Name: index_jobs_on_modified_at; Type: INDEX; Schema: public; Owner: -
2220 CREATE INDEX index_jobs_on_modified_at ON public.jobs USING btree (modified_at);
2224 -- Name: index_jobs_on_modified_at_uuid; Type: INDEX; Schema: public; Owner: -
2227 CREATE INDEX index_jobs_on_modified_at_uuid ON public.jobs USING btree (modified_at DESC, uuid);
2231 -- Name: index_jobs_on_output; Type: INDEX; Schema: public; Owner: -
2234 CREATE INDEX index_jobs_on_output ON public.jobs USING btree (output);
2238 -- Name: index_jobs_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
2241 CREATE INDEX index_jobs_on_owner_uuid ON public.jobs USING btree (owner_uuid);
2245 -- Name: index_jobs_on_script; Type: INDEX; Schema: public; Owner: -
2248 CREATE INDEX index_jobs_on_script ON public.jobs USING btree (script);
2252 -- Name: index_jobs_on_script_parameters_digest; Type: INDEX; Schema: public; Owner: -
2255 CREATE INDEX index_jobs_on_script_parameters_digest ON public.jobs USING btree (script_parameters_digest);
2259 -- Name: index_jobs_on_started_at; Type: INDEX; Schema: public; Owner: -
2262 CREATE INDEX index_jobs_on_started_at ON public.jobs USING btree (started_at);
2266 -- Name: index_jobs_on_submit_id; Type: INDEX; Schema: public; Owner: -
2269 CREATE UNIQUE INDEX index_jobs_on_submit_id ON public.jobs USING btree (submit_id);
2273 -- Name: index_jobs_on_uuid; Type: INDEX; Schema: public; Owner: -
2276 CREATE UNIQUE INDEX index_jobs_on_uuid ON public.jobs USING btree (uuid);
2280 -- Name: index_keep_disks_on_filesystem_uuid; Type: INDEX; Schema: public; Owner: -
2283 CREATE INDEX index_keep_disks_on_filesystem_uuid ON public.keep_disks USING btree (filesystem_uuid);
2287 -- Name: index_keep_disks_on_last_ping_at; Type: INDEX; Schema: public; Owner: -
2290 CREATE INDEX index_keep_disks_on_last_ping_at ON public.keep_disks USING btree (last_ping_at);
2294 -- Name: index_keep_disks_on_node_uuid; Type: INDEX; Schema: public; Owner: -
2297 CREATE INDEX index_keep_disks_on_node_uuid ON public.keep_disks USING btree (node_uuid);
2301 -- Name: index_keep_disks_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
2304 CREATE INDEX index_keep_disks_on_owner_uuid ON public.keep_disks USING btree (owner_uuid);
2308 -- Name: index_keep_disks_on_uuid; Type: INDEX; Schema: public; Owner: -
2311 CREATE UNIQUE INDEX index_keep_disks_on_uuid ON public.keep_disks USING btree (uuid);
2315 -- Name: index_keep_services_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
2318 CREATE INDEX index_keep_services_on_owner_uuid ON public.keep_services USING btree (owner_uuid);
2322 -- Name: index_keep_services_on_uuid; Type: INDEX; Schema: public; Owner: -
2325 CREATE UNIQUE INDEX index_keep_services_on_uuid ON public.keep_services USING btree (uuid);
2329 -- Name: index_links_on_created_at; Type: INDEX; Schema: public; Owner: -
2332 CREATE INDEX index_links_on_created_at ON public.links USING btree (created_at);
2336 -- Name: index_links_on_head_uuid; Type: INDEX; Schema: public; Owner: -
2339 CREATE INDEX index_links_on_head_uuid ON public.links USING btree (head_uuid);
2343 -- Name: index_links_on_modified_at; Type: INDEX; Schema: public; Owner: -
2346 CREATE INDEX index_links_on_modified_at ON public.links USING btree (modified_at);
2350 -- Name: index_links_on_modified_at_uuid; Type: INDEX; Schema: public; Owner: -
2353 CREATE INDEX index_links_on_modified_at_uuid ON public.links USING btree (modified_at DESC, uuid);
2357 -- Name: index_links_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
2360 CREATE INDEX index_links_on_owner_uuid ON public.links USING btree (owner_uuid);
2364 -- Name: index_links_on_substring_head_uuid; Type: INDEX; Schema: public; Owner: -
2367 CREATE INDEX index_links_on_substring_head_uuid ON public.links USING btree ("substring"((head_uuid)::text, 7, 5));
2371 -- Name: index_links_on_substring_tail_uuid; Type: INDEX; Schema: public; Owner: -
2374 CREATE INDEX index_links_on_substring_tail_uuid ON public.links USING btree ("substring"((tail_uuid)::text, 7, 5));
2378 -- Name: index_links_on_tail_uuid; Type: INDEX; Schema: public; Owner: -
2381 CREATE INDEX index_links_on_tail_uuid ON public.links USING btree (tail_uuid);
2385 -- Name: index_links_on_uuid; Type: INDEX; Schema: public; Owner: -
2388 CREATE UNIQUE INDEX index_links_on_uuid ON public.links USING btree (uuid);
2392 -- Name: index_logs_on_created_at; Type: INDEX; Schema: public; Owner: -
2395 CREATE INDEX index_logs_on_created_at ON public.logs USING btree (created_at);
2399 -- Name: index_logs_on_event_at; Type: INDEX; Schema: public; Owner: -
2402 CREATE INDEX index_logs_on_event_at ON public.logs USING btree (event_at);
2406 -- Name: index_logs_on_event_type; Type: INDEX; Schema: public; Owner: -
2409 CREATE INDEX index_logs_on_event_type ON public.logs USING btree (event_type);
2413 -- Name: index_logs_on_modified_at; Type: INDEX; Schema: public; Owner: -
2416 CREATE INDEX index_logs_on_modified_at ON public.logs USING btree (modified_at);
2420 -- Name: index_logs_on_modified_at_uuid; Type: INDEX; Schema: public; Owner: -
2423 CREATE INDEX index_logs_on_modified_at_uuid ON public.logs USING btree (modified_at DESC, uuid);
2427 -- Name: index_logs_on_object_owner_uuid; Type: INDEX; Schema: public; Owner: -
2430 CREATE INDEX index_logs_on_object_owner_uuid ON public.logs USING btree (object_owner_uuid);
2434 -- Name: index_logs_on_object_uuid; Type: INDEX; Schema: public; Owner: -
2437 CREATE INDEX index_logs_on_object_uuid ON public.logs USING btree (object_uuid);
2441 -- Name: index_logs_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
2444 CREATE INDEX index_logs_on_owner_uuid ON public.logs USING btree (owner_uuid);
2448 -- Name: index_logs_on_summary; Type: INDEX; Schema: public; Owner: -
2451 CREATE INDEX index_logs_on_summary ON public.logs USING btree (summary);
2455 -- Name: index_logs_on_uuid; Type: INDEX; Schema: public; Owner: -
2458 CREATE UNIQUE INDEX index_logs_on_uuid ON public.logs USING btree (uuid);
2462 -- Name: index_nodes_on_created_at; Type: INDEX; Schema: public; Owner: -
2465 CREATE INDEX index_nodes_on_created_at ON public.nodes USING btree (created_at);
2469 -- Name: index_nodes_on_hostname; Type: INDEX; Schema: public; Owner: -
2472 CREATE INDEX index_nodes_on_hostname ON public.nodes USING btree (hostname);
2476 -- Name: index_nodes_on_modified_at; Type: INDEX; Schema: public; Owner: -
2479 CREATE INDEX index_nodes_on_modified_at ON public.nodes USING btree (modified_at);
2483 -- Name: index_nodes_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
2486 CREATE INDEX index_nodes_on_owner_uuid ON public.nodes USING btree (owner_uuid);
2490 -- Name: index_nodes_on_slot_number; Type: INDEX; Schema: public; Owner: -
2493 CREATE UNIQUE INDEX index_nodes_on_slot_number ON public.nodes USING btree (slot_number);
2497 -- Name: index_nodes_on_uuid; Type: INDEX; Schema: public; Owner: -
2500 CREATE UNIQUE INDEX index_nodes_on_uuid ON public.nodes USING btree (uuid);
2504 -- Name: index_pipeline_instances_on_created_at; Type: INDEX; Schema: public; Owner: -
2507 CREATE INDEX index_pipeline_instances_on_created_at ON public.pipeline_instances USING btree (created_at);
2511 -- Name: index_pipeline_instances_on_modified_at; Type: INDEX; Schema: public; Owner: -
2514 CREATE INDEX index_pipeline_instances_on_modified_at ON public.pipeline_instances USING btree (modified_at);
2518 -- Name: index_pipeline_instances_on_modified_at_uuid; Type: INDEX; Schema: public; Owner: -
2521 CREATE INDEX index_pipeline_instances_on_modified_at_uuid ON public.pipeline_instances USING btree (modified_at DESC, uuid);
2525 -- Name: index_pipeline_instances_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
2528 CREATE INDEX index_pipeline_instances_on_owner_uuid ON public.pipeline_instances USING btree (owner_uuid);
2532 -- Name: index_pipeline_instances_on_uuid; Type: INDEX; Schema: public; Owner: -
2535 CREATE UNIQUE INDEX index_pipeline_instances_on_uuid ON public.pipeline_instances USING btree (uuid);
2539 -- Name: index_pipeline_templates_on_created_at; Type: INDEX; Schema: public; Owner: -
2542 CREATE INDEX index_pipeline_templates_on_created_at ON public.pipeline_templates USING btree (created_at);
2546 -- Name: index_pipeline_templates_on_modified_at; Type: INDEX; Schema: public; Owner: -
2549 CREATE INDEX index_pipeline_templates_on_modified_at ON public.pipeline_templates USING btree (modified_at);
2553 -- Name: index_pipeline_templates_on_modified_at_uuid; Type: INDEX; Schema: public; Owner: -
2556 CREATE INDEX index_pipeline_templates_on_modified_at_uuid ON public.pipeline_templates USING btree (modified_at DESC, uuid);
2560 -- Name: index_pipeline_templates_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
2563 CREATE INDEX index_pipeline_templates_on_owner_uuid ON public.pipeline_templates USING btree (owner_uuid);
2567 -- Name: index_pipeline_templates_on_uuid; Type: INDEX; Schema: public; Owner: -
2570 CREATE UNIQUE INDEX index_pipeline_templates_on_uuid ON public.pipeline_templates USING btree (uuid);
2574 -- Name: index_repositories_on_modified_at_uuid; Type: INDEX; Schema: public; Owner: -
2577 CREATE INDEX index_repositories_on_modified_at_uuid ON public.repositories USING btree (modified_at DESC, uuid);
2581 -- Name: index_repositories_on_name; Type: INDEX; Schema: public; Owner: -
2584 CREATE UNIQUE INDEX index_repositories_on_name ON public.repositories USING btree (name);
2588 -- Name: index_repositories_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
2591 CREATE INDEX index_repositories_on_owner_uuid ON public.repositories USING btree (owner_uuid);
2595 -- Name: index_repositories_on_uuid; Type: INDEX; Schema: public; Owner: -
2598 CREATE UNIQUE INDEX index_repositories_on_uuid ON public.repositories USING btree (uuid);
2602 -- Name: index_specimens_on_created_at; Type: INDEX; Schema: public; Owner: -
2605 CREATE INDEX index_specimens_on_created_at ON public.specimens USING btree (created_at);
2609 -- Name: index_specimens_on_modified_at; Type: INDEX; Schema: public; Owner: -
2612 CREATE INDEX index_specimens_on_modified_at ON public.specimens USING btree (modified_at);
2616 -- Name: index_specimens_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
2619 CREATE INDEX index_specimens_on_owner_uuid ON public.specimens USING btree (owner_uuid);
2623 -- Name: index_specimens_on_uuid; Type: INDEX; Schema: public; Owner: -
2626 CREATE UNIQUE INDEX index_specimens_on_uuid ON public.specimens USING btree (uuid);
2630 -- Name: index_traits_on_name; Type: INDEX; Schema: public; Owner: -
2633 CREATE INDEX index_traits_on_name ON public.traits USING btree (name);
2637 -- Name: index_traits_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
2640 CREATE INDEX index_traits_on_owner_uuid ON public.traits USING btree (owner_uuid);
2644 -- Name: index_traits_on_uuid; Type: INDEX; Schema: public; Owner: -
2647 CREATE UNIQUE INDEX index_traits_on_uuid ON public.traits USING btree (uuid);
2651 -- Name: index_trashed_groups_on_group_uuid; Type: INDEX; Schema: public; Owner: -
2654 CREATE UNIQUE INDEX index_trashed_groups_on_group_uuid ON public.trashed_groups USING btree (group_uuid);
2658 -- Name: index_users_on_created_at; Type: INDEX; Schema: public; Owner: -
2661 CREATE INDEX index_users_on_created_at ON public.users USING btree (created_at);
2665 -- Name: index_users_on_identity_url; Type: INDEX; Schema: public; Owner: -
2668 CREATE UNIQUE INDEX index_users_on_identity_url ON public.users USING btree (identity_url);
2672 -- Name: index_users_on_modified_at; Type: INDEX; Schema: public; Owner: -
2675 CREATE INDEX index_users_on_modified_at ON public.users USING btree (modified_at);
2679 -- Name: index_users_on_modified_at_uuid; Type: INDEX; Schema: public; Owner: -
2682 CREATE INDEX index_users_on_modified_at_uuid ON public.users USING btree (modified_at DESC, uuid);
2686 -- Name: index_users_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
2689 CREATE INDEX index_users_on_owner_uuid ON public.users USING btree (owner_uuid);
2693 -- Name: index_users_on_username; Type: INDEX; Schema: public; Owner: -
2696 CREATE UNIQUE INDEX index_users_on_username ON public.users USING btree (username);
2700 -- Name: index_users_on_uuid; Type: INDEX; Schema: public; Owner: -
2703 CREATE UNIQUE INDEX index_users_on_uuid ON public.users USING btree (uuid);
2707 -- Name: index_virtual_machines_on_hostname; Type: INDEX; Schema: public; Owner: -
2710 CREATE INDEX index_virtual_machines_on_hostname ON public.virtual_machines USING btree (hostname);
2714 -- Name: index_virtual_machines_on_modified_at_uuid; Type: INDEX; Schema: public; Owner: -
2717 CREATE INDEX index_virtual_machines_on_modified_at_uuid ON public.virtual_machines USING btree (modified_at DESC, uuid);
2721 -- Name: index_virtual_machines_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
2724 CREATE INDEX index_virtual_machines_on_owner_uuid ON public.virtual_machines USING btree (owner_uuid);
2728 -- Name: index_virtual_machines_on_uuid; Type: INDEX; Schema: public; Owner: -
2731 CREATE UNIQUE INDEX index_virtual_machines_on_uuid ON public.virtual_machines USING btree (uuid);
2735 -- Name: index_workflows_on_modified_at_uuid; Type: INDEX; Schema: public; Owner: -
2738 CREATE INDEX index_workflows_on_modified_at_uuid ON public.workflows USING btree (modified_at DESC, uuid);
2742 -- Name: index_workflows_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
2745 CREATE INDEX index_workflows_on_owner_uuid ON public.workflows USING btree (owner_uuid);
2749 -- Name: index_workflows_on_uuid; Type: INDEX; Schema: public; Owner: -
2752 CREATE UNIQUE INDEX index_workflows_on_uuid ON public.workflows USING btree (uuid);
2756 -- Name: job_tasks_search_index; Type: INDEX; Schema: public; Owner: -
2759 CREATE INDEX job_tasks_search_index ON public.job_tasks USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, job_uuid, created_by_job_task_uuid);
2763 -- Name: jobs_search_index; Type: INDEX; Schema: public; Owner: -
2766 CREATE INDEX jobs_search_index ON public.jobs USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, submit_id, script, script_version, cancelled_by_client_uuid, cancelled_by_user_uuid, output, is_locked_by_uuid, log, repository, supplied_script_version, docker_image_locator, state, arvados_sdk_version);
2770 -- Name: jobs_trgm_text_search_idx; Type: INDEX; Schema: public; Owner: -
2773 CREATE INDEX jobs_trgm_text_search_idx ON public.jobs USING gin (((((((((((((((((((((((((((((((((((((((((((((COALESCE(uuid, ''::character varying))::text || ' '::text) || (COALESCE(owner_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(modified_by_client_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(modified_by_user_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(submit_id, ''::character varying))::text) || ' '::text) || (COALESCE(script, ''::character varying))::text) || ' '::text) || (COALESCE(script_version, ''::character varying))::text) || ' '::text) || COALESCE(script_parameters, ''::text)) || ' '::text) || (COALESCE(cancelled_by_client_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(cancelled_by_user_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(output, ''::character varying))::text) || ' '::text) || (COALESCE(is_locked_by_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(log, ''::character varying))::text) || ' '::text) || COALESCE(tasks_summary, ''::text)) || ' '::text) || COALESCE(runtime_constraints, ''::text)) || ' '::text) || (COALESCE(repository, ''::character varying))::text) || ' '::text) || (COALESCE(supplied_script_version, ''::character varying))::text) || ' '::text) || (COALESCE(docker_image_locator, ''::character varying))::text) || ' '::text) || (COALESCE(description, ''::character varying))::text) || ' '::text) || (COALESCE(state, ''::character varying))::text) || ' '::text) || (COALESCE(arvados_sdk_version, ''::character varying))::text) || ' '::text) || COALESCE(components, ''::text))) public.gin_trgm_ops);
2777 -- Name: keep_disks_search_index; Type: INDEX; Schema: public; Owner: -
2780 CREATE INDEX keep_disks_search_index ON public.keep_disks USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, ping_secret, node_uuid, filesystem_uuid, keep_service_uuid);
2784 -- Name: keep_services_search_index; Type: INDEX; Schema: public; Owner: -
2787 CREATE INDEX keep_services_search_index ON public.keep_services USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, service_host, service_type);
2791 -- Name: links_index_on_properties; Type: INDEX; Schema: public; Owner: -
2794 CREATE INDEX links_index_on_properties ON public.links USING gin (properties);
2798 -- Name: links_search_index; Type: INDEX; Schema: public; Owner: -
2801 CREATE INDEX links_search_index ON public.links USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, tail_uuid, link_class, name, head_uuid);
2805 -- Name: links_tail_name_unique_if_link_class_name; Type: INDEX; Schema: public; Owner: -
2808 CREATE UNIQUE INDEX links_tail_name_unique_if_link_class_name ON public.links USING btree (tail_uuid, name) WHERE ((link_class)::text = 'name'::text);
2812 -- Name: logs_search_index; Type: INDEX; Schema: public; Owner: -
2815 CREATE INDEX logs_search_index ON public.logs USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, object_uuid, event_type, object_owner_uuid);
2819 -- Name: nodes_index_on_info; Type: INDEX; Schema: public; Owner: -
2822 CREATE INDEX nodes_index_on_info ON public.nodes USING gin (info);
2826 -- Name: nodes_index_on_properties; Type: INDEX; Schema: public; Owner: -
2829 CREATE INDEX nodes_index_on_properties ON public.nodes USING gin (properties);
2833 -- Name: nodes_search_index; Type: INDEX; Schema: public; Owner: -
2836 CREATE INDEX nodes_search_index ON public.nodes USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, hostname, domain, ip_address, job_uuid);
2840 -- Name: permission_target; Type: INDEX; Schema: public; Owner: -
2843 CREATE INDEX permission_target ON public.materialized_permissions USING btree (target_uuid);
2847 -- Name: permission_user_target; Type: INDEX; Schema: public; Owner: -
2850 CREATE UNIQUE INDEX permission_user_target ON public.materialized_permissions USING btree (user_uuid, target_uuid);
2854 -- Name: pipeline_instances_search_index; Type: INDEX; Schema: public; Owner: -
2857 CREATE INDEX pipeline_instances_search_index ON public.pipeline_instances USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, pipeline_template_uuid, name, state);
2861 -- Name: pipeline_instances_trgm_text_search_idx; Type: INDEX; Schema: public; Owner: -
2864 CREATE INDEX pipeline_instances_trgm_text_search_idx ON public.pipeline_instances USING gin (((((((((((((((((((((((COALESCE(uuid, ''::character varying))::text || ' '::text) || (COALESCE(owner_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(modified_by_client_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(modified_by_user_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(pipeline_template_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(name, ''::character varying))::text) || ' '::text) || COALESCE(components, ''::text)) || ' '::text) || COALESCE(properties, ''::text)) || ' '::text) || (COALESCE(state, ''::character varying))::text) || ' '::text) || COALESCE(components_summary, ''::text)) || ' '::text) || (COALESCE(description, ''::character varying))::text)) public.gin_trgm_ops);
2868 -- Name: pipeline_template_owner_uuid_name_unique; Type: INDEX; Schema: public; Owner: -
2871 CREATE UNIQUE INDEX pipeline_template_owner_uuid_name_unique ON public.pipeline_templates USING btree (owner_uuid, name);
2875 -- Name: pipeline_templates_search_index; Type: INDEX; Schema: public; Owner: -
2878 CREATE INDEX pipeline_templates_search_index ON public.pipeline_templates USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, name);
2882 -- Name: pipeline_templates_trgm_text_search_idx; Type: INDEX; Schema: public; Owner: -
2885 CREATE INDEX pipeline_templates_trgm_text_search_idx ON public.pipeline_templates USING gin (((((((((((((((COALESCE(uuid, ''::character varying))::text || ' '::text) || (COALESCE(owner_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(modified_by_client_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(modified_by_user_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(name, ''::character varying))::text) || ' '::text) || COALESCE(components, ''::text)) || ' '::text) || (COALESCE(description, ''::character varying))::text)) public.gin_trgm_ops);
2889 -- Name: repositories_search_index; Type: INDEX; Schema: public; Owner: -
2892 CREATE INDEX repositories_search_index ON public.repositories USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, name);
2896 -- Name: specimens_search_index; Type: INDEX; Schema: public; Owner: -
2899 CREATE INDEX specimens_search_index ON public.specimens USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, material);
2903 -- Name: traits_search_index; Type: INDEX; Schema: public; Owner: -
2906 CREATE INDEX traits_search_index ON public.traits USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, name);
2910 -- Name: unique_schema_migrations; Type: INDEX; Schema: public; Owner: -
2913 CREATE UNIQUE INDEX unique_schema_migrations ON public.schema_migrations USING btree (version);
2917 -- Name: users_search_index; Type: INDEX; Schema: public; Owner: -
2920 CREATE INDEX users_search_index ON public.users USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, email, first_name, last_name, identity_url, default_owner_uuid, username, redirect_to_user_uuid);
2924 -- Name: virtual_machines_search_index; Type: INDEX; Schema: public; Owner: -
2927 CREATE INDEX virtual_machines_search_index ON public.virtual_machines USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, hostname);
2931 -- Name: workflows_search_idx; Type: INDEX; Schema: public; Owner: -
2934 CREATE INDEX workflows_search_idx ON public.workflows USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, name);
2938 -- Name: workflows_trgm_text_search_idx; Type: INDEX; Schema: public; Owner: -
2941 CREATE INDEX workflows_trgm_text_search_idx ON public.workflows USING gin (((((((((((((COALESCE(uuid, ''::character varying))::text || ' '::text) || (COALESCE(owner_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(modified_by_client_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(modified_by_user_uuid, ''::character varying))::text) || ' '::text) || (COALESCE(name, ''::character varying))::text) || ' '::text) || COALESCE(description, ''::text))) public.gin_trgm_ops);
2945 -- PostgreSQL database dump complete
2948 SET search_path TO "$user", public;
2950 INSERT INTO "schema_migrations" (version) VALUES