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: container_priority(character varying, bigint, character varying); Type: FUNCTION; Schema: public; Owner: -
197 CREATE FUNCTION public.container_priority(for_container_uuid character varying, inherited bigint, inherited_from character varying) RETURNS bigint
200 /* Determine the priority of an individual container.
201 The "inherited" priority comes from the path we followed from the root, the parent container
202 priority hasn't been updated in the table yet but we need to behave it like it has been.
204 select coalesce(max(case when containers.uuid = inherited_from then inherited
205 when containers.priority is not NULL then containers.priority
206 else container_requests.priority * 1125899906842624::bigint - (extract(epoch from container_requests.created_at)*1000)::bigint
208 container_requests left outer join containers on container_requests.requesting_container_uuid = containers.uuid
209 where container_requests.container_uuid = for_container_uuid and container_requests.state = 'Committed' and container_requests.priority > 0;
214 -- Name: container_tree(character varying); Type: FUNCTION; Schema: public; Owner: -
217 CREATE FUNCTION public.container_tree(for_container_uuid character varying) RETURNS TABLE(pri_container_uuid character varying)
220 /* A lighter weight version of the update_priorities query that only returns the containers in a tree,
221 used by SELECT FOR UPDATE.
223 with recursive tab(upd_container_uuid) as (
224 select for_container_uuid
226 select containers.uuid
227 from (tab join container_requests on tab.upd_container_uuid = container_requests.requesting_container_uuid) as child_requests
228 join containers on child_requests.container_uuid = containers.uuid
229 where containers.state in ('Queued', 'Locked', 'Running')
231 select upd_container_uuid from tab;
236 -- Name: container_tree_priorities(character varying); Type: FUNCTION; Schema: public; Owner: -
239 CREATE FUNCTION public.container_tree_priorities(for_container_uuid character varying) RETURNS TABLE(pri_container_uuid character varying, upd_priority bigint)
242 /* Calculate the priorities of all containers starting from for_container_uuid.
243 This traverses the process tree downward and calls container_priority for each container
244 and returns a table of container uuids and their new priorities.
246 with recursive tab(upd_container_uuid, upd_priority) as (
247 select for_container_uuid, container_priority(for_container_uuid, 0, '')
249 select containers.uuid, container_priority(containers.uuid, child_requests.upd_priority, child_requests.upd_container_uuid)
250 from (tab join container_requests on tab.upd_container_uuid = container_requests.requesting_container_uuid) as child_requests
251 join containers on child_requests.container_uuid = containers.uuid
252 where containers.state in ('Queued', 'Locked', 'Running')
254 select upd_container_uuid, upd_priority from tab;
259 -- Name: project_subtree_with_is_frozen(character varying, boolean); Type: FUNCTION; Schema: public; Owner: -
262 CREATE FUNCTION public.project_subtree_with_is_frozen(starting_uuid character varying, starting_is_frozen boolean) RETURNS TABLE(uuid character varying, is_frozen boolean)
266 project_subtree(uuid, is_frozen) as (
267 values (starting_uuid, starting_is_frozen)
269 select groups.uuid, project_subtree.is_frozen or groups.frozen_by_uuid is not null
270 from groups join project_subtree on (groups.owner_uuid = project_subtree.uuid)
272 select uuid, is_frozen from project_subtree;
277 -- Name: project_subtree_with_trash_at(character varying, timestamp without time zone); Type: FUNCTION; Schema: public; Owner: -
280 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)
283 /* Starting from a project, recursively traverse all the projects
284 underneath it and return a set of project uuids and trash_at times
285 (may be null). The initial trash_at can be a timestamp or null.
286 The trash_at time propagates downward to groups it owns, i.e. when a
287 group is trashed, everything underneath it in the ownership
288 hierarchy is also considered trashed. However, this is fact is
289 recorded in the trashed_groups table, not by updating trash_at field
293 project_subtree(uuid, trash_at) as (
294 values (starting_uuid, starting_trash_at)
296 select groups.uuid, LEAST(project_subtree.trash_at, groups.trash_at)
297 from groups join project_subtree on (groups.owner_uuid = project_subtree.uuid)
299 select uuid, trash_at from project_subtree;
304 -- Name: should_traverse_owned(character varying, integer); Type: FUNCTION; Schema: public; Owner: -
307 CREATE FUNCTION public.should_traverse_owned(starting_uuid character varying, starting_perm integer) RETURNS boolean
308 LANGUAGE sql IMMUTABLE
310 /* Helper function. Determines if permission on an object implies
311 transitive permission to things the object owns. This is always
312 true for groups, but only true for users when the permission level
315 select starting_uuid like '_____-j7d0g-_______________' or
316 (starting_uuid like '_____-tpzed-_______________' and starting_perm >= 3);
320 SET default_tablespace = '';
322 SET default_with_oids = false;
325 -- Name: api_client_authorizations; Type: TABLE; Schema: public; Owner: -
328 CREATE TABLE public.api_client_authorizations (
330 api_token character varying(255) NOT NULL,
331 api_client_id bigint NOT NULL,
332 user_id bigint NOT NULL,
333 created_by_ip_address character varying(255),
334 last_used_by_ip_address character varying(255),
335 last_used_at timestamp without time zone,
336 expires_at timestamp without time zone,
337 created_at timestamp without time zone NOT NULL,
338 updated_at timestamp without time zone NOT NULL,
339 default_owner_uuid character varying(255),
340 scopes text DEFAULT '["all"]'::text,
341 uuid character varying(255) NOT NULL
346 -- Name: api_client_authorizations_id_seq; Type: SEQUENCE; Schema: public; Owner: -
349 CREATE SEQUENCE public.api_client_authorizations_id_seq
358 -- Name: api_client_authorizations_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
361 ALTER SEQUENCE public.api_client_authorizations_id_seq OWNED BY public.api_client_authorizations.id;
365 -- Name: api_clients; Type: TABLE; Schema: public; Owner: -
368 CREATE TABLE public.api_clients (
370 uuid character varying(255),
371 owner_uuid character varying(255),
372 modified_by_client_uuid character varying(255),
373 modified_by_user_uuid character varying(255),
374 modified_at timestamp without time zone,
375 name character varying(255),
376 url_prefix character varying(255),
377 created_at timestamp without time zone NOT NULL,
378 updated_at timestamp without time zone NOT NULL,
379 is_trusted boolean DEFAULT false
384 -- Name: api_clients_id_seq; Type: SEQUENCE; Schema: public; Owner: -
387 CREATE SEQUENCE public.api_clients_id_seq
396 -- Name: api_clients_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
399 ALTER SEQUENCE public.api_clients_id_seq OWNED BY public.api_clients.id;
403 -- Name: ar_internal_metadata; Type: TABLE; Schema: public; Owner: -
406 CREATE TABLE public.ar_internal_metadata (
407 key character varying NOT NULL,
408 value character varying,
409 created_at timestamp without time zone NOT NULL,
410 updated_at timestamp without time zone NOT NULL
415 -- Name: authorized_keys; Type: TABLE; Schema: public; Owner: -
418 CREATE TABLE public.authorized_keys (
420 uuid character varying(255) NOT NULL,
421 owner_uuid character varying(255) NOT NULL,
422 modified_by_client_uuid character varying(255),
423 modified_by_user_uuid character varying(255),
424 modified_at timestamp without time zone,
425 name character varying(255),
426 key_type character varying(255),
427 authorized_user_uuid character varying(255),
429 expires_at timestamp without time zone,
430 created_at timestamp without time zone NOT NULL,
431 updated_at timestamp without time zone NOT NULL
436 -- Name: authorized_keys_id_seq; Type: SEQUENCE; Schema: public; Owner: -
439 CREATE SEQUENCE public.authorized_keys_id_seq
448 -- Name: authorized_keys_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
451 ALTER SEQUENCE public.authorized_keys_id_seq OWNED BY public.authorized_keys.id;
455 -- Name: collections; Type: TABLE; Schema: public; Owner: -
458 CREATE TABLE public.collections (
460 owner_uuid character varying(255),
461 created_at timestamp without time zone NOT NULL,
462 modified_by_client_uuid character varying(255),
463 modified_by_user_uuid character varying(255),
464 modified_at timestamp without time zone,
465 portable_data_hash character varying(255),
466 replication_desired integer,
467 replication_confirmed_at timestamp without time zone,
468 replication_confirmed integer,
469 updated_at timestamp without time zone NOT NULL,
470 uuid character varying(255),
472 name character varying(255),
473 description character varying(524288),
475 delete_at timestamp without time zone,
477 trash_at timestamp without time zone,
478 is_trashed boolean DEFAULT false NOT NULL,
479 storage_classes_desired jsonb DEFAULT '["default"]'::jsonb,
480 storage_classes_confirmed jsonb DEFAULT '[]'::jsonb,
481 storage_classes_confirmed_at timestamp without time zone,
482 current_version_uuid character varying,
483 version integer DEFAULT 1 NOT NULL,
484 preserve_version boolean DEFAULT false,
485 file_count integer DEFAULT 0 NOT NULL,
486 file_size_total bigint DEFAULT 0 NOT NULL
491 -- Name: collections_id_seq; Type: SEQUENCE; Schema: public; Owner: -
494 CREATE SEQUENCE public.collections_id_seq
503 -- Name: collections_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
506 ALTER SEQUENCE public.collections_id_seq OWNED BY public.collections.id;
510 -- Name: container_requests; Type: TABLE; Schema: public; Owner: -
513 CREATE TABLE public.container_requests (
515 uuid character varying(255),
516 owner_uuid character varying(255),
517 created_at timestamp without time zone NOT NULL,
518 modified_at timestamp without time zone,
519 modified_by_client_uuid character varying(255),
520 modified_by_user_uuid character varying(255),
521 name character varying(255),
524 state character varying(255),
525 requesting_container_uuid character varying(255),
526 container_uuid character varying(255),
527 container_count_max integer,
529 runtime_constraints text,
530 container_image character varying(255),
532 cwd character varying(255),
534 output_path character varying(255),
536 expires_at timestamp without time zone,
538 updated_at timestamp without time zone NOT NULL,
539 container_count integer DEFAULT 0,
540 use_existing boolean DEFAULT true,
541 scheduling_parameters text,
542 output_uuid character varying(255),
543 log_uuid character varying(255),
544 output_name character varying(255) DEFAULT NULL::character varying,
545 output_ttl integer DEFAULT 0 NOT NULL,
546 secret_mounts jsonb DEFAULT '{}'::jsonb,
548 output_storage_classes jsonb DEFAULT '["default"]'::jsonb,
549 output_properties jsonb DEFAULT '{}'::jsonb,
550 cumulative_cost double precision DEFAULT 0.0 NOT NULL
555 -- Name: container_requests_id_seq; Type: SEQUENCE; Schema: public; Owner: -
558 CREATE SEQUENCE public.container_requests_id_seq
567 -- Name: container_requests_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
570 ALTER SEQUENCE public.container_requests_id_seq OWNED BY public.container_requests.id;
574 -- Name: containers; Type: TABLE; Schema: public; Owner: -
577 CREATE TABLE public.containers (
579 uuid character varying(255),
580 owner_uuid character varying(255),
581 created_at timestamp without time zone NOT NULL,
582 modified_at timestamp without time zone,
583 modified_by_client_uuid character varying(255),
584 modified_by_user_uuid character varying(255),
585 state character varying(255),
586 started_at timestamp without time zone,
587 finished_at timestamp without time zone,
588 log character varying(255),
590 cwd character varying(255),
592 output_path character varying(255),
594 runtime_constraints text,
595 output character varying(255),
596 container_image character varying(255),
597 progress double precision,
599 updated_at timestamp without time zone NOT NULL,
601 auth_uuid character varying(255),
602 locked_by_uuid character varying(255),
603 scheduling_parameters text,
604 secret_mounts jsonb DEFAULT '{}'::jsonb,
605 secret_mounts_md5 character varying DEFAULT '99914b932bd37a50b983c5e7c90ae93b'::character varying,
606 runtime_status jsonb DEFAULT '{}'::jsonb,
607 runtime_user_uuid text,
608 runtime_auth_scopes jsonb,
610 lock_count integer DEFAULT 0 NOT NULL,
611 gateway_address character varying,
612 interactive_session_started boolean DEFAULT false NOT NULL,
613 output_storage_classes jsonb DEFAULT '["default"]'::jsonb,
614 output_properties jsonb DEFAULT '{}'::jsonb,
615 cost double precision DEFAULT 0.0 NOT NULL,
616 subrequests_cost double precision DEFAULT 0.0 NOT NULL
621 -- Name: containers_id_seq; Type: SEQUENCE; Schema: public; Owner: -
624 CREATE SEQUENCE public.containers_id_seq
633 -- Name: containers_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
636 ALTER SEQUENCE public.containers_id_seq OWNED BY public.containers.id;
640 -- Name: frozen_groups; Type: TABLE; Schema: public; Owner: -
643 CREATE TABLE public.frozen_groups (
644 uuid character varying
649 -- Name: groups; Type: TABLE; Schema: public; Owner: -
652 CREATE TABLE public.groups (
654 uuid character varying(255),
655 owner_uuid character varying(255),
656 created_at timestamp without time zone NOT NULL,
657 modified_by_client_uuid character varying(255),
658 modified_by_user_uuid character varying(255),
659 modified_at timestamp without time zone,
660 name character varying(255) NOT NULL,
661 description character varying(524288),
662 updated_at timestamp without time zone NOT NULL,
663 group_class character varying(255),
664 trash_at timestamp without time zone,
665 is_trashed boolean DEFAULT false NOT NULL,
666 delete_at timestamp without time zone,
667 properties jsonb DEFAULT '{}'::jsonb,
668 frozen_by_uuid character varying
673 -- Name: groups_id_seq; Type: SEQUENCE; Schema: public; Owner: -
676 CREATE SEQUENCE public.groups_id_seq
685 -- Name: groups_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
688 ALTER SEQUENCE public.groups_id_seq OWNED BY public.groups.id;
692 -- Name: humans; Type: TABLE; Schema: public; Owner: -
695 CREATE TABLE public.humans (
697 uuid character varying(255) NOT NULL,
698 owner_uuid character varying(255) NOT NULL,
699 modified_by_client_uuid character varying(255),
700 modified_by_user_uuid character varying(255),
701 modified_at timestamp without time zone,
703 created_at timestamp without time zone NOT NULL,
704 updated_at timestamp without time zone NOT NULL
709 -- Name: humans_id_seq; Type: SEQUENCE; Schema: public; Owner: -
712 CREATE SEQUENCE public.humans_id_seq
721 -- Name: humans_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
724 ALTER SEQUENCE public.humans_id_seq OWNED BY public.humans.id;
728 -- Name: job_tasks; Type: TABLE; Schema: public; Owner: -
731 CREATE TABLE public.job_tasks (
733 uuid character varying(255),
734 owner_uuid character varying(255),
735 modified_by_client_uuid character varying(255),
736 modified_by_user_uuid character varying(255),
737 modified_at timestamp without time zone,
738 job_uuid character varying(255),
742 progress double precision,
744 created_at timestamp without time zone NOT NULL,
745 updated_at timestamp without time zone NOT NULL,
746 created_by_job_task_uuid character varying(255),
748 started_at timestamp without time zone,
749 finished_at timestamp without time zone
754 -- Name: job_tasks_id_seq; Type: SEQUENCE; Schema: public; Owner: -
757 CREATE SEQUENCE public.job_tasks_id_seq
766 -- Name: job_tasks_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
769 ALTER SEQUENCE public.job_tasks_id_seq OWNED BY public.job_tasks.id;
773 -- Name: job_tasks_qsequence_seq; Type: SEQUENCE; Schema: public; Owner: -
776 CREATE SEQUENCE public.job_tasks_qsequence_seq
785 -- Name: job_tasks_qsequence_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
788 ALTER SEQUENCE public.job_tasks_qsequence_seq OWNED BY public.job_tasks.qsequence;
792 -- Name: jobs; Type: TABLE; Schema: public; Owner: -
795 CREATE TABLE public.jobs (
797 uuid character varying(255),
798 owner_uuid character varying(255),
799 modified_by_client_uuid character varying(255),
800 modified_by_user_uuid character varying(255),
801 modified_at timestamp without time zone,
802 submit_id character varying(255),
803 script character varying(255),
804 script_version character varying(255),
805 script_parameters text,
806 cancelled_by_client_uuid character varying(255),
807 cancelled_by_user_uuid character varying(255),
808 cancelled_at timestamp without time zone,
809 started_at timestamp without time zone,
810 finished_at timestamp without time zone,
813 output character varying(255),
814 created_at timestamp without time zone NOT NULL,
815 updated_at timestamp without time zone NOT NULL,
816 is_locked_by_uuid character varying(255),
817 log character varying(255),
819 runtime_constraints text,
820 nondeterministic boolean,
821 repository character varying(255),
822 supplied_script_version character varying(255),
823 docker_image_locator character varying(255),
824 priority integer DEFAULT 0 NOT NULL,
825 description character varying(524288),
826 state character varying(255),
827 arvados_sdk_version character varying(255),
829 script_parameters_digest character varying(255)
834 -- Name: jobs_id_seq; Type: SEQUENCE; Schema: public; Owner: -
837 CREATE SEQUENCE public.jobs_id_seq
846 -- Name: jobs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
849 ALTER SEQUENCE public.jobs_id_seq OWNED BY public.jobs.id;
853 -- Name: keep_disks; Type: TABLE; Schema: public; Owner: -
856 CREATE TABLE public.keep_disks (
858 uuid character varying(255) NOT NULL,
859 owner_uuid character varying(255) NOT NULL,
860 modified_by_client_uuid character varying(255),
861 modified_by_user_uuid character varying(255),
862 modified_at timestamp without time zone,
863 ping_secret character varying(255) NOT NULL,
864 node_uuid character varying(255),
865 filesystem_uuid character varying(255),
868 is_readable boolean DEFAULT true NOT NULL,
869 is_writable boolean DEFAULT true NOT NULL,
870 last_read_at timestamp without time zone,
871 last_write_at timestamp without time zone,
872 last_ping_at timestamp without time zone,
873 created_at timestamp without time zone NOT NULL,
874 updated_at timestamp without time zone NOT NULL,
875 keep_service_uuid character varying(255)
880 -- Name: keep_disks_id_seq; Type: SEQUENCE; Schema: public; Owner: -
883 CREATE SEQUENCE public.keep_disks_id_seq
892 -- Name: keep_disks_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
895 ALTER SEQUENCE public.keep_disks_id_seq OWNED BY public.keep_disks.id;
899 -- Name: keep_services; Type: TABLE; Schema: public; Owner: -
902 CREATE TABLE public.keep_services (
904 uuid character varying(255) NOT NULL,
905 owner_uuid character varying(255) NOT NULL,
906 modified_by_client_uuid character varying(255),
907 modified_by_user_uuid character varying(255),
908 modified_at timestamp without time zone,
909 service_host character varying(255),
910 service_port integer,
911 service_ssl_flag boolean,
912 service_type character varying(255),
913 created_at timestamp without time zone NOT NULL,
914 updated_at timestamp without time zone NOT NULL,
915 read_only boolean DEFAULT false NOT NULL
920 -- Name: keep_services_id_seq; Type: SEQUENCE; Schema: public; Owner: -
923 CREATE SEQUENCE public.keep_services_id_seq
932 -- Name: keep_services_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
935 ALTER SEQUENCE public.keep_services_id_seq OWNED BY public.keep_services.id;
939 -- Name: links; Type: TABLE; Schema: public; Owner: -
942 CREATE TABLE public.links (
944 uuid character varying(255),
945 owner_uuid character varying(255),
946 created_at timestamp without time zone NOT NULL,
947 modified_by_client_uuid character varying(255),
948 modified_by_user_uuid character varying(255),
949 modified_at timestamp without time zone,
950 tail_uuid character varying(255),
951 link_class character varying(255),
952 name character varying(255),
953 head_uuid character varying(255),
955 updated_at timestamp without time zone NOT NULL
960 -- Name: links_id_seq; Type: SEQUENCE; Schema: public; Owner: -
963 CREATE SEQUENCE public.links_id_seq
972 -- Name: links_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
975 ALTER SEQUENCE public.links_id_seq OWNED BY public.links.id;
979 -- Name: logs; Type: TABLE; Schema: public; Owner: -
982 CREATE TABLE public.logs (
984 uuid character varying(255),
985 owner_uuid character varying(255),
986 modified_by_client_uuid character varying(255),
987 modified_by_user_uuid character varying(255),
988 object_uuid character varying(255),
989 event_at timestamp without time zone,
990 event_type character varying(255),
993 created_at timestamp without time zone NOT NULL,
994 updated_at timestamp without time zone NOT NULL,
995 modified_at timestamp without time zone,
996 object_owner_uuid character varying(255)
1001 -- Name: logs_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1004 CREATE SEQUENCE public.logs_id_seq
1013 -- Name: logs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1016 ALTER SEQUENCE public.logs_id_seq OWNED BY public.logs.id;
1020 -- Name: materialized_permissions; Type: TABLE; Schema: public; Owner: -
1023 CREATE TABLE public.materialized_permissions (
1024 user_uuid character varying,
1025 target_uuid character varying,
1027 traverse_owned boolean
1032 -- Name: nodes; Type: TABLE; Schema: public; Owner: -
1035 CREATE TABLE public.nodes (
1037 uuid character varying(255),
1038 owner_uuid character varying(255),
1039 created_at timestamp without time zone NOT NULL,
1040 modified_by_client_uuid character varying(255),
1041 modified_by_user_uuid character varying(255),
1042 modified_at timestamp without time zone,
1043 slot_number integer,
1044 hostname character varying(255),
1045 domain character varying(255),
1046 ip_address character varying(255),
1047 first_ping_at timestamp without time zone,
1048 last_ping_at timestamp without time zone,
1050 updated_at timestamp without time zone NOT NULL,
1052 job_uuid character varying(255)
1057 -- Name: nodes_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1060 CREATE SEQUENCE public.nodes_id_seq
1069 -- Name: nodes_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1072 ALTER SEQUENCE public.nodes_id_seq OWNED BY public.nodes.id;
1076 -- Name: users; Type: TABLE; Schema: public; Owner: -
1079 CREATE TABLE public.users (
1081 uuid character varying(255),
1082 owner_uuid character varying(255) NOT NULL,
1083 created_at timestamp without time zone NOT NULL,
1084 modified_by_client_uuid character varying(255),
1085 modified_by_user_uuid character varying(255),
1086 modified_at timestamp without time zone,
1087 email character varying(255),
1088 first_name character varying(255),
1089 last_name character varying(255),
1090 identity_url character varying(255),
1093 updated_at timestamp without time zone NOT NULL,
1094 default_owner_uuid character varying(255),
1095 is_active boolean DEFAULT false,
1096 username character varying(255),
1097 redirect_to_user_uuid character varying
1102 -- Name: permission_graph_edges; Type: VIEW; Schema: public; Owner: -
1105 CREATE VIEW public.permission_graph_edges AS
1106 SELECT groups.owner_uuid AS tail_uuid,
1107 groups.uuid AS head_uuid,
1109 groups.uuid AS edge_id
1112 SELECT users.owner_uuid AS tail_uuid,
1113 users.uuid AS head_uuid,
1115 users.uuid AS edge_id
1118 SELECT users.uuid AS tail_uuid,
1119 users.uuid AS head_uuid,
1121 ''::character varying AS edge_id
1124 SELECT links.tail_uuid,
1127 WHEN ((links.name)::text = 'can_read'::text) THEN 1
1128 WHEN ((links.name)::text = 'can_login'::text) THEN 1
1129 WHEN ((links.name)::text = 'can_write'::text) THEN 2
1130 WHEN ((links.name)::text = 'can_manage'::text) THEN 3
1133 links.uuid AS edge_id
1135 WHERE ((links.link_class)::text = 'permission'::text);
1139 -- Name: pipeline_instances; Type: TABLE; Schema: public; Owner: -
1142 CREATE TABLE public.pipeline_instances (
1144 uuid character varying(255),
1145 owner_uuid character varying(255),
1146 created_at timestamp without time zone NOT NULL,
1147 modified_by_client_uuid character varying(255),
1148 modified_by_user_uuid character varying(255),
1149 modified_at timestamp without time zone,
1150 pipeline_template_uuid character varying(255),
1151 name character varying(255),
1153 updated_at timestamp without time zone NOT NULL,
1155 state character varying(255),
1156 components_summary text,
1157 started_at timestamp without time zone,
1158 finished_at timestamp without time zone,
1159 description character varying(524288)
1164 -- Name: pipeline_instances_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1167 CREATE SEQUENCE public.pipeline_instances_id_seq
1176 -- Name: pipeline_instances_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1179 ALTER SEQUENCE public.pipeline_instances_id_seq OWNED BY public.pipeline_instances.id;
1183 -- Name: pipeline_templates; Type: TABLE; Schema: public; Owner: -
1186 CREATE TABLE public.pipeline_templates (
1188 uuid character varying(255),
1189 owner_uuid character varying(255),
1190 created_at timestamp without time zone NOT NULL,
1191 modified_by_client_uuid character varying(255),
1192 modified_by_user_uuid character varying(255),
1193 modified_at timestamp without time zone,
1194 name character varying(255),
1196 updated_at timestamp without time zone NOT NULL,
1197 description character varying(524288)
1202 -- Name: pipeline_templates_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1205 CREATE SEQUENCE public.pipeline_templates_id_seq
1214 -- Name: pipeline_templates_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1217 ALTER SEQUENCE public.pipeline_templates_id_seq OWNED BY public.pipeline_templates.id;
1221 -- Name: repositories; Type: TABLE; Schema: public; Owner: -
1224 CREATE TABLE public.repositories (
1226 uuid character varying(255) NOT NULL,
1227 owner_uuid character varying(255) NOT NULL,
1228 modified_by_client_uuid character varying(255),
1229 modified_by_user_uuid character varying(255),
1230 modified_at timestamp without time zone,
1231 name character varying(255),
1232 created_at timestamp without time zone NOT NULL,
1233 updated_at timestamp without time zone NOT NULL
1238 -- Name: repositories_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1241 CREATE SEQUENCE public.repositories_id_seq
1250 -- Name: repositories_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1253 ALTER SEQUENCE public.repositories_id_seq OWNED BY public.repositories.id;
1257 -- Name: schema_migrations; Type: TABLE; Schema: public; Owner: -
1260 CREATE TABLE public.schema_migrations (
1261 version character varying(255) NOT NULL
1266 -- Name: specimens; Type: TABLE; Schema: public; Owner: -
1269 CREATE TABLE public.specimens (
1271 uuid character varying(255),
1272 owner_uuid character varying(255),
1273 created_at timestamp without time zone NOT NULL,
1274 modified_by_client_uuid character varying(255),
1275 modified_by_user_uuid character varying(255),
1276 modified_at timestamp without time zone,
1277 material character varying(255),
1278 updated_at timestamp without time zone NOT NULL,
1284 -- Name: specimens_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1287 CREATE SEQUENCE public.specimens_id_seq
1296 -- Name: specimens_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1299 ALTER SEQUENCE public.specimens_id_seq OWNED BY public.specimens.id;
1303 -- Name: traits; Type: TABLE; Schema: public; Owner: -
1306 CREATE TABLE public.traits (
1308 uuid character varying(255) NOT NULL,
1309 owner_uuid character varying(255) NOT NULL,
1310 modified_by_client_uuid character varying(255),
1311 modified_by_user_uuid character varying(255),
1312 modified_at timestamp without time zone,
1313 name character varying(255),
1315 created_at timestamp without time zone NOT NULL,
1316 updated_at timestamp without time zone NOT NULL
1321 -- Name: traits_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1324 CREATE SEQUENCE public.traits_id_seq
1333 -- Name: traits_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1336 ALTER SEQUENCE public.traits_id_seq OWNED BY public.traits.id;
1340 -- Name: trashed_groups; Type: TABLE; Schema: public; Owner: -
1343 CREATE TABLE public.trashed_groups (
1344 group_uuid character varying,
1345 trash_at timestamp without time zone
1350 -- Name: users_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1353 CREATE SEQUENCE public.users_id_seq
1362 -- Name: users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1365 ALTER SEQUENCE public.users_id_seq OWNED BY public.users.id;
1369 -- Name: virtual_machines; Type: TABLE; Schema: public; Owner: -
1372 CREATE TABLE public.virtual_machines (
1374 uuid character varying(255) NOT NULL,
1375 owner_uuid character varying(255) NOT NULL,
1376 modified_by_client_uuid character varying(255),
1377 modified_by_user_uuid character varying(255),
1378 modified_at timestamp without time zone,
1379 hostname character varying(255),
1380 created_at timestamp without time zone NOT NULL,
1381 updated_at timestamp without time zone NOT NULL
1386 -- Name: virtual_machines_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1389 CREATE SEQUENCE public.virtual_machines_id_seq
1398 -- Name: virtual_machines_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1401 ALTER SEQUENCE public.virtual_machines_id_seq OWNED BY public.virtual_machines.id;
1405 -- Name: workflows; Type: TABLE; Schema: public; Owner: -
1408 CREATE TABLE public.workflows (
1410 uuid character varying(255),
1411 owner_uuid character varying(255),
1412 created_at timestamp without time zone NOT NULL,
1413 modified_at timestamp without time zone,
1414 modified_by_client_uuid character varying(255),
1415 modified_by_user_uuid character varying(255),
1416 name character varying(255),
1419 updated_at timestamp without time zone NOT NULL
1424 -- Name: workflows_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1427 CREATE SEQUENCE public.workflows_id_seq
1436 -- Name: workflows_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1439 ALTER SEQUENCE public.workflows_id_seq OWNED BY public.workflows.id;
1443 -- Name: api_client_authorizations id; Type: DEFAULT; Schema: public; Owner: -
1446 ALTER TABLE ONLY public.api_client_authorizations ALTER COLUMN id SET DEFAULT nextval('public.api_client_authorizations_id_seq'::regclass);
1450 -- Name: api_clients id; Type: DEFAULT; Schema: public; Owner: -
1453 ALTER TABLE ONLY public.api_clients ALTER COLUMN id SET DEFAULT nextval('public.api_clients_id_seq'::regclass);
1457 -- Name: authorized_keys id; Type: DEFAULT; Schema: public; Owner: -
1460 ALTER TABLE ONLY public.authorized_keys ALTER COLUMN id SET DEFAULT nextval('public.authorized_keys_id_seq'::regclass);
1464 -- Name: collections id; Type: DEFAULT; Schema: public; Owner: -
1467 ALTER TABLE ONLY public.collections ALTER COLUMN id SET DEFAULT nextval('public.collections_id_seq'::regclass);
1471 -- Name: container_requests id; Type: DEFAULT; Schema: public; Owner: -
1474 ALTER TABLE ONLY public.container_requests ALTER COLUMN id SET DEFAULT nextval('public.container_requests_id_seq'::regclass);
1478 -- Name: containers id; Type: DEFAULT; Schema: public; Owner: -
1481 ALTER TABLE ONLY public.containers ALTER COLUMN id SET DEFAULT nextval('public.containers_id_seq'::regclass);
1485 -- Name: groups id; Type: DEFAULT; Schema: public; Owner: -
1488 ALTER TABLE ONLY public.groups ALTER COLUMN id SET DEFAULT nextval('public.groups_id_seq'::regclass);
1492 -- Name: humans id; Type: DEFAULT; Schema: public; Owner: -
1495 ALTER TABLE ONLY public.humans ALTER COLUMN id SET DEFAULT nextval('public.humans_id_seq'::regclass);
1499 -- Name: job_tasks id; Type: DEFAULT; Schema: public; Owner: -
1502 ALTER TABLE ONLY public.job_tasks ALTER COLUMN id SET DEFAULT nextval('public.job_tasks_id_seq'::regclass);
1506 -- Name: jobs id; Type: DEFAULT; Schema: public; Owner: -
1509 ALTER TABLE ONLY public.jobs ALTER COLUMN id SET DEFAULT nextval('public.jobs_id_seq'::regclass);
1513 -- Name: keep_disks id; Type: DEFAULT; Schema: public; Owner: -
1516 ALTER TABLE ONLY public.keep_disks ALTER COLUMN id SET DEFAULT nextval('public.keep_disks_id_seq'::regclass);
1520 -- Name: keep_services id; Type: DEFAULT; Schema: public; Owner: -
1523 ALTER TABLE ONLY public.keep_services ALTER COLUMN id SET DEFAULT nextval('public.keep_services_id_seq'::regclass);
1527 -- Name: links id; Type: DEFAULT; Schema: public; Owner: -
1530 ALTER TABLE ONLY public.links ALTER COLUMN id SET DEFAULT nextval('public.links_id_seq'::regclass);
1534 -- Name: logs id; Type: DEFAULT; Schema: public; Owner: -
1537 ALTER TABLE ONLY public.logs ALTER COLUMN id SET DEFAULT nextval('public.logs_id_seq'::regclass);
1541 -- Name: nodes id; Type: DEFAULT; Schema: public; Owner: -
1544 ALTER TABLE ONLY public.nodes ALTER COLUMN id SET DEFAULT nextval('public.nodes_id_seq'::regclass);
1548 -- Name: pipeline_instances id; Type: DEFAULT; Schema: public; Owner: -
1551 ALTER TABLE ONLY public.pipeline_instances ALTER COLUMN id SET DEFAULT nextval('public.pipeline_instances_id_seq'::regclass);
1555 -- Name: pipeline_templates id; Type: DEFAULT; Schema: public; Owner: -
1558 ALTER TABLE ONLY public.pipeline_templates ALTER COLUMN id SET DEFAULT nextval('public.pipeline_templates_id_seq'::regclass);
1562 -- Name: repositories id; Type: DEFAULT; Schema: public; Owner: -
1565 ALTER TABLE ONLY public.repositories ALTER COLUMN id SET DEFAULT nextval('public.repositories_id_seq'::regclass);
1569 -- Name: specimens id; Type: DEFAULT; Schema: public; Owner: -
1572 ALTER TABLE ONLY public.specimens ALTER COLUMN id SET DEFAULT nextval('public.specimens_id_seq'::regclass);
1576 -- Name: traits id; Type: DEFAULT; Schema: public; Owner: -
1579 ALTER TABLE ONLY public.traits ALTER COLUMN id SET DEFAULT nextval('public.traits_id_seq'::regclass);
1583 -- Name: users id; Type: DEFAULT; Schema: public; Owner: -
1586 ALTER TABLE ONLY public.users ALTER COLUMN id SET DEFAULT nextval('public.users_id_seq'::regclass);
1590 -- Name: virtual_machines id; Type: DEFAULT; Schema: public; Owner: -
1593 ALTER TABLE ONLY public.virtual_machines ALTER COLUMN id SET DEFAULT nextval('public.virtual_machines_id_seq'::regclass);
1597 -- Name: workflows id; Type: DEFAULT; Schema: public; Owner: -
1600 ALTER TABLE ONLY public.workflows ALTER COLUMN id SET DEFAULT nextval('public.workflows_id_seq'::regclass);
1604 -- Name: api_client_authorizations api_client_authorizations_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1607 ALTER TABLE ONLY public.api_client_authorizations
1608 ADD CONSTRAINT api_client_authorizations_pkey PRIMARY KEY (id);
1612 -- Name: api_clients api_clients_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1615 ALTER TABLE ONLY public.api_clients
1616 ADD CONSTRAINT api_clients_pkey PRIMARY KEY (id);
1620 -- Name: ar_internal_metadata ar_internal_metadata_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1623 ALTER TABLE ONLY public.ar_internal_metadata
1624 ADD CONSTRAINT ar_internal_metadata_pkey PRIMARY KEY (key);
1628 -- Name: authorized_keys authorized_keys_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1631 ALTER TABLE ONLY public.authorized_keys
1632 ADD CONSTRAINT authorized_keys_pkey PRIMARY KEY (id);
1636 -- Name: collections collections_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1639 ALTER TABLE ONLY public.collections
1640 ADD CONSTRAINT collections_pkey PRIMARY KEY (id);
1644 -- Name: container_requests container_requests_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1647 ALTER TABLE ONLY public.container_requests
1648 ADD CONSTRAINT container_requests_pkey PRIMARY KEY (id);
1652 -- Name: containers containers_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1655 ALTER TABLE ONLY public.containers
1656 ADD CONSTRAINT containers_pkey PRIMARY KEY (id);
1660 -- Name: groups groups_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1663 ALTER TABLE ONLY public.groups
1664 ADD CONSTRAINT groups_pkey PRIMARY KEY (id);
1668 -- Name: humans humans_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1671 ALTER TABLE ONLY public.humans
1672 ADD CONSTRAINT humans_pkey PRIMARY KEY (id);
1676 -- Name: job_tasks job_tasks_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1679 ALTER TABLE ONLY public.job_tasks
1680 ADD CONSTRAINT job_tasks_pkey PRIMARY KEY (id);
1684 -- Name: jobs jobs_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1687 ALTER TABLE ONLY public.jobs
1688 ADD CONSTRAINT jobs_pkey PRIMARY KEY (id);
1692 -- Name: keep_disks keep_disks_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1695 ALTER TABLE ONLY public.keep_disks
1696 ADD CONSTRAINT keep_disks_pkey PRIMARY KEY (id);
1700 -- Name: keep_services keep_services_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1703 ALTER TABLE ONLY public.keep_services
1704 ADD CONSTRAINT keep_services_pkey PRIMARY KEY (id);
1708 -- Name: links links_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1711 ALTER TABLE ONLY public.links
1712 ADD CONSTRAINT links_pkey PRIMARY KEY (id);
1716 -- Name: logs logs_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1719 ALTER TABLE ONLY public.logs
1720 ADD CONSTRAINT logs_pkey PRIMARY KEY (id);
1724 -- Name: nodes nodes_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1727 ALTER TABLE ONLY public.nodes
1728 ADD CONSTRAINT nodes_pkey PRIMARY KEY (id);
1732 -- Name: pipeline_instances pipeline_instances_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1735 ALTER TABLE ONLY public.pipeline_instances
1736 ADD CONSTRAINT pipeline_instances_pkey PRIMARY KEY (id);
1740 -- Name: pipeline_templates pipeline_templates_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1743 ALTER TABLE ONLY public.pipeline_templates
1744 ADD CONSTRAINT pipeline_templates_pkey PRIMARY KEY (id);
1748 -- Name: repositories repositories_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1751 ALTER TABLE ONLY public.repositories
1752 ADD CONSTRAINT repositories_pkey PRIMARY KEY (id);
1756 -- Name: specimens specimens_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1759 ALTER TABLE ONLY public.specimens
1760 ADD CONSTRAINT specimens_pkey PRIMARY KEY (id);
1764 -- Name: traits traits_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1767 ALTER TABLE ONLY public.traits
1768 ADD CONSTRAINT traits_pkey PRIMARY KEY (id);
1772 -- Name: users users_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1775 ALTER TABLE ONLY public.users
1776 ADD CONSTRAINT users_pkey PRIMARY KEY (id);
1780 -- Name: virtual_machines virtual_machines_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1783 ALTER TABLE ONLY public.virtual_machines
1784 ADD CONSTRAINT virtual_machines_pkey PRIMARY KEY (id);
1788 -- Name: workflows workflows_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1791 ALTER TABLE ONLY public.workflows
1792 ADD CONSTRAINT workflows_pkey PRIMARY KEY (id);
1796 -- Name: api_client_authorizations_search_index; Type: INDEX; Schema: public; Owner: -
1799 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);
1803 -- Name: api_clients_search_index; Type: INDEX; Schema: public; Owner: -
1806 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);
1810 -- Name: authorized_keys_search_index; Type: INDEX; Schema: public; Owner: -
1813 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);
1817 -- Name: collection_index_on_properties; Type: INDEX; Schema: public; Owner: -
1820 CREATE INDEX collection_index_on_properties ON public.collections USING gin (properties);
1824 -- Name: collections_search_index; Type: INDEX; Schema: public; Owner: -
1827 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);
1831 -- Name: collections_trgm_text_search_idx; Type: INDEX; Schema: public; Owner: -
1834 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);
1838 -- Name: container_requests_index_on_properties; Type: INDEX; Schema: public; Owner: -
1841 CREATE INDEX container_requests_index_on_properties ON public.container_requests USING gin (properties);
1845 -- Name: container_requests_search_index; Type: INDEX; Schema: public; Owner: -
1848 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);
1852 -- Name: container_requests_trgm_text_search_idx; Type: INDEX; Schema: public; Owner: -
1855 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) || ' '::text) || COALESCE((output_properties)::text, ''::text))) public.gin_trgm_ops);
1859 -- Name: containers_search_index; Type: INDEX; Schema: public; Owner: -
1862 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);
1866 -- Name: group_index_on_properties; Type: INDEX; Schema: public; Owner: -
1869 CREATE INDEX group_index_on_properties ON public.groups USING gin (properties);
1873 -- Name: groups_search_index; Type: INDEX; Schema: public; Owner: -
1876 CREATE INDEX groups_search_index ON public.groups USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, name, group_class, frozen_by_uuid);
1880 -- Name: groups_trgm_text_search_idx; Type: INDEX; Schema: public; Owner: -
1883 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);
1887 -- Name: humans_search_index; Type: INDEX; Schema: public; Owner: -
1890 CREATE INDEX humans_search_index ON public.humans USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid);
1894 -- Name: index_api_client_authorizations_on_api_client_id; Type: INDEX; Schema: public; Owner: -
1897 CREATE INDEX index_api_client_authorizations_on_api_client_id ON public.api_client_authorizations USING btree (api_client_id);
1901 -- Name: index_api_client_authorizations_on_api_token; Type: INDEX; Schema: public; Owner: -
1904 CREATE UNIQUE INDEX index_api_client_authorizations_on_api_token ON public.api_client_authorizations USING btree (api_token);
1908 -- Name: index_api_client_authorizations_on_expires_at; Type: INDEX; Schema: public; Owner: -
1911 CREATE INDEX index_api_client_authorizations_on_expires_at ON public.api_client_authorizations USING btree (expires_at);
1915 -- Name: index_api_client_authorizations_on_user_id; Type: INDEX; Schema: public; Owner: -
1918 CREATE INDEX index_api_client_authorizations_on_user_id ON public.api_client_authorizations USING btree (user_id);
1922 -- Name: index_api_client_authorizations_on_uuid; Type: INDEX; Schema: public; Owner: -
1925 CREATE UNIQUE INDEX index_api_client_authorizations_on_uuid ON public.api_client_authorizations USING btree (uuid);
1929 -- Name: index_api_clients_on_created_at; Type: INDEX; Schema: public; Owner: -
1932 CREATE INDEX index_api_clients_on_created_at ON public.api_clients USING btree (created_at);
1936 -- Name: index_api_clients_on_modified_at; Type: INDEX; Schema: public; Owner: -
1939 CREATE INDEX index_api_clients_on_modified_at ON public.api_clients USING btree (modified_at);
1943 -- Name: index_api_clients_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
1946 CREATE INDEX index_api_clients_on_owner_uuid ON public.api_clients USING btree (owner_uuid);
1950 -- Name: index_api_clients_on_uuid; Type: INDEX; Schema: public; Owner: -
1953 CREATE UNIQUE INDEX index_api_clients_on_uuid ON public.api_clients USING btree (uuid);
1957 -- Name: index_authkeys_on_user_and_expires_at; Type: INDEX; Schema: public; Owner: -
1960 CREATE INDEX index_authkeys_on_user_and_expires_at ON public.authorized_keys USING btree (authorized_user_uuid, expires_at);
1964 -- Name: index_authorized_keys_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
1967 CREATE INDEX index_authorized_keys_on_owner_uuid ON public.authorized_keys USING btree (owner_uuid);
1971 -- Name: index_authorized_keys_on_uuid; Type: INDEX; Schema: public; Owner: -
1974 CREATE UNIQUE INDEX index_authorized_keys_on_uuid ON public.authorized_keys USING btree (uuid);
1978 -- Name: index_collections_on_created_at_and_uuid; Type: INDEX; Schema: public; Owner: -
1981 CREATE INDEX index_collections_on_created_at_and_uuid ON public.collections USING btree (created_at, uuid);
1985 -- Name: index_collections_on_current_version_uuid_and_version; Type: INDEX; Schema: public; Owner: -
1988 CREATE UNIQUE INDEX index_collections_on_current_version_uuid_and_version ON public.collections USING btree (current_version_uuid, version);
1992 -- Name: index_collections_on_delete_at; Type: INDEX; Schema: public; Owner: -
1995 CREATE INDEX index_collections_on_delete_at ON public.collections USING btree (delete_at);
1999 -- Name: index_collections_on_is_trashed; Type: INDEX; Schema: public; Owner: -
2002 CREATE INDEX index_collections_on_is_trashed ON public.collections USING btree (is_trashed);
2006 -- Name: index_collections_on_modified_at_and_uuid; Type: INDEX; Schema: public; Owner: -
2009 CREATE INDEX index_collections_on_modified_at_and_uuid ON public.collections USING btree (modified_at, uuid);
2013 -- Name: index_collections_on_name; Type: INDEX; Schema: public; Owner: -
2016 CREATE INDEX index_collections_on_name ON public.collections USING gin (name public.gin_trgm_ops);
2020 -- Name: index_collections_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
2023 CREATE INDEX index_collections_on_owner_uuid ON public.collections USING btree (owner_uuid);
2027 -- Name: index_collections_on_owner_uuid_and_name; Type: INDEX; Schema: public; Owner: -
2030 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));
2034 -- Name: index_collections_on_portable_data_hash_and_trash_at; Type: INDEX; Schema: public; Owner: -
2037 CREATE INDEX index_collections_on_portable_data_hash_and_trash_at ON public.collections USING btree (portable_data_hash, trash_at);
2041 -- Name: index_collections_on_trash_at; Type: INDEX; Schema: public; Owner: -
2044 CREATE INDEX index_collections_on_trash_at ON public.collections USING btree (trash_at);
2048 -- Name: index_collections_on_uuid; Type: INDEX; Schema: public; Owner: -
2051 CREATE UNIQUE INDEX index_collections_on_uuid ON public.collections USING btree (uuid);
2055 -- Name: index_container_requests_on_container_uuid; Type: INDEX; Schema: public; Owner: -
2058 CREATE INDEX index_container_requests_on_container_uuid ON public.container_requests USING btree (container_uuid);
2062 -- Name: index_container_requests_on_created_at_and_uuid; Type: INDEX; Schema: public; Owner: -
2065 CREATE INDEX index_container_requests_on_created_at_and_uuid ON public.container_requests USING btree (created_at, uuid);
2069 -- Name: index_container_requests_on_modified_at_and_uuid; Type: INDEX; Schema: public; Owner: -
2072 CREATE INDEX index_container_requests_on_modified_at_and_uuid ON public.container_requests USING btree (modified_at, uuid);
2076 -- Name: index_container_requests_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
2079 CREATE INDEX index_container_requests_on_owner_uuid ON public.container_requests USING btree (owner_uuid);
2083 -- Name: index_container_requests_on_requesting_container_uuid; Type: INDEX; Schema: public; Owner: -
2086 CREATE INDEX index_container_requests_on_requesting_container_uuid ON public.container_requests USING btree (requesting_container_uuid);
2090 -- Name: index_container_requests_on_uuid; Type: INDEX; Schema: public; Owner: -
2093 CREATE UNIQUE INDEX index_container_requests_on_uuid ON public.container_requests USING btree (uuid);
2097 -- Name: index_containers_on_auth_uuid; Type: INDEX; Schema: public; Owner: -
2100 CREATE INDEX index_containers_on_auth_uuid ON public.containers USING btree (auth_uuid);
2104 -- Name: index_containers_on_locked_by_uuid_and_priority; Type: INDEX; Schema: public; Owner: -
2107 CREATE INDEX index_containers_on_locked_by_uuid_and_priority ON public.containers USING btree (locked_by_uuid, priority);
2111 -- Name: index_containers_on_locked_by_uuid_and_uuid; Type: INDEX; Schema: public; Owner: -
2114 CREATE INDEX index_containers_on_locked_by_uuid_and_uuid ON public.containers USING btree (locked_by_uuid, uuid);
2118 -- Name: index_containers_on_modified_at_uuid; Type: INDEX; Schema: public; Owner: -
2121 CREATE INDEX index_containers_on_modified_at_uuid ON public.containers USING btree (modified_at DESC, uuid);
2125 -- Name: index_containers_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
2128 CREATE INDEX index_containers_on_owner_uuid ON public.containers USING btree (owner_uuid);
2132 -- Name: index_containers_on_queued_state; Type: INDEX; Schema: public; Owner: -
2135 CREATE INDEX index_containers_on_queued_state ON public.containers USING btree (state, ((priority > 0)));
2139 -- Name: index_containers_on_reuse_columns; Type: INDEX; Schema: public; Owner: -
2142 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));
2146 -- Name: index_containers_on_runtime_status; Type: INDEX; Schema: public; Owner: -
2149 CREATE INDEX index_containers_on_runtime_status ON public.containers USING gin (runtime_status);
2153 -- Name: index_containers_on_secret_mounts_md5; Type: INDEX; Schema: public; Owner: -
2156 CREATE INDEX index_containers_on_secret_mounts_md5 ON public.containers USING btree (secret_mounts_md5);
2160 -- Name: index_containers_on_uuid; Type: INDEX; Schema: public; Owner: -
2163 CREATE UNIQUE INDEX index_containers_on_uuid ON public.containers USING btree (uuid);
2167 -- Name: index_frozen_groups_on_uuid; Type: INDEX; Schema: public; Owner: -
2170 CREATE UNIQUE INDEX index_frozen_groups_on_uuid ON public.frozen_groups USING btree (uuid);
2174 -- Name: index_groups_on_created_at_and_uuid; Type: INDEX; Schema: public; Owner: -
2177 CREATE INDEX index_groups_on_created_at_and_uuid ON public.groups USING btree (created_at, uuid);
2181 -- Name: index_groups_on_delete_at; Type: INDEX; Schema: public; Owner: -
2184 CREATE INDEX index_groups_on_delete_at ON public.groups USING btree (delete_at);
2188 -- Name: index_groups_on_group_class; Type: INDEX; Schema: public; Owner: -
2191 CREATE INDEX index_groups_on_group_class ON public.groups USING btree (group_class);
2195 -- Name: index_groups_on_is_trashed; Type: INDEX; Schema: public; Owner: -
2198 CREATE INDEX index_groups_on_is_trashed ON public.groups USING btree (is_trashed);
2202 -- Name: index_groups_on_modified_at_and_uuid; Type: INDEX; Schema: public; Owner: -
2205 CREATE INDEX index_groups_on_modified_at_and_uuid ON public.groups USING btree (modified_at, uuid);
2209 -- Name: index_groups_on_name; Type: INDEX; Schema: public; Owner: -
2212 CREATE INDEX index_groups_on_name ON public.groups USING gin (name public.gin_trgm_ops);
2216 -- Name: index_groups_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
2219 CREATE INDEX index_groups_on_owner_uuid ON public.groups USING btree (owner_uuid);
2223 -- Name: index_groups_on_owner_uuid_and_name; Type: INDEX; Schema: public; Owner: -
2226 CREATE UNIQUE INDEX index_groups_on_owner_uuid_and_name ON public.groups USING btree (owner_uuid, name) WHERE (is_trashed = false);
2230 -- Name: index_groups_on_trash_at; Type: INDEX; Schema: public; Owner: -
2233 CREATE INDEX index_groups_on_trash_at ON public.groups USING btree (trash_at);
2237 -- Name: index_groups_on_uuid; Type: INDEX; Schema: public; Owner: -
2240 CREATE UNIQUE INDEX index_groups_on_uuid ON public.groups USING btree (uuid);
2244 -- Name: index_humans_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
2247 CREATE INDEX index_humans_on_owner_uuid ON public.humans USING btree (owner_uuid);
2251 -- Name: index_humans_on_uuid; Type: INDEX; Schema: public; Owner: -
2254 CREATE UNIQUE INDEX index_humans_on_uuid ON public.humans USING btree (uuid);
2258 -- Name: index_job_tasks_on_created_at; Type: INDEX; Schema: public; Owner: -
2261 CREATE INDEX index_job_tasks_on_created_at ON public.job_tasks USING btree (created_at);
2265 -- Name: index_job_tasks_on_created_by_job_task_uuid; Type: INDEX; Schema: public; Owner: -
2268 CREATE INDEX index_job_tasks_on_created_by_job_task_uuid ON public.job_tasks USING btree (created_by_job_task_uuid);
2272 -- Name: index_job_tasks_on_job_uuid; Type: INDEX; Schema: public; Owner: -
2275 CREATE INDEX index_job_tasks_on_job_uuid ON public.job_tasks USING btree (job_uuid);
2279 -- Name: index_job_tasks_on_modified_at; Type: INDEX; Schema: public; Owner: -
2282 CREATE INDEX index_job_tasks_on_modified_at ON public.job_tasks USING btree (modified_at);
2286 -- Name: index_job_tasks_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
2289 CREATE INDEX index_job_tasks_on_owner_uuid ON public.job_tasks USING btree (owner_uuid);
2293 -- Name: index_job_tasks_on_sequence; Type: INDEX; Schema: public; Owner: -
2296 CREATE INDEX index_job_tasks_on_sequence ON public.job_tasks USING btree (sequence);
2300 -- Name: index_job_tasks_on_success; Type: INDEX; Schema: public; Owner: -
2303 CREATE INDEX index_job_tasks_on_success ON public.job_tasks USING btree (success);
2307 -- Name: index_job_tasks_on_uuid; Type: INDEX; Schema: public; Owner: -
2310 CREATE UNIQUE INDEX index_job_tasks_on_uuid ON public.job_tasks USING btree (uuid);
2314 -- Name: index_jobs_on_created_at; Type: INDEX; Schema: public; Owner: -
2317 CREATE INDEX index_jobs_on_created_at ON public.jobs USING btree (created_at);
2321 -- Name: index_jobs_on_finished_at; Type: INDEX; Schema: public; Owner: -
2324 CREATE INDEX index_jobs_on_finished_at ON public.jobs USING btree (finished_at);
2328 -- Name: index_jobs_on_modified_at; Type: INDEX; Schema: public; Owner: -
2331 CREATE INDEX index_jobs_on_modified_at ON public.jobs USING btree (modified_at);
2335 -- Name: index_jobs_on_modified_at_uuid; Type: INDEX; Schema: public; Owner: -
2338 CREATE INDEX index_jobs_on_modified_at_uuid ON public.jobs USING btree (modified_at DESC, uuid);
2342 -- Name: index_jobs_on_output; Type: INDEX; Schema: public; Owner: -
2345 CREATE INDEX index_jobs_on_output ON public.jobs USING btree (output);
2349 -- Name: index_jobs_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
2352 CREATE INDEX index_jobs_on_owner_uuid ON public.jobs USING btree (owner_uuid);
2356 -- Name: index_jobs_on_script; Type: INDEX; Schema: public; Owner: -
2359 CREATE INDEX index_jobs_on_script ON public.jobs USING btree (script);
2363 -- Name: index_jobs_on_script_parameters_digest; Type: INDEX; Schema: public; Owner: -
2366 CREATE INDEX index_jobs_on_script_parameters_digest ON public.jobs USING btree (script_parameters_digest);
2370 -- Name: index_jobs_on_started_at; Type: INDEX; Schema: public; Owner: -
2373 CREATE INDEX index_jobs_on_started_at ON public.jobs USING btree (started_at);
2377 -- Name: index_jobs_on_submit_id; Type: INDEX; Schema: public; Owner: -
2380 CREATE UNIQUE INDEX index_jobs_on_submit_id ON public.jobs USING btree (submit_id);
2384 -- Name: index_jobs_on_uuid; Type: INDEX; Schema: public; Owner: -
2387 CREATE UNIQUE INDEX index_jobs_on_uuid ON public.jobs USING btree (uuid);
2391 -- Name: index_keep_disks_on_filesystem_uuid; Type: INDEX; Schema: public; Owner: -
2394 CREATE INDEX index_keep_disks_on_filesystem_uuid ON public.keep_disks USING btree (filesystem_uuid);
2398 -- Name: index_keep_disks_on_last_ping_at; Type: INDEX; Schema: public; Owner: -
2401 CREATE INDEX index_keep_disks_on_last_ping_at ON public.keep_disks USING btree (last_ping_at);
2405 -- Name: index_keep_disks_on_node_uuid; Type: INDEX; Schema: public; Owner: -
2408 CREATE INDEX index_keep_disks_on_node_uuid ON public.keep_disks USING btree (node_uuid);
2412 -- Name: index_keep_disks_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
2415 CREATE INDEX index_keep_disks_on_owner_uuid ON public.keep_disks USING btree (owner_uuid);
2419 -- Name: index_keep_disks_on_uuid; Type: INDEX; Schema: public; Owner: -
2422 CREATE UNIQUE INDEX index_keep_disks_on_uuid ON public.keep_disks USING btree (uuid);
2426 -- Name: index_keep_services_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
2429 CREATE INDEX index_keep_services_on_owner_uuid ON public.keep_services USING btree (owner_uuid);
2433 -- Name: index_keep_services_on_uuid; Type: INDEX; Schema: public; Owner: -
2436 CREATE UNIQUE INDEX index_keep_services_on_uuid ON public.keep_services USING btree (uuid);
2440 -- Name: index_links_on_created_at_and_uuid; Type: INDEX; Schema: public; Owner: -
2443 CREATE INDEX index_links_on_created_at_and_uuid ON public.links USING btree (created_at, uuid);
2447 -- Name: index_links_on_head_uuid; Type: INDEX; Schema: public; Owner: -
2450 CREATE INDEX index_links_on_head_uuid ON public.links USING btree (head_uuid);
2454 -- Name: index_links_on_modified_at_and_uuid; Type: INDEX; Schema: public; Owner: -
2457 CREATE INDEX index_links_on_modified_at_and_uuid ON public.links USING btree (modified_at, uuid);
2461 -- Name: index_links_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
2464 CREATE INDEX index_links_on_owner_uuid ON public.links USING btree (owner_uuid);
2468 -- Name: index_links_on_substring_head_uuid; Type: INDEX; Schema: public; Owner: -
2471 CREATE INDEX index_links_on_substring_head_uuid ON public.links USING btree ("substring"((head_uuid)::text, 7, 5));
2475 -- Name: index_links_on_substring_tail_uuid; Type: INDEX; Schema: public; Owner: -
2478 CREATE INDEX index_links_on_substring_tail_uuid ON public.links USING btree ("substring"((tail_uuid)::text, 7, 5));
2482 -- Name: index_links_on_tail_uuid; Type: INDEX; Schema: public; Owner: -
2485 CREATE INDEX index_links_on_tail_uuid ON public.links USING btree (tail_uuid);
2489 -- Name: index_links_on_uuid; Type: INDEX; Schema: public; Owner: -
2492 CREATE UNIQUE INDEX index_links_on_uuid ON public.links USING btree (uuid);
2496 -- Name: index_logs_on_created_at_and_uuid; Type: INDEX; Schema: public; Owner: -
2499 CREATE INDEX index_logs_on_created_at_and_uuid ON public.logs USING btree (created_at, uuid);
2503 -- Name: index_logs_on_event_at; Type: INDEX; Schema: public; Owner: -
2506 CREATE INDEX index_logs_on_event_at ON public.logs USING btree (event_at);
2510 -- Name: index_logs_on_event_type; Type: INDEX; Schema: public; Owner: -
2513 CREATE INDEX index_logs_on_event_type ON public.logs USING btree (event_type);
2517 -- Name: index_logs_on_modified_at_and_uuid; Type: INDEX; Schema: public; Owner: -
2520 CREATE INDEX index_logs_on_modified_at_and_uuid ON public.logs USING btree (modified_at, uuid);
2524 -- Name: index_logs_on_object_owner_uuid; Type: INDEX; Schema: public; Owner: -
2527 CREATE INDEX index_logs_on_object_owner_uuid ON public.logs USING btree (object_owner_uuid);
2531 -- Name: index_logs_on_object_uuid; Type: INDEX; Schema: public; Owner: -
2534 CREATE INDEX index_logs_on_object_uuid ON public.logs USING btree (object_uuid);
2538 -- Name: index_logs_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
2541 CREATE INDEX index_logs_on_owner_uuid ON public.logs USING btree (owner_uuid);
2545 -- Name: index_logs_on_summary; Type: INDEX; Schema: public; Owner: -
2548 CREATE INDEX index_logs_on_summary ON public.logs USING btree (summary);
2552 -- Name: index_logs_on_uuid; Type: INDEX; Schema: public; Owner: -
2555 CREATE UNIQUE INDEX index_logs_on_uuid ON public.logs USING btree (uuid);
2559 -- Name: index_nodes_on_created_at; Type: INDEX; Schema: public; Owner: -
2562 CREATE INDEX index_nodes_on_created_at ON public.nodes USING btree (created_at);
2566 -- Name: index_nodes_on_hostname; Type: INDEX; Schema: public; Owner: -
2569 CREATE INDEX index_nodes_on_hostname ON public.nodes USING btree (hostname);
2573 -- Name: index_nodes_on_modified_at; Type: INDEX; Schema: public; Owner: -
2576 CREATE INDEX index_nodes_on_modified_at ON public.nodes USING btree (modified_at);
2580 -- Name: index_nodes_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
2583 CREATE INDEX index_nodes_on_owner_uuid ON public.nodes USING btree (owner_uuid);
2587 -- Name: index_nodes_on_slot_number; Type: INDEX; Schema: public; Owner: -
2590 CREATE UNIQUE INDEX index_nodes_on_slot_number ON public.nodes USING btree (slot_number);
2594 -- Name: index_nodes_on_uuid; Type: INDEX; Schema: public; Owner: -
2597 CREATE UNIQUE INDEX index_nodes_on_uuid ON public.nodes USING btree (uuid);
2601 -- Name: index_pipeline_instances_on_created_at; Type: INDEX; Schema: public; Owner: -
2604 CREATE INDEX index_pipeline_instances_on_created_at ON public.pipeline_instances USING btree (created_at);
2608 -- Name: index_pipeline_instances_on_modified_at; Type: INDEX; Schema: public; Owner: -
2611 CREATE INDEX index_pipeline_instances_on_modified_at ON public.pipeline_instances USING btree (modified_at);
2615 -- Name: index_pipeline_instances_on_modified_at_uuid; Type: INDEX; Schema: public; Owner: -
2618 CREATE INDEX index_pipeline_instances_on_modified_at_uuid ON public.pipeline_instances USING btree (modified_at DESC, uuid);
2622 -- Name: index_pipeline_instances_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
2625 CREATE INDEX index_pipeline_instances_on_owner_uuid ON public.pipeline_instances USING btree (owner_uuid);
2629 -- Name: index_pipeline_instances_on_uuid; Type: INDEX; Schema: public; Owner: -
2632 CREATE UNIQUE INDEX index_pipeline_instances_on_uuid ON public.pipeline_instances USING btree (uuid);
2636 -- Name: index_pipeline_templates_on_created_at; Type: INDEX; Schema: public; Owner: -
2639 CREATE INDEX index_pipeline_templates_on_created_at ON public.pipeline_templates USING btree (created_at);
2643 -- Name: index_pipeline_templates_on_modified_at; Type: INDEX; Schema: public; Owner: -
2646 CREATE INDEX index_pipeline_templates_on_modified_at ON public.pipeline_templates USING btree (modified_at);
2650 -- Name: index_pipeline_templates_on_modified_at_uuid; Type: INDEX; Schema: public; Owner: -
2653 CREATE INDEX index_pipeline_templates_on_modified_at_uuid ON public.pipeline_templates USING btree (modified_at DESC, uuid);
2657 -- Name: index_pipeline_templates_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
2660 CREATE INDEX index_pipeline_templates_on_owner_uuid ON public.pipeline_templates USING btree (owner_uuid);
2664 -- Name: index_pipeline_templates_on_uuid; Type: INDEX; Schema: public; Owner: -
2667 CREATE UNIQUE INDEX index_pipeline_templates_on_uuid ON public.pipeline_templates USING btree (uuid);
2671 -- Name: index_repositories_on_created_at_and_uuid; Type: INDEX; Schema: public; Owner: -
2674 CREATE INDEX index_repositories_on_created_at_and_uuid ON public.repositories USING btree (created_at, uuid);
2678 -- Name: index_repositories_on_modified_at_and_uuid; Type: INDEX; Schema: public; Owner: -
2681 CREATE INDEX index_repositories_on_modified_at_and_uuid ON public.repositories USING btree (modified_at, uuid);
2685 -- Name: index_repositories_on_name; Type: INDEX; Schema: public; Owner: -
2688 CREATE UNIQUE INDEX index_repositories_on_name ON public.repositories USING btree (name);
2692 -- Name: index_repositories_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
2695 CREATE INDEX index_repositories_on_owner_uuid ON public.repositories USING btree (owner_uuid);
2699 -- Name: index_repositories_on_uuid; Type: INDEX; Schema: public; Owner: -
2702 CREATE UNIQUE INDEX index_repositories_on_uuid ON public.repositories USING btree (uuid);
2706 -- Name: index_specimens_on_created_at; Type: INDEX; Schema: public; Owner: -
2709 CREATE INDEX index_specimens_on_created_at ON public.specimens USING btree (created_at);
2713 -- Name: index_specimens_on_modified_at; Type: INDEX; Schema: public; Owner: -
2716 CREATE INDEX index_specimens_on_modified_at ON public.specimens USING btree (modified_at);
2720 -- Name: index_specimens_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
2723 CREATE INDEX index_specimens_on_owner_uuid ON public.specimens USING btree (owner_uuid);
2727 -- Name: index_specimens_on_uuid; Type: INDEX; Schema: public; Owner: -
2730 CREATE UNIQUE INDEX index_specimens_on_uuid ON public.specimens USING btree (uuid);
2734 -- Name: index_traits_on_name; Type: INDEX; Schema: public; Owner: -
2737 CREATE INDEX index_traits_on_name ON public.traits USING btree (name);
2741 -- Name: index_traits_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
2744 CREATE INDEX index_traits_on_owner_uuid ON public.traits USING btree (owner_uuid);
2748 -- Name: index_traits_on_uuid; Type: INDEX; Schema: public; Owner: -
2751 CREATE UNIQUE INDEX index_traits_on_uuid ON public.traits USING btree (uuid);
2755 -- Name: index_trashed_groups_on_group_uuid; Type: INDEX; Schema: public; Owner: -
2758 CREATE UNIQUE INDEX index_trashed_groups_on_group_uuid ON public.trashed_groups USING btree (group_uuid);
2762 -- Name: index_users_on_created_at_and_uuid; Type: INDEX; Schema: public; Owner: -
2765 CREATE INDEX index_users_on_created_at_and_uuid ON public.users USING btree (created_at, uuid);
2769 -- Name: index_users_on_identity_url; Type: INDEX; Schema: public; Owner: -
2772 CREATE UNIQUE INDEX index_users_on_identity_url ON public.users USING btree (identity_url);
2776 -- Name: index_users_on_modified_at_and_uuid; Type: INDEX; Schema: public; Owner: -
2779 CREATE INDEX index_users_on_modified_at_and_uuid ON public.users USING btree (modified_at, uuid);
2783 -- Name: index_users_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
2786 CREATE INDEX index_users_on_owner_uuid ON public.users USING btree (owner_uuid);
2790 -- Name: index_users_on_username; Type: INDEX; Schema: public; Owner: -
2793 CREATE UNIQUE INDEX index_users_on_username ON public.users USING btree (username);
2797 -- Name: index_users_on_uuid; Type: INDEX; Schema: public; Owner: -
2800 CREATE UNIQUE INDEX index_users_on_uuid ON public.users USING btree (uuid);
2804 -- Name: index_virtual_machines_on_created_at_and_uuid; Type: INDEX; Schema: public; Owner: -
2807 CREATE INDEX index_virtual_machines_on_created_at_and_uuid ON public.virtual_machines USING btree (created_at, uuid);
2811 -- Name: index_virtual_machines_on_hostname; Type: INDEX; Schema: public; Owner: -
2814 CREATE INDEX index_virtual_machines_on_hostname ON public.virtual_machines USING btree (hostname);
2818 -- Name: index_virtual_machines_on_modified_at_and_uuid; Type: INDEX; Schema: public; Owner: -
2821 CREATE INDEX index_virtual_machines_on_modified_at_and_uuid ON public.virtual_machines USING btree (modified_at, uuid);
2825 -- Name: index_virtual_machines_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
2828 CREATE INDEX index_virtual_machines_on_owner_uuid ON public.virtual_machines USING btree (owner_uuid);
2832 -- Name: index_virtual_machines_on_uuid; Type: INDEX; Schema: public; Owner: -
2835 CREATE UNIQUE INDEX index_virtual_machines_on_uuid ON public.virtual_machines USING btree (uuid);
2839 -- Name: index_workflows_on_created_at_and_uuid; Type: INDEX; Schema: public; Owner: -
2842 CREATE INDEX index_workflows_on_created_at_and_uuid ON public.workflows USING btree (created_at, uuid);
2846 -- Name: index_workflows_on_modified_at_and_uuid; Type: INDEX; Schema: public; Owner: -
2849 CREATE INDEX index_workflows_on_modified_at_and_uuid ON public.workflows USING btree (modified_at, uuid);
2853 -- Name: index_workflows_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
2856 CREATE INDEX index_workflows_on_owner_uuid ON public.workflows USING btree (owner_uuid);
2860 -- Name: index_workflows_on_uuid; Type: INDEX; Schema: public; Owner: -
2863 CREATE UNIQUE INDEX index_workflows_on_uuid ON public.workflows USING btree (uuid);
2867 -- Name: job_tasks_search_index; Type: INDEX; Schema: public; Owner: -
2870 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);
2874 -- Name: jobs_search_index; Type: INDEX; Schema: public; Owner: -
2877 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);
2881 -- Name: jobs_trgm_text_search_idx; Type: INDEX; Schema: public; Owner: -
2884 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);
2888 -- Name: keep_disks_search_index; Type: INDEX; Schema: public; Owner: -
2891 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);
2895 -- Name: keep_services_search_index; Type: INDEX; Schema: public; Owner: -
2898 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);
2902 -- Name: links_index_on_properties; Type: INDEX; Schema: public; Owner: -
2905 CREATE INDEX links_index_on_properties ON public.links USING gin (properties);
2909 -- Name: links_search_index; Type: INDEX; Schema: public; Owner: -
2912 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);
2916 -- Name: links_tail_name_unique_if_link_class_name; Type: INDEX; Schema: public; Owner: -
2919 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);
2923 -- Name: logs_search_index; Type: INDEX; Schema: public; Owner: -
2926 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);
2930 -- Name: nodes_index_on_info; Type: INDEX; Schema: public; Owner: -
2933 CREATE INDEX nodes_index_on_info ON public.nodes USING gin (info);
2937 -- Name: nodes_index_on_properties; Type: INDEX; Schema: public; Owner: -
2940 CREATE INDEX nodes_index_on_properties ON public.nodes USING gin (properties);
2944 -- Name: nodes_search_index; Type: INDEX; Schema: public; Owner: -
2947 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);
2951 -- Name: permission_target; Type: INDEX; Schema: public; Owner: -
2954 CREATE INDEX permission_target ON public.materialized_permissions USING btree (target_uuid);
2958 -- Name: permission_user_target; Type: INDEX; Schema: public; Owner: -
2961 CREATE UNIQUE INDEX permission_user_target ON public.materialized_permissions USING btree (user_uuid, target_uuid);
2965 -- Name: pipeline_instances_search_index; Type: INDEX; Schema: public; Owner: -
2968 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);
2972 -- Name: pipeline_instances_trgm_text_search_idx; Type: INDEX; Schema: public; Owner: -
2975 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);
2979 -- Name: pipeline_template_owner_uuid_name_unique; Type: INDEX; Schema: public; Owner: -
2982 CREATE UNIQUE INDEX pipeline_template_owner_uuid_name_unique ON public.pipeline_templates USING btree (owner_uuid, name);
2986 -- Name: pipeline_templates_search_index; Type: INDEX; Schema: public; Owner: -
2989 CREATE INDEX pipeline_templates_search_index ON public.pipeline_templates USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, name);
2993 -- Name: pipeline_templates_trgm_text_search_idx; Type: INDEX; Schema: public; Owner: -
2996 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);
3000 -- Name: repositories_search_index; Type: INDEX; Schema: public; Owner: -
3003 CREATE INDEX repositories_search_index ON public.repositories USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, name);
3007 -- Name: specimens_search_index; Type: INDEX; Schema: public; Owner: -
3010 CREATE INDEX specimens_search_index ON public.specimens USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, material);
3014 -- Name: traits_search_index; Type: INDEX; Schema: public; Owner: -
3017 CREATE INDEX traits_search_index ON public.traits USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, name);
3021 -- Name: unique_schema_migrations; Type: INDEX; Schema: public; Owner: -
3024 CREATE UNIQUE INDEX unique_schema_migrations ON public.schema_migrations USING btree (version);
3028 -- Name: users_search_index; Type: INDEX; Schema: public; Owner: -
3031 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);
3035 -- Name: virtual_machines_search_index; Type: INDEX; Schema: public; Owner: -
3038 CREATE INDEX virtual_machines_search_index ON public.virtual_machines USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, hostname);
3042 -- Name: workflows_search_idx; Type: INDEX; Schema: public; Owner: -
3045 CREATE INDEX workflows_search_idx ON public.workflows USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, name);
3049 -- Name: workflows_trgm_text_search_idx; Type: INDEX; Schema: public; Owner: -
3052 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);
3056 -- PostgreSQL database dump complete
3059 SET search_path TO "$user", public;
3061 INSERT INTO "schema_migrations" (version) VALUES