X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/55aafbb07904ca24390dd47ea960eae7cb2b909a..b19eea5a71ff3fa6259df25bc0726bd1e152d89b:/services/api/db/structure.sql

diff --git a/services/api/db/structure.sql b/services/api/db/structure.sql
index 7e6bb1dca4..889ffa7486 100644
--- a/services/api/db/structure.sql
+++ b/services/api/db/structure.sql
@@ -2,14 +2,12 @@
 --
 -- SPDX-License-Identifier: AGPL-3.0
 
---
--- PostgreSQL database dump
---
-
 SET statement_timeout = 0;
 SET client_encoding = 'UTF8';
 SET standard_conforming_strings = on;
+SELECT pg_catalog.set_config('search_path', '', false);
 SET check_function_bodies = false;
+SET xmloption = content;
 SET client_min_messages = warning;
 
 --
@@ -26,17 +24,29 @@ CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
 -- COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
 
 
-SET search_path = public, pg_catalog;
+--
+-- Name: pg_trgm; Type: EXTENSION; Schema: -; Owner: -
+--
+
+CREATE EXTENSION IF NOT EXISTS pg_trgm WITH SCHEMA public;
+
+
+--
+-- Name: EXTENSION pg_trgm; Type: COMMENT; Schema: -; Owner: -
+--
+
+-- COMMENT ON EXTENSION pg_trgm IS 'text similarity measurement and index searching based on trigrams';
+
 
 SET default_tablespace = '';
 
 SET default_with_oids = false;
 
 --
--- Name: [REDACTED] Type: TABLE; Schema: public; Owner: -; Tablespace: 
+-- Name: [REDACTED] Type: TABLE; Schema: public; Owner: -
 --
 
-CREATE TABLE [REDACTED](
+CREATE TABLE public.[REDACTED](
     id integer NOT NULL,
     api_token character varying(255) NOT NULL,
     api_client_id integer NOT NULL,
@@ -57,7 +67,7 @@ CREATE TABLE [REDACTED](
 -- Name: [REDACTED] Type: SEQUENCE; Schema: public; Owner: -
 --
 
-CREATE SEQUENCE [REDACTED]+CREATE SEQUENCE public.[REDACTED]     START WITH 1
     INCREMENT BY 1
     NO MINVALUE
@@ -69,14 +79,14 @@ CREATE SEQUENCE [REDACTED] -- Name: [REDACTED] Type: SEQUENCE OWNED BY; Schema: public; Owner: -
 --
 
-ALTER SEQUENCE [REDACTED]OWNED BY api_client_authorizations.id;
+ALTER SEQUENCE public.[REDACTED]OWNED BY public.api_client_authorizations.id;
 
 
 --
--- Name: api_clients; Type: TABLE; Schema: public; Owner: -; Tablespace: 
+-- Name: api_clients; Type: TABLE; Schema: public; Owner: -
 --
 
-CREATE TABLE api_clients (
+CREATE TABLE public.api_clients (
     id integer NOT NULL,
     uuid character varying(255),
     owner_uuid character varying(255),
@@ -95,7 +105,7 @@ CREATE TABLE api_clients (
 -- Name: api_clients_id_seq; Type: SEQUENCE; Schema: public; Owner: -
 --
 
-CREATE SEQUENCE api_clients_id_seq
+CREATE SEQUENCE public.api_clients_id_seq
     START WITH 1
     INCREMENT BY 1
     NO MINVALUE
@@ -107,14 +117,26 @@ CREATE SEQUENCE api_clients_id_seq
 -- Name: api_clients_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
 --
 
-ALTER SEQUENCE api_clients_id_seq OWNED BY api_clients.id;
+ALTER SEQUENCE public.api_clients_id_seq OWNED BY public.api_clients.id;
+
+
+--
+-- Name: ar_internal_metadata; Type: TABLE; Schema: public; Owner: -
+--
+
+CREATE TABLE public.ar_internal_metadata (
+    key character varying NOT NULL,
+    value character varying,
+    created_at timestamp without time zone NOT NULL,
+    updated_at timestamp without time zone NOT NULL
+);
 
 
 --
--- Name: authorized_keys; Type: TABLE; Schema: public; Owner: -; Tablespace: 
+-- Name: authorized_keys; Type: TABLE; Schema: public; Owner: -
 --
 
-CREATE TABLE authorized_keys (
+CREATE TABLE public.authorized_keys (
     id integer NOT NULL,
     uuid character varying(255) NOT NULL,
     owner_uuid character varying(255) NOT NULL,
@@ -135,7 +157,7 @@ CREATE TABLE authorized_keys (
 -- Name: authorized_keys_id_seq; Type: SEQUENCE; Schema: public; Owner: -
 --
 
-CREATE SEQUENCE authorized_keys_id_seq
+CREATE SEQUENCE public.authorized_keys_id_seq
     START WITH 1
     INCREMENT BY 1
     NO MINVALUE
@@ -147,14 +169,14 @@ CREATE SEQUENCE authorized_keys_id_seq
 -- Name: authorized_keys_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
 --
 
-ALTER SEQUENCE authorized_keys_id_seq OWNED BY authorized_keys.id;
+ALTER SEQUENCE public.authorized_keys_id_seq OWNED BY public.authorized_keys.id;
 
 
 --
--- Name: collections; Type: TABLE; Schema: public; Owner: -; Tablespace: 
+-- Name: collections; Type: TABLE; Schema: public; Owner: -
 --
 
-CREATE TABLE collections (
+CREATE TABLE public.collections (
     id integer NOT NULL,
     owner_uuid character varying(255),
     created_at timestamp without time zone NOT NULL,
@@ -170,11 +192,19 @@ CREATE TABLE collections (
     manifest_text text,
     name character varying(255),
     description character varying(524288),
-    properties text,
+    properties jsonb,
     delete_at timestamp without time zone,
-    file_names character varying(8192),
+    file_names text,
     trash_at timestamp without time zone,
-    is_trashed boolean DEFAULT false NOT NULL
+    is_trashed boolean DEFAULT false NOT NULL,
+    storage_classes_desired jsonb DEFAULT '["default"]'::jsonb,
+    storage_classes_confirmed jsonb DEFAULT '[]'::jsonb,
+    storage_classes_confirmed_at timestamp without time zone,
+    current_version_uuid character varying,
+    version integer DEFAULT 1 NOT NULL,
+    preserve_version boolean DEFAULT false,
+    file_count integer DEFAULT 0 NOT NULL,
+    file_size_total bigint DEFAULT 0 NOT NULL
 );
 
 
@@ -182,7 +212,7 @@ CREATE TABLE collections (
 -- Name: collections_id_seq; Type: SEQUENCE; Schema: public; Owner: -
 --
 
-CREATE SEQUENCE collections_id_seq
+CREATE SEQUENCE public.collections_id_seq
     START WITH 1
     INCREMENT BY 1
     NO MINVALUE
@@ -194,81 +224,14 @@ CREATE SEQUENCE collections_id_seq
 -- Name: collections_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
 --
 
-ALTER SEQUENCE collections_id_seq OWNED BY collections.id;
-
-
---
--- Name: commit_ancestors; Type: TABLE; Schema: public; Owner: -; Tablespace: 
---
-
-CREATE TABLE commit_ancestors (
-    id integer NOT NULL,
-    repository_name character varying(255),
-    descendant character varying(255) NOT NULL,
-    ancestor character varying(255) NOT NULL,
-    "is" boolean DEFAULT false NOT NULL,
-    created_at timestamp without time zone NOT NULL,
-    updated_at timestamp without time zone NOT NULL
-);
-
-
---
--- Name: commit_ancestors_id_seq; Type: SEQUENCE; Schema: public; Owner: -
---
-
-CREATE SEQUENCE commit_ancestors_id_seq
-    START WITH 1
-    INCREMENT BY 1
-    NO MINVALUE
-    NO MAXVALUE
-    CACHE 1;
-
-
---
--- Name: commit_ancestors_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
---
-
-ALTER SEQUENCE commit_ancestors_id_seq OWNED BY commit_ancestors.id;
-
-
---
--- Name: commits; Type: TABLE; Schema: public; Owner: -; Tablespace: 
---
-
-CREATE TABLE commits (
-    id integer NOT NULL,
-    repository_name character varying(255),
-    sha1 character varying(255),
-    message character varying(255),
-    created_at timestamp without time zone NOT NULL,
-    updated_at timestamp without time zone NOT NULL
-);
-
-
---
--- Name: commits_id_seq; Type: SEQUENCE; Schema: public; Owner: -
---
-
-CREATE SEQUENCE commits_id_seq
-    START WITH 1
-    INCREMENT BY 1
-    NO MINVALUE
-    NO MAXVALUE
-    CACHE 1;
-
-
---
--- Name: commits_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
---
-
-ALTER SEQUENCE commits_id_seq OWNED BY commits.id;
+ALTER SEQUENCE public.collections_id_seq OWNED BY public.collections.id;
 
 
 --
--- Name: container_requests; Type: TABLE; Schema: public; Owner: -; Tablespace: 
+-- Name: container_requests; Type: TABLE; Schema: public; Owner: -
 --
 
-CREATE TABLE container_requests (
+CREATE TABLE public.container_requests (
     id integer NOT NULL,
     uuid character varying(255),
     owner_uuid character varying(255),
@@ -278,7 +241,7 @@ CREATE TABLE container_requests (
     modified_by_user_uuid character varying(255),
     name character varying(255),
     description text,
-    properties text,
+    properties jsonb,
     state character varying(255),
     requesting_container_uuid character varying(255),
     container_uuid character varying(255),
@@ -300,7 +263,9 @@ CREATE TABLE container_requests (
     output_uuid character varying(255),
     log_uuid character varying(255),
     output_name character varying(255) DEFAULT NULL::character varying,
-    output_ttl integer DEFAULT 0 NOT NULL
+    output_ttl integer DEFAULT 0 NOT NULL,
+    secret_mounts jsonb DEFAULT '{}'::jsonb,
+    runtime_token text
 );
 
 
@@ -308,7 +273,7 @@ CREATE TABLE container_requests (
 -- Name: container_requests_id_seq; Type: SEQUENCE; Schema: public; Owner: -
 --
 
-CREATE SEQUENCE container_requests_id_seq
+CREATE SEQUENCE public.container_requests_id_seq
     START WITH 1
     INCREMENT BY 1
     NO MINVALUE
@@ -320,14 +285,14 @@ CREATE SEQUENCE container_requests_id_seq
 -- Name: container_requests_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
 --
 
-ALTER SEQUENCE container_requests_id_seq OWNED BY container_requests.id;
+ALTER SEQUENCE public.container_requests_id_seq OWNED BY public.container_requests.id;
 
 
 --
--- Name: containers; Type: TABLE; Schema: public; Owner: -; Tablespace: 
+-- Name: containers; Type: TABLE; Schema: public; Owner: -
 --
 
-CREATE TABLE containers (
+CREATE TABLE public.containers (
     id integer NOT NULL,
     uuid character varying(255),
     owner_uuid character varying(255),
@@ -348,12 +313,19 @@ CREATE TABLE containers (
     output character varying(255),
     container_image character varying(255),
     progress double precision,
-    priority integer,
+    priority bigint,
     updated_at timestamp without time zone NOT NULL,
     exit_code integer,
     auth_uuid character varying(255),
     locked_by_uuid character varying(255),
-    scheduling_parameters text
+    scheduling_parameters text,
+    secret_mounts jsonb DEFAULT '{}'::jsonb,
+    secret_mounts_md5 character varying DEFAULT '99914b932bd37a50b983c5e7c90ae93b'::character varying,
+    runtime_status jsonb DEFAULT '{}'::jsonb,
+    runtime_user_uuid text,
+    runtime_auth_scopes jsonb,
+    runtime_token text,
+    lock_count integer DEFAULT 0 NOT NULL
 );
 
 
@@ -361,7 +333,7 @@ CREATE TABLE containers (
 -- Name: containers_id_seq; Type: SEQUENCE; Schema: public; Owner: -
 --
 
-CREATE SEQUENCE containers_id_seq
+CREATE SEQUENCE public.containers_id_seq
     START WITH 1
     INCREMENT BY 1
     NO MINVALUE
@@ -373,14 +345,14 @@ CREATE SEQUENCE containers_id_seq
 -- Name: containers_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
 --
 
-ALTER SEQUENCE containers_id_seq OWNED BY containers.id;
+ALTER SEQUENCE public.containers_id_seq OWNED BY public.containers.id;
 
 
 --
--- Name: groups; Type: TABLE; Schema: public; Owner: -; Tablespace: 
+-- Name: groups; Type: TABLE; Schema: public; Owner: -
 --
 
-CREATE TABLE groups (
+CREATE TABLE public.groups (
     id integer NOT NULL,
     uuid character varying(255),
     owner_uuid character varying(255),
@@ -391,7 +363,11 @@ CREATE TABLE groups (
     name character varying(255) NOT NULL,
     description character varying(524288),
     updated_at timestamp without time zone NOT NULL,
-    group_class character varying(255)
+    group_class character varying(255),
+    trash_at timestamp without time zone,
+    is_trashed boolean DEFAULT false NOT NULL,
+    delete_at timestamp without time zone,
+    properties jsonb DEFAULT '{}'::jsonb
 );
 
 
@@ -399,7 +375,7 @@ CREATE TABLE groups (
 -- Name: groups_id_seq; Type: SEQUENCE; Schema: public; Owner: -
 --
 
-CREATE SEQUENCE groups_id_seq
+CREATE SEQUENCE public.groups_id_seq
     START WITH 1
     INCREMENT BY 1
     NO MINVALUE
@@ -411,14 +387,14 @@ CREATE SEQUENCE groups_id_seq
 -- Name: groups_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
 --
 
-ALTER SEQUENCE groups_id_seq OWNED BY groups.id;
+ALTER SEQUENCE public.groups_id_seq OWNED BY public.groups.id;
 
 
 --
--- Name: humans; Type: TABLE; Schema: public; Owner: -; Tablespace: 
+-- Name: humans; Type: TABLE; Schema: public; Owner: -
 --
 
-CREATE TABLE humans (
+CREATE TABLE public.humans (
     id integer NOT NULL,
     uuid character varying(255) NOT NULL,
     owner_uuid character varying(255) NOT NULL,
@@ -435,7 +411,7 @@ CREATE TABLE humans (
 -- Name: humans_id_seq; Type: SEQUENCE; Schema: public; Owner: -
 --
 
-CREATE SEQUENCE humans_id_seq
+CREATE SEQUENCE public.humans_id_seq
     START WITH 1
     INCREMENT BY 1
     NO MINVALUE
@@ -447,14 +423,14 @@ CREATE SEQUENCE humans_id_seq
 -- Name: humans_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
 --
 
-ALTER SEQUENCE humans_id_seq OWNED BY humans.id;
+ALTER SEQUENCE public.humans_id_seq OWNED BY public.humans.id;
 
 
 --
--- Name: job_tasks; Type: TABLE; Schema: public; Owner: -; Tablespace: 
+-- Name: job_tasks; Type: TABLE; Schema: public; Owner: -
 --
 
-CREATE TABLE job_tasks (
+CREATE TABLE public.job_tasks (
     id integer NOT NULL,
     uuid character varying(255),
     owner_uuid character varying(255),
@@ -480,7 +456,7 @@ CREATE TABLE job_tasks (
 -- Name: job_tasks_id_seq; Type: SEQUENCE; Schema: public; Owner: -
 --
 
-CREATE SEQUENCE job_tasks_id_seq
+CREATE SEQUENCE public.job_tasks_id_seq
     START WITH 1
     INCREMENT BY 1
     NO MINVALUE
@@ -492,14 +468,14 @@ CREATE SEQUENCE job_tasks_id_seq
 -- Name: job_tasks_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
 --
 
-ALTER SEQUENCE job_tasks_id_seq OWNED BY job_tasks.id;
+ALTER SEQUENCE public.job_tasks_id_seq OWNED BY public.job_tasks.id;
 
 
 --
 -- Name: job_tasks_qsequence_seq; Type: SEQUENCE; Schema: public; Owner: -
 --
 
-CREATE SEQUENCE job_tasks_qsequence_seq
+CREATE SEQUENCE public.job_tasks_qsequence_seq
     START WITH 1
     INCREMENT BY 1
     NO MINVALUE
@@ -511,14 +487,14 @@ CREATE SEQUENCE job_tasks_qsequence_seq
 -- Name: job_tasks_qsequence_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
 --
 
-ALTER SEQUENCE job_tasks_qsequence_seq OWNED BY job_tasks.qsequence;
+ALTER SEQUENCE public.job_tasks_qsequence_seq OWNED BY public.job_tasks.qsequence;
 
 
 --
--- Name: jobs; Type: TABLE; Schema: public; Owner: -; Tablespace: 
+-- Name: jobs; Type: TABLE; Schema: public; Owner: -
 --
 
-CREATE TABLE jobs (
+CREATE TABLE public.jobs (
     id integer NOT NULL,
     uuid character varying(255),
     owner_uuid character varying(255),
@@ -560,7 +536,7 @@ CREATE TABLE jobs (
 -- Name: jobs_id_seq; Type: SEQUENCE; Schema: public; Owner: -
 --
 
-CREATE SEQUENCE jobs_id_seq
+CREATE SEQUENCE public.jobs_id_seq
     START WITH 1
     INCREMENT BY 1
     NO MINVALUE
@@ -572,14 +548,14 @@ CREATE SEQUENCE jobs_id_seq
 -- Name: jobs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
 --
 
-ALTER SEQUENCE jobs_id_seq OWNED BY jobs.id;
+ALTER SEQUENCE public.jobs_id_seq OWNED BY public.jobs.id;
 
 
 --
--- Name: keep_disks; Type: TABLE; Schema: public; Owner: -; Tablespace: 
+-- Name: keep_disks; Type: TABLE; Schema: public; Owner: -
 --
 
-CREATE TABLE keep_disks (
+CREATE TABLE public.keep_disks (
     id integer NOT NULL,
     uuid character varying(255) NOT NULL,
     owner_uuid character varying(255) NOT NULL,
@@ -606,7 +582,7 @@ CREATE TABLE keep_disks (
 -- Name: keep_disks_id_seq; Type: SEQUENCE; Schema: public; Owner: -
 --
 
-CREATE SEQUENCE keep_disks_id_seq
+CREATE SEQUENCE public.keep_disks_id_seq
     START WITH 1
     INCREMENT BY 1
     NO MINVALUE
@@ -618,14 +594,14 @@ CREATE SEQUENCE keep_disks_id_seq
 -- Name: keep_disks_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
 --
 
-ALTER SEQUENCE keep_disks_id_seq OWNED BY keep_disks.id;
+ALTER SEQUENCE public.keep_disks_id_seq OWNED BY public.keep_disks.id;
 
 
 --
--- Name: keep_services; Type: TABLE; Schema: public; Owner: -; Tablespace: 
+-- Name: keep_services; Type: TABLE; Schema: public; Owner: -
 --
 
-CREATE TABLE keep_services (
+CREATE TABLE public.keep_services (
     id integer NOT NULL,
     uuid character varying(255) NOT NULL,
     owner_uuid character varying(255) NOT NULL,
@@ -646,7 +622,7 @@ CREATE TABLE keep_services (
 -- Name: keep_services_id_seq; Type: SEQUENCE; Schema: public; Owner: -
 --
 
-CREATE SEQUENCE keep_services_id_seq
+CREATE SEQUENCE public.keep_services_id_seq
     START WITH 1
     INCREMENT BY 1
     NO MINVALUE
@@ -658,14 +634,14 @@ CREATE SEQUENCE keep_services_id_seq
 -- Name: keep_services_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
 --
 
-ALTER SEQUENCE keep_services_id_seq OWNED BY keep_services.id;
+ALTER SEQUENCE public.keep_services_id_seq OWNED BY public.keep_services.id;
 
 
 --
--- Name: links; Type: TABLE; Schema: public; Owner: -; Tablespace: 
+-- Name: links; Type: TABLE; Schema: public; Owner: -
 --
 
-CREATE TABLE links (
+CREATE TABLE public.links (
     id integer NOT NULL,
     uuid character varying(255),
     owner_uuid character varying(255),
@@ -677,7 +653,7 @@ CREATE TABLE links (
     link_class character varying(255),
     name character varying(255),
     head_uuid character varying(255),
-    properties text,
+    properties jsonb,
     updated_at timestamp without time zone NOT NULL
 );
 
@@ -686,7 +662,7 @@ CREATE TABLE links (
 -- Name: links_id_seq; Type: SEQUENCE; Schema: public; Owner: -
 --
 
-CREATE SEQUENCE links_id_seq
+CREATE SEQUENCE public.links_id_seq
     START WITH 1
     INCREMENT BY 1
     NO MINVALUE
@@ -698,14 +674,14 @@ CREATE SEQUENCE links_id_seq
 -- Name: links_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
 --
 
-ALTER SEQUENCE links_id_seq OWNED BY links.id;
+ALTER SEQUENCE public.links_id_seq OWNED BY public.links.id;
 
 
 --
--- Name: logs; Type: TABLE; Schema: public; Owner: -; Tablespace: 
+-- Name: logs; Type: TABLE; Schema: public; Owner: -
 --
 
-CREATE TABLE logs (
+CREATE TABLE public.logs (
     id integer NOT NULL,
     uuid character varying(255),
     owner_uuid character varying(255),
@@ -727,7 +703,7 @@ CREATE TABLE logs (
 -- Name: logs_id_seq; Type: SEQUENCE; Schema: public; Owner: -
 --
 
-CREATE SEQUENCE logs_id_seq
+CREATE SEQUENCE public.logs_id_seq
     START WITH 1
     INCREMENT BY 1
     NO MINVALUE
@@ -739,14 +715,102 @@ CREATE SEQUENCE logs_id_seq
 -- Name: logs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
 --
 
-ALTER SEQUENCE logs_id_seq OWNED BY logs.id;
+ALTER SEQUENCE public.logs_id_seq OWNED BY public.logs.id;
 
 
 --
--- Name: nodes; Type: TABLE; Schema: public; Owner: -; Tablespace: 
+-- Name: users; Type: TABLE; Schema: public; Owner: -
 --
 
-CREATE TABLE nodes (
+CREATE TABLE public.users (
+    id integer NOT NULL,
+    uuid character varying(255),
+    owner_uuid character varying(255) NOT NULL,
+    created_at timestamp without time zone NOT NULL,
+    modified_by_client_uuid character varying(255),
+    modified_by_user_uuid character varying(255),
+    modified_at timestamp without time zone,
+    email character varying(255),
+    first_name character varying(255),
+    last_name character varying(255),
+    identity_url character varying(255),
+    is_admin boolean,
+    prefs text,
+    updated_at timestamp without time zone NOT NULL,
+    default_owner_uuid character varying(255),
+    is_active boolean DEFAULT false,
+    username character varying(255),
+    redirect_to_user_uuid character varying
+);
+
+
+--
+-- Name: materialized_permission_view; Type: MATERIALIZED VIEW; Schema: public; Owner: -
+--
+
+CREATE MATERIALIZED VIEW public.materialized_permission_view AS
+ WITH RECURSIVE perm_value(name, val) AS (
+         VALUES ('can_read'::text,(1)::smallint), ('can_login'::text,1), ('can_write'::text,2), ('can_manage'::text,3)
+        ), perm_edges(tail_uuid, head_uuid, val, follow, trashed) AS (
+         SELECT links.tail_uuid,
+            links.head_uuid,
+            pv.val,
+            ((pv.val = 3) OR (groups.uuid IS NOT NULL)) AS follow,
+            (0)::smallint AS trashed,
+            (0)::smallint AS followtrash
+           FROM ((public.links
+             LEFT JOIN perm_value pv ON ((pv.name = (links.name)::text)))
+             LEFT JOIN public.groups ON (((pv.val < 3) AND ((groups.uuid)::text = (links.head_uuid)::text))))
+          WHERE ((links.link_class)::text = 'permission'::text)
+        UNION ALL
+         SELECT groups.owner_uuid,
+            groups.uuid,
+            3,
+            true AS bool,
+                CASE
+                    WHEN ((groups.trash_at IS NOT NULL) AND (groups.trash_at < clock_timestamp())) THEN 1
+                    ELSE 0
+                END AS "case",
+            1
+           FROM public.groups
+        ), perm(val, follow, user_uuid, target_uuid, trashed) AS (
+         SELECT (3)::smallint AS val,
+            true AS follow,
+            (users.uuid)::character varying(32) AS user_uuid,
+            (users.uuid)::character varying(32) AS target_uuid,
+            (0)::smallint AS trashed
+           FROM public.users
+        UNION
+         SELECT (LEAST((perm_1.val)::integer, edges.val))::smallint AS val,
+            edges.follow,
+            perm_1.user_uuid,
+            (edges.head_uuid)::character varying(32) AS target_uuid,
+            ((GREATEST((perm_1.trashed)::integer, edges.trashed) * edges.followtrash))::smallint AS trashed
+           FROM (perm perm_1
+             JOIN perm_edges edges ON ((perm_1.follow AND ((edges.tail_uuid)::text = (perm_1.target_uuid)::text))))
+        )
+ SELECT perm.user_uuid,
+    perm.target_uuid,
+    max(perm.val) AS perm_level,
+        CASE perm.follow
+            WHEN true THEN perm.target_uuid
+            ELSE NULL::character varying
+        END AS target_owner_uuid,
+    max(perm.trashed) AS trashed
+   FROM perm
+  GROUP BY perm.user_uuid, perm.target_uuid,
+        CASE perm.follow
+            WHEN true THEN perm.target_uuid
+            ELSE NULL::character varying
+        END
+  WITH NO DATA;
+
+
+--
+-- Name: nodes; Type: TABLE; Schema: public; Owner: -
+--
+
+CREATE TABLE public.nodes (
     id integer NOT NULL,
     uuid character varying(255),
     owner_uuid character varying(255),
@@ -760,9 +824,9 @@ CREATE TABLE nodes (
     ip_address character varying(255),
     first_ping_at timestamp without time zone,
     last_ping_at timestamp without time zone,
-    info text,
+    info jsonb,
     updated_at timestamp without time zone NOT NULL,
-    properties text,
+    properties jsonb,
     job_uuid character varying(255)
 );
 
@@ -771,7 +835,7 @@ CREATE TABLE nodes (
 -- Name: nodes_id_seq; Type: SEQUENCE; Schema: public; Owner: -
 --
 
-CREATE SEQUENCE nodes_id_seq
+CREATE SEQUENCE public.nodes_id_seq
     START WITH 1
     INCREMENT BY 1
     NO MINVALUE
@@ -783,14 +847,42 @@ CREATE SEQUENCE nodes_id_seq
 -- Name: nodes_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
 --
 
-ALTER SEQUENCE nodes_id_seq OWNED BY nodes.id;
+ALTER SEQUENCE public.nodes_id_seq OWNED BY public.nodes.id;
+
+
+--
+-- Name: permission_refresh_lock; Type: TABLE; Schema: public; Owner: -
+--
+
+CREATE TABLE public.permission_refresh_lock (
+    id integer NOT NULL
+);
+
+
+--
+-- Name: permission_refresh_lock_id_seq; Type: SEQUENCE; Schema: public; Owner: -
+--
+
+CREATE SEQUENCE public.permission_refresh_lock_id_seq
+    START WITH 1
+    INCREMENT BY 1
+    NO MINVALUE
+    NO MAXVALUE
+    CACHE 1;
+
+
+--
+-- Name: permission_refresh_lock_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
+--
+
+ALTER SEQUENCE public.permission_refresh_lock_id_seq OWNED BY public.permission_refresh_lock.id;
 
 
 --
--- Name: pipeline_instances; Type: TABLE; Schema: public; Owner: -; Tablespace: 
+-- Name: pipeline_instances; Type: TABLE; Schema: public; Owner: -
 --
 
-CREATE TABLE pipeline_instances (
+CREATE TABLE public.pipeline_instances (
     id integer NOT NULL,
     uuid character varying(255),
     owner_uuid character varying(255),
@@ -815,7 +907,7 @@ CREATE TABLE pipeline_instances (
 -- Name: pipeline_instances_id_seq; Type: SEQUENCE; Schema: public; Owner: -
 --
 
-CREATE SEQUENCE pipeline_instances_id_seq
+CREATE SEQUENCE public.pipeline_instances_id_seq
     START WITH 1
     INCREMENT BY 1
     NO MINVALUE
@@ -827,14 +919,14 @@ CREATE SEQUENCE pipeline_instances_id_seq
 -- Name: pipeline_instances_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
 --
 
-ALTER SEQUENCE pipeline_instances_id_seq OWNED BY pipeline_instances.id;
+ALTER SEQUENCE public.pipeline_instances_id_seq OWNED BY public.pipeline_instances.id;
 
 
 --
--- Name: pipeline_templates; Type: TABLE; Schema: public; Owner: -; Tablespace: 
+-- Name: pipeline_templates; Type: TABLE; Schema: public; Owner: -
 --
 
-CREATE TABLE pipeline_templates (
+CREATE TABLE public.pipeline_templates (
     id integer NOT NULL,
     uuid character varying(255),
     owner_uuid character varying(255),
@@ -853,7 +945,7 @@ CREATE TABLE pipeline_templates (
 -- Name: pipeline_templates_id_seq; Type: SEQUENCE; Schema: public; Owner: -
 --
 
-CREATE SEQUENCE pipeline_templates_id_seq
+CREATE SEQUENCE public.pipeline_templates_id_seq
     START WITH 1
     INCREMENT BY 1
     NO MINVALUE
@@ -865,14 +957,14 @@ CREATE SEQUENCE pipeline_templates_id_seq
 -- Name: pipeline_templates_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
 --
 
-ALTER SEQUENCE pipeline_templates_id_seq OWNED BY pipeline_templates.id;
+ALTER SEQUENCE public.pipeline_templates_id_seq OWNED BY public.pipeline_templates.id;
 
 
 --
--- Name: repositories; Type: TABLE; Schema: public; Owner: -; Tablespace: 
+-- Name: repositories; Type: TABLE; Schema: public; Owner: -
 --
 
-CREATE TABLE repositories (
+CREATE TABLE public.repositories (
     id integer NOT NULL,
     uuid character varying(255) NOT NULL,
     owner_uuid character varying(255) NOT NULL,
@@ -889,7 +981,7 @@ CREATE TABLE repositories (
 -- Name: repositories_id_seq; Type: SEQUENCE; Schema: public; Owner: -
 --
 
-CREATE SEQUENCE repositories_id_seq
+CREATE SEQUENCE public.repositories_id_seq
     START WITH 1
     INCREMENT BY 1
     NO MINVALUE
@@ -901,23 +993,23 @@ CREATE SEQUENCE repositories_id_seq
 -- Name: repositories_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
 --
 
-ALTER SEQUENCE repositories_id_seq OWNED BY repositories.id;
+ALTER SEQUENCE public.repositories_id_seq OWNED BY public.repositories.id;
 
 
 --
--- Name: schema_migrations; Type: TABLE; Schema: public; Owner: -; Tablespace: 
+-- Name: schema_migrations; Type: TABLE; Schema: public; Owner: -
 --
 
-CREATE TABLE schema_migrations (
+CREATE TABLE public.schema_migrations (
     version character varying(255) NOT NULL
 );
 
 
 --
--- Name: specimens; Type: TABLE; Schema: public; Owner: -; Tablespace: 
+-- Name: specimens; Type: TABLE; Schema: public; Owner: -
 --
 
-CREATE TABLE specimens (
+CREATE TABLE public.specimens (
     id integer NOT NULL,
     uuid character varying(255),
     owner_uuid character varying(255),
@@ -935,7 +1027,7 @@ CREATE TABLE specimens (
 -- Name: specimens_id_seq; Type: SEQUENCE; Schema: public; Owner: -
 --
 
-CREATE SEQUENCE specimens_id_seq
+CREATE SEQUENCE public.specimens_id_seq
     START WITH 1
     INCREMENT BY 1
     NO MINVALUE
@@ -947,14 +1039,14 @@ CREATE SEQUENCE specimens_id_seq
 -- Name: specimens_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
 --
 
-ALTER SEQUENCE specimens_id_seq OWNED BY specimens.id;
+ALTER SEQUENCE public.specimens_id_seq OWNED BY public.specimens.id;
 
 
 --
--- Name: traits; Type: TABLE; Schema: public; Owner: -; Tablespace: 
+-- Name: traits; Type: TABLE; Schema: public; Owner: -
 --
 
-CREATE TABLE traits (
+CREATE TABLE public.traits (
     id integer NOT NULL,
     uuid character varying(255) NOT NULL,
     owner_uuid character varying(255) NOT NULL,
@@ -972,7 +1064,7 @@ CREATE TABLE traits (
 -- Name: traits_id_seq; Type: SEQUENCE; Schema: public; Owner: -
 --
 
-CREATE SEQUENCE traits_id_seq
+CREATE SEQUENCE public.traits_id_seq
     START WITH 1
     INCREMENT BY 1
     NO MINVALUE
@@ -984,39 +1076,14 @@ CREATE SEQUENCE traits_id_seq
 -- Name: traits_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
 --
 
-ALTER SEQUENCE traits_id_seq OWNED BY traits.id;
-
-
---
--- Name: users; Type: TABLE; Schema: public; Owner: -; Tablespace: 
---
-
-CREATE TABLE users (
-    id integer NOT NULL,
-    uuid character varying(255),
-    owner_uuid character varying(255) NOT NULL,
-    created_at timestamp without time zone NOT NULL,
-    modified_by_client_uuid character varying(255),
-    modified_by_user_uuid character varying(255),
-    modified_at timestamp without time zone,
-    email character varying(255),
-    first_name character varying(255),
-    last_name character varying(255),
-    identity_url character varying(255),
-    is_admin boolean,
-    prefs text,
-    updated_at timestamp without time zone NOT NULL,
-    default_owner_uuid character varying(255),
-    is_active boolean DEFAULT false,
-    username character varying(255)
-);
+ALTER SEQUENCE public.traits_id_seq OWNED BY public.traits.id;
 
 
 --
 -- Name: users_id_seq; Type: SEQUENCE; Schema: public; Owner: -
 --
 
-CREATE SEQUENCE users_id_seq
+CREATE SEQUENCE public.users_id_seq
     START WITH 1
     INCREMENT BY 1
     NO MINVALUE
@@ -1028,14 +1095,14 @@ CREATE SEQUENCE users_id_seq
 -- Name: users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
 --
 
-ALTER SEQUENCE users_id_seq OWNED BY users.id;
+ALTER SEQUENCE public.users_id_seq OWNED BY public.users.id;
 
 
 --
--- Name: virtual_machines; Type: TABLE; Schema: public; Owner: -; Tablespace: 
+-- Name: virtual_machines; Type: TABLE; Schema: public; Owner: -
 --
 
-CREATE TABLE virtual_machines (
+CREATE TABLE public.virtual_machines (
     id integer NOT NULL,
     uuid character varying(255) NOT NULL,
     owner_uuid character varying(255) NOT NULL,
@@ -1052,7 +1119,7 @@ CREATE TABLE virtual_machines (
 -- Name: virtual_machines_id_seq; Type: SEQUENCE; Schema: public; Owner: -
 --
 
-CREATE SEQUENCE virtual_machines_id_seq
+CREATE SEQUENCE public.virtual_machines_id_seq
     START WITH 1
     INCREMENT BY 1
     NO MINVALUE
@@ -1064,14 +1131,14 @@ CREATE SEQUENCE virtual_machines_id_seq
 -- Name: virtual_machines_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
 --
 
-ALTER SEQUENCE virtual_machines_id_seq OWNED BY virtual_machines.id;
+ALTER SEQUENCE public.virtual_machines_id_seq OWNED BY public.virtual_machines.id;
 
 
 --
--- Name: workflows; Type: TABLE; Schema: public; Owner: -; Tablespace: 
+-- Name: workflows; Type: TABLE; Schema: public; Owner: -
 --
 
-CREATE TABLE workflows (
+CREATE TABLE public.workflows (
     id integer NOT NULL,
     uuid character varying(255),
     owner_uuid character varying(255),
@@ -1090,7 +1157,7 @@ CREATE TABLE workflows (
 -- Name: workflows_id_seq; Type: SEQUENCE; Schema: public; Owner: -
 --
 
-CREATE SEQUENCE workflows_id_seq
+CREATE SEQUENCE public.workflows_id_seq
     START WITH 1
     INCREMENT BY 1
     NO MINVALUE
@@ -1102,1692 +1169,1853 @@ CREATE SEQUENCE workflows_id_seq
 -- Name: workflows_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
 --
 
-ALTER SEQUENCE workflows_id_seq OWNED BY workflows.id;
+ALTER SEQUENCE public.workflows_id_seq OWNED BY public.workflows.id;
 
 
 --
--- Name: id; Type: DEFAULT; Schema: public; Owner: -
+-- Name: [REDACTED]id; Type: DEFAULT; Schema: public; Owner: -
 --
 
-ALTER TABLE ONLY [REDACTED]ALTER COLUMN id SET DEFAULT nextval('[REDACTED]::regclass);
+ALTER TABLE ONLY public.[REDACTED]ALTER COLUMN id SET DEFAULT nextval('public.[REDACTED]::regclass);
 
 
 --
--- Name: id; Type: DEFAULT; Schema: public; Owner: -
+-- Name: api_clients id; Type: DEFAULT; Schema: public; Owner: -
 --
 
-ALTER TABLE ONLY api_clients ALTER COLUMN id SET DEFAULT nextval('api_clients_id_seq'::regclass);
+ALTER TABLE ONLY public.api_clients ALTER COLUMN id SET DEFAULT nextval('public.api_clients_id_seq'::regclass);
 
 
 --
--- Name: id; Type: DEFAULT; Schema: public; Owner: -
+-- Name: authorized_keys id; Type: DEFAULT; Schema: public; Owner: -
 --
 
-ALTER TABLE ONLY authorized_keys ALTER COLUMN id SET DEFAULT nextval('authorized_keys_id_seq'::regclass);
+ALTER TABLE ONLY public.authorized_keys ALTER COLUMN id SET DEFAULT nextval('public.authorized_keys_id_seq'::regclass);
 
 
 --
--- Name: id; Type: DEFAULT; Schema: public; Owner: -
+-- Name: collections id; Type: DEFAULT; Schema: public; Owner: -
 --
 
-ALTER TABLE ONLY collections ALTER COLUMN id SET DEFAULT nextval('collections_id_seq'::regclass);
+ALTER TABLE ONLY public.collections ALTER COLUMN id SET DEFAULT nextval('public.collections_id_seq'::regclass);
 
 
 --
--- Name: id; Type: DEFAULT; Schema: public; Owner: -
+-- Name: container_requests id; Type: DEFAULT; Schema: public; Owner: -
 --
 
-ALTER TABLE ONLY commit_ancestors ALTER COLUMN id SET DEFAULT nextval('commit_ancestors_id_seq'::regclass);
+ALTER TABLE ONLY public.container_requests ALTER COLUMN id SET DEFAULT nextval('public.container_requests_id_seq'::regclass);
 
 
 --
--- Name: id; Type: DEFAULT; Schema: public; Owner: -
+-- Name: containers id; Type: DEFAULT; Schema: public; Owner: -
 --
 
-ALTER TABLE ONLY commits ALTER COLUMN id SET DEFAULT nextval('commits_id_seq'::regclass);
+ALTER TABLE ONLY public.containers ALTER COLUMN id SET DEFAULT nextval('public.containers_id_seq'::regclass);
 
 
 --
--- Name: id; Type: DEFAULT; Schema: public; Owner: -
+-- Name: groups id; Type: DEFAULT; Schema: public; Owner: -
 --
 
-ALTER TABLE ONLY container_requests ALTER COLUMN id SET DEFAULT nextval('container_requests_id_seq'::regclass);
+ALTER TABLE ONLY public.groups ALTER COLUMN id SET DEFAULT nextval('public.groups_id_seq'::regclass);
 
 
 --
--- Name: id; Type: DEFAULT; Schema: public; Owner: -
+-- Name: humans id; Type: DEFAULT; Schema: public; Owner: -
 --
 
-ALTER TABLE ONLY containers ALTER COLUMN id SET DEFAULT nextval('containers_id_seq'::regclass);
+ALTER TABLE ONLY public.humans ALTER COLUMN id SET DEFAULT nextval('public.humans_id_seq'::regclass);
 
 
 --
--- Name: id; Type: DEFAULT; Schema: public; Owner: -
+-- Name: job_tasks id; Type: DEFAULT; Schema: public; Owner: -
 --
 
-ALTER TABLE ONLY groups ALTER COLUMN id SET DEFAULT nextval('groups_id_seq'::regclass);
+ALTER TABLE ONLY public.job_tasks ALTER COLUMN id SET DEFAULT nextval('public.job_tasks_id_seq'::regclass);
 
 
 --
--- Name: id; Type: DEFAULT; Schema: public; Owner: -
+-- Name: jobs id; Type: DEFAULT; Schema: public; Owner: -
 --
 
-ALTER TABLE ONLY humans ALTER COLUMN id SET DEFAULT nextval('humans_id_seq'::regclass);
+ALTER TABLE ONLY public.jobs ALTER COLUMN id SET DEFAULT nextval('public.jobs_id_seq'::regclass);
 
 
 --
--- Name: id; Type: DEFAULT; Schema: public; Owner: -
+-- Name: keep_disks id; Type: DEFAULT; Schema: public; Owner: -
 --
 
-ALTER TABLE ONLY job_tasks ALTER COLUMN id SET DEFAULT nextval('job_tasks_id_seq'::regclass);
+ALTER TABLE ONLY public.keep_disks ALTER COLUMN id SET DEFAULT nextval('public.keep_disks_id_seq'::regclass);
 
 
 --
--- Name: id; Type: DEFAULT; Schema: public; Owner: -
+-- Name: keep_services id; Type: DEFAULT; Schema: public; Owner: -
 --
 
-ALTER TABLE ONLY jobs ALTER COLUMN id SET DEFAULT nextval('jobs_id_seq'::regclass);
+ALTER TABLE ONLY public.keep_services ALTER COLUMN id SET DEFAULT nextval('public.keep_services_id_seq'::regclass);
 
 
 --
--- Name: id; Type: DEFAULT; Schema: public; Owner: -
+-- Name: links id; Type: DEFAULT; Schema: public; Owner: -
 --
 
-ALTER TABLE ONLY keep_disks ALTER COLUMN id SET DEFAULT nextval('keep_disks_id_seq'::regclass);
+ALTER TABLE ONLY public.links ALTER COLUMN id SET DEFAULT nextval('public.links_id_seq'::regclass);
 
 
 --
--- Name: id; Type: DEFAULT; Schema: public; Owner: -
+-- Name: logs id; Type: DEFAULT; Schema: public; Owner: -
 --
 
-ALTER TABLE ONLY keep_services ALTER COLUMN id SET DEFAULT nextval('keep_services_id_seq'::regclass);
+ALTER TABLE ONLY public.logs ALTER COLUMN id SET DEFAULT nextval('public.logs_id_seq'::regclass);
 
 
 --
--- Name: id; Type: DEFAULT; Schema: public; Owner: -
+-- Name: nodes id; Type: DEFAULT; Schema: public; Owner: -
 --
 
-ALTER TABLE ONLY links ALTER COLUMN id SET DEFAULT nextval('links_id_seq'::regclass);
+ALTER TABLE ONLY public.nodes ALTER COLUMN id SET DEFAULT nextval('public.nodes_id_seq'::regclass);
 
 
 --
--- Name: id; Type: DEFAULT; Schema: public; Owner: -
+-- Name: permission_refresh_lock id; Type: DEFAULT; Schema: public; Owner: -
 --
 
-ALTER TABLE ONLY logs ALTER COLUMN id SET DEFAULT nextval('logs_id_seq'::regclass);
+ALTER TABLE ONLY public.permission_refresh_lock ALTER COLUMN id SET DEFAULT nextval('public.permission_refresh_lock_id_seq'::regclass);
 
 
 --
--- Name: id; Type: DEFAULT; Schema: public; Owner: -
+-- Name: pipeline_instances id; Type: DEFAULT; Schema: public; Owner: -
 --
 
-ALTER TABLE ONLY nodes ALTER COLUMN id SET DEFAULT nextval('nodes_id_seq'::regclass);
+ALTER TABLE ONLY public.pipeline_instances ALTER COLUMN id SET DEFAULT nextval('public.pipeline_instances_id_seq'::regclass);
 
 
 --
--- Name: id; Type: DEFAULT; Schema: public; Owner: -
+-- Name: pipeline_templates id; Type: DEFAULT; Schema: public; Owner: -
 --
 
-ALTER TABLE ONLY pipeline_instances ALTER COLUMN id SET DEFAULT nextval('pipeline_instances_id_seq'::regclass);
+ALTER TABLE ONLY public.pipeline_templates ALTER COLUMN id SET DEFAULT nextval('public.pipeline_templates_id_seq'::regclass);
 
 
 --
--- Name: id; Type: DEFAULT; Schema: public; Owner: -
+-- Name: repositories id; Type: DEFAULT; Schema: public; Owner: -
 --
 
-ALTER TABLE ONLY pipeline_templates ALTER COLUMN id SET DEFAULT nextval('pipeline_templates_id_seq'::regclass);
+ALTER TABLE ONLY public.repositories ALTER COLUMN id SET DEFAULT nextval('public.repositories_id_seq'::regclass);
 
 
 --
--- Name: id; Type: DEFAULT; Schema: public; Owner: -
+-- Name: specimens id; Type: DEFAULT; Schema: public; Owner: -
 --
 
-ALTER TABLE ONLY repositories ALTER COLUMN id SET DEFAULT nextval('repositories_id_seq'::regclass);
+ALTER TABLE ONLY public.specimens ALTER COLUMN id SET DEFAULT nextval('public.specimens_id_seq'::regclass);
 
 
 --
--- Name: id; Type: DEFAULT; Schema: public; Owner: -
+-- Name: traits id; Type: DEFAULT; Schema: public; Owner: -
 --
 
-ALTER TABLE ONLY specimens ALTER COLUMN id SET DEFAULT nextval('specimens_id_seq'::regclass);
+ALTER TABLE ONLY public.traits ALTER COLUMN id SET DEFAULT nextval('public.traits_id_seq'::regclass);
 
 
 --
--- Name: id; Type: DEFAULT; Schema: public; Owner: -
+-- Name: users id; Type: DEFAULT; Schema: public; Owner: -
 --
 
-ALTER TABLE ONLY traits ALTER COLUMN id SET DEFAULT nextval('traits_id_seq'::regclass);
+ALTER TABLE ONLY public.users ALTER COLUMN id SET DEFAULT nextval('public.users_id_seq'::regclass);
 
 
 --
--- Name: id; Type: DEFAULT; Schema: public; Owner: -
+-- Name: virtual_machines id; Type: DEFAULT; Schema: public; Owner: -
 --
 
-ALTER TABLE ONLY users ALTER COLUMN id SET DEFAULT nextval('users_id_seq'::regclass);
+ALTER TABLE ONLY public.virtual_machines ALTER COLUMN id SET DEFAULT nextval('public.virtual_machines_id_seq'::regclass);
 
 
 --
--- Name: id; Type: DEFAULT; Schema: public; Owner: -
+-- Name: workflows id; Type: DEFAULT; Schema: public; Owner: -
 --
 
-ALTER TABLE ONLY virtual_machines ALTER COLUMN id SET DEFAULT nextval('virtual_machines_id_seq'::regclass);
+ALTER TABLE ONLY public.workflows ALTER COLUMN id SET DEFAULT nextval('public.workflows_id_seq'::regclass);
 
 
 --
--- Name: id; Type: DEFAULT; Schema: public; Owner: -
+-- Name: [REDACTED] Type: CONSTRAINT; Schema: public; Owner: -
 --
 
-ALTER TABLE ONLY workflows ALTER COLUMN id SET DEFAULT nextval('workflows_id_seq'::regclass);
-
-
---
--- Name: [REDACTED] Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
---
-
-ALTER TABLE ONLY [REDACTED]+ALTER TABLE ONLY public.[REDACTED]     ADD CONSTRAINT [REDACTED]PRIMARY KEY (id);
 
 
 --
--- Name: api_clients_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
+-- Name: api_clients api_clients_pkey; Type: CONSTRAINT; Schema: public; Owner: -
 --
 
-ALTER TABLE ONLY api_clients
+ALTER TABLE ONLY public.api_clients
     ADD CONSTRAINT api_clients_pkey PRIMARY KEY (id);
 
 
 --
--- Name: authorized_keys_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
+-- Name: ar_internal_metadata ar_internal_metadata_pkey; Type: CONSTRAINT; Schema: public; Owner: -
 --
 
-ALTER TABLE ONLY authorized_keys
-    ADD CONSTRAINT authorized_keys_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY public.ar_internal_metadata
+    ADD CONSTRAINT ar_internal_metadata_pkey PRIMARY KEY (key);
 
 
 --
--- Name: collections_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
+-- Name: authorized_keys authorized_keys_pkey; Type: CONSTRAINT; Schema: public; Owner: -
 --
 
-ALTER TABLE ONLY collections
-    ADD CONSTRAINT collections_pkey PRIMARY KEY (id);
-
-
---
--- Name: commit_ancestors_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
---
-
-ALTER TABLE ONLY commit_ancestors
-    ADD CONSTRAINT commit_ancestors_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY public.authorized_keys
+    ADD CONSTRAINT authorized_keys_pkey PRIMARY KEY (id);
 
 
 --
--- Name: commits_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
+-- Name: collections collections_pkey; Type: CONSTRAINT; Schema: public; Owner: -
 --
 
-ALTER TABLE ONLY commits
-    ADD CONSTRAINT commits_pkey PRIMARY KEY (id);
+ALTER TABLE ONLY public.collections
+    ADD CONSTRAINT collections_pkey PRIMARY KEY (id);
 
 
 --
--- Name: container_requests_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
+-- Name: container_requests container_requests_pkey; Type: CONSTRAINT; Schema: public; Owner: -
 --
 
-ALTER TABLE ONLY container_requests
+ALTER TABLE ONLY public.container_requests
     ADD CONSTRAINT container_requests_pkey PRIMARY KEY (id);
 
 
 --
--- Name: containers_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
+-- Name: containers containers_pkey; Type: CONSTRAINT; Schema: public; Owner: -
 --
 
-ALTER TABLE ONLY containers
+ALTER TABLE ONLY public.containers
     ADD CONSTRAINT containers_pkey PRIMARY KEY (id);
 
 
 --
--- Name: groups_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
+-- Name: groups groups_pkey; Type: CONSTRAINT; Schema: public; Owner: -
 --
 
-ALTER TABLE ONLY groups
+ALTER TABLE ONLY public.groups
     ADD CONSTRAINT groups_pkey PRIMARY KEY (id);
 
 
 --
--- Name: humans_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
+-- Name: humans humans_pkey; Type: CONSTRAINT; Schema: public; Owner: -
 --
 
-ALTER TABLE ONLY humans
+ALTER TABLE ONLY public.humans
     ADD CONSTRAINT humans_pkey PRIMARY KEY (id);
 
 
 --
--- Name: job_tasks_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
+-- Name: job_tasks job_tasks_pkey; Type: CONSTRAINT; Schema: public; Owner: -
 --
 
-ALTER TABLE ONLY job_tasks
+ALTER TABLE ONLY public.job_tasks
     ADD CONSTRAINT job_tasks_pkey PRIMARY KEY (id);
 
 
 --
--- Name: jobs_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
+-- Name: jobs jobs_pkey; Type: CONSTRAINT; Schema: public; Owner: -
 --
 
-ALTER TABLE ONLY jobs
+ALTER TABLE ONLY public.jobs
     ADD CONSTRAINT jobs_pkey PRIMARY KEY (id);
 
 
 --
--- Name: keep_disks_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
+-- Name: keep_disks keep_disks_pkey; Type: CONSTRAINT; Schema: public; Owner: -
 --
 
-ALTER TABLE ONLY keep_disks
+ALTER TABLE ONLY public.keep_disks
     ADD CONSTRAINT keep_disks_pkey PRIMARY KEY (id);
 
 
 --
--- Name: keep_services_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
+-- Name: keep_services keep_services_pkey; Type: CONSTRAINT; Schema: public; Owner: -
 --
 
-ALTER TABLE ONLY keep_services
+ALTER TABLE ONLY public.keep_services
     ADD CONSTRAINT keep_services_pkey PRIMARY KEY (id);
 
 
 --
--- Name: links_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
+-- Name: links links_pkey; Type: CONSTRAINT; Schema: public; Owner: -
 --
 
-ALTER TABLE ONLY links
+ALTER TABLE ONLY public.links
     ADD CONSTRAINT links_pkey PRIMARY KEY (id);
 
 
 --
--- Name: logs_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
+-- Name: logs logs_pkey; Type: CONSTRAINT; Schema: public; Owner: -
 --
 
-ALTER TABLE ONLY logs
+ALTER TABLE ONLY public.logs
     ADD CONSTRAINT logs_pkey PRIMARY KEY (id);
 
 
 --
--- Name: nodes_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
+-- Name: nodes nodes_pkey; Type: CONSTRAINT; Schema: public; Owner: -
 --
 
-ALTER TABLE ONLY nodes
+ALTER TABLE ONLY public.nodes
     ADD CONSTRAINT nodes_pkey PRIMARY KEY (id);
 
 
 --
--- Name: pipeline_instances_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
+-- Name: permission_refresh_lock permission_refresh_lock_pkey; Type: CONSTRAINT; Schema: public; Owner: -
 --
 
-ALTER TABLE ONLY pipeline_instances
+ALTER TABLE ONLY public.permission_refresh_lock
+    ADD CONSTRAINT permission_refresh_lock_pkey PRIMARY KEY (id);
+
+
+--
+-- Name: pipeline_instances pipeline_instances_pkey; Type: CONSTRAINT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY public.pipeline_instances
     ADD CONSTRAINT pipeline_instances_pkey PRIMARY KEY (id);
 
 
 --
--- Name: pipeline_templates_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
+-- Name: pipeline_templates pipeline_templates_pkey; Type: CONSTRAINT; Schema: public; Owner: -
 --
 
-ALTER TABLE ONLY pipeline_templates
+ALTER TABLE ONLY public.pipeline_templates
     ADD CONSTRAINT pipeline_templates_pkey PRIMARY KEY (id);
 
 
 --
--- Name: repositories_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
+-- Name: repositories repositories_pkey; Type: CONSTRAINT; Schema: public; Owner: -
 --
 
-ALTER TABLE ONLY repositories
+ALTER TABLE ONLY public.repositories
     ADD CONSTRAINT repositories_pkey PRIMARY KEY (id);
 
 
 --
--- Name: specimens_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
+-- Name: specimens specimens_pkey; Type: CONSTRAINT; Schema: public; Owner: -
 --
 
-ALTER TABLE ONLY specimens
+ALTER TABLE ONLY public.specimens
     ADD CONSTRAINT specimens_pkey PRIMARY KEY (id);
 
 
 --
--- Name: traits_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
+-- Name: traits traits_pkey; Type: CONSTRAINT; Schema: public; Owner: -
 --
 
-ALTER TABLE ONLY traits
+ALTER TABLE ONLY public.traits
     ADD CONSTRAINT traits_pkey PRIMARY KEY (id);
 
 
 --
--- Name: users_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
+-- Name: users users_pkey; Type: CONSTRAINT; Schema: public; Owner: -
 --
 
-ALTER TABLE ONLY users
+ALTER TABLE ONLY public.users
     ADD CONSTRAINT users_pkey PRIMARY KEY (id);
 
 
 --
--- Name: virtual_machines_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
+-- Name: virtual_machines virtual_machines_pkey; Type: CONSTRAINT; Schema: public; Owner: -
 --
 
-ALTER TABLE ONLY virtual_machines
+ALTER TABLE ONLY public.virtual_machines
     ADD CONSTRAINT virtual_machines_pkey PRIMARY KEY (id);
 
 
 --
--- Name: workflows_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
+-- Name: workflows workflows_pkey; Type: CONSTRAINT; Schema: public; Owner: -
 --
 
-ALTER TABLE ONLY workflows
+ALTER TABLE ONLY public.workflows
     ADD CONSTRAINT workflows_pkey PRIMARY KEY (id);
 
 
 --
--- Name: [REDACTED] Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: [REDACTED] Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX [REDACTED]ON [REDACTED]USING btree (api_token, created_by_ip_address, last_used_by_ip_address, default_owner_uuid, uuid);
+CREATE INDEX [REDACTED]ON public.[REDACTED]USING btree (api_token, created_by_ip_address, last_used_by_ip_address, default_owner_uuid, uuid);
 
 
 --
--- Name: [REDACTED] Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: [REDACTED] Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX [REDACTED]ON api_clients USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, name, url_prefix);
+CREATE INDEX [REDACTED]ON public.api_clients USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, name, url_prefix);
 
 
 --
--- Name: authorized_keys_search_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: authorized_keys_search_index; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX authorized_keys_search_index ON authorized_keys USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, name, key_type, authorized_user_uuid);
+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);
 
 
 --
--- Name: collections_full_text_search_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: collection_index_on_properties; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX collections_full_text_search_idx ON collections USING gin (to_tsvector('english'::regconfig, (((((((((((((((((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) || (COALESCE(file_names, ''::character varying))::text)));
+CREATE INDEX collection_index_on_properties ON public.collections USING gin (properties);
 
 
 --
--- Name: collections_search_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: collections_full_text_search_idx; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX collections_search_index ON collections USING btree (owner_uuid, modified_by_client_uuid, modified_by_user_uuid, portable_data_hash, uuid, name);
+CREATE INDEX collections_full_text_search_idx ON public.collections USING gin (to_tsvector('english'::regconfig, substr((((((((((((((((((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)), 0, 1000000)));
 
 
 --
--- Name: container_requests_full_text_search_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: collections_search_index; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX container_requests_full_text_search_idx ON container_requests USING gin (to_tsvector('english'::regconfig, (((((((((((((((((((((((((((((((((((((((((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) || (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)));
+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);
 
 
 --
--- Name: container_requests_search_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: collections_trgm_text_search_idx; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX container_requests_search_index ON 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);
+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);
 
 
 --
--- Name: containers_search_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: container_requests_full_text_search_idx; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX containers_search_index ON 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);
+CREATE INDEX container_requests_full_text_search_idx ON public.container_requests USING gin (to_tsvector('english'::regconfig, substr((((((((((((((((((((((((((((((((((((((((((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), 0, 1000000)));
 
 
 --
--- Name: groups_full_text_search_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: container_requests_index_on_properties; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX groups_full_text_search_idx ON groups USING gin (to_tsvector('english'::regconfig, (((((((((((((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)));
+CREATE INDEX container_requests_index_on_properties ON public.container_requests USING gin (properties);
 
 
 --
--- Name: groups_owner_uuid_name_unique; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: container_requests_search_index; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE UNIQUE INDEX groups_owner_uuid_name_unique ON groups USING btree (owner_uuid, name);
+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);
 
 
 --
--- Name: groups_search_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: container_requests_trgm_text_search_idx; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX groups_search_index ON groups USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, name, group_class);
+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);
 
 
 --
--- Name: humans_search_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: containers_search_index; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX humans_search_index ON humans USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid);
+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);
 
 
 --
--- Name: index_api_client_authorizations_on_api_client_id; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: group_index_on_properties; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_api_client_authorizations_on_api_client_id ON [REDACTED]USING btree (api_client_id);
+CREATE INDEX group_index_on_properties ON public.groups USING gin (properties);
 
 
 --
--- Name: index_api_client_authorizations_on_api_token; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: groups_full_text_search_idx; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE UNIQUE INDEX index_api_client_authorizations_on_api_token ON [REDACTED]USING btree (api_token);
+CREATE INDEX groups_full_text_search_idx ON public.groups USING gin (to_tsvector('english'::regconfig, substr((((((((((((((((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)), 0, 1000000)));
 
 
 --
--- Name: index_api_client_authorizations_on_expires_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: groups_search_index; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_api_client_authorizations_on_expires_at ON [REDACTED]USING btree (expires_at);
+CREATE INDEX groups_search_index ON public.groups USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, name, group_class);
 
 
 --
--- Name: index_api_client_authorizations_on_user_id; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: groups_trgm_text_search_idx; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_api_client_authorizations_on_user_id ON [REDACTED]USING btree (user_id);
+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);
 
 
 --
--- Name: index_api_client_authorizations_on_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: humans_search_index; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE UNIQUE INDEX index_api_client_authorizations_on_uuid ON [REDACTED]USING btree (uuid);
+CREATE INDEX humans_search_index ON public.humans USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid);
 
 
 --
--- Name: index_api_clients_on_created_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_api_client_authorizations_on_api_client_id; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_api_clients_on_created_at ON api_clients USING btree (created_at);
+CREATE INDEX index_api_client_authorizations_on_api_client_id ON public.[REDACTED]USING btree (api_client_id);
 
 
 --
--- Name: index_api_clients_on_modified_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_api_client_authorizations_on_api_token; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_api_clients_on_modified_at ON api_clients USING btree (modified_at);
+CREATE UNIQUE INDEX index_api_client_authorizations_on_api_token ON public.[REDACTED]USING btree (api_token);
 
 
 --
--- Name: index_api_clients_on_owner_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_api_client_authorizations_on_expires_at; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_api_clients_on_owner_uuid ON api_clients USING btree (owner_uuid);
+CREATE INDEX index_api_client_authorizations_on_expires_at ON public.[REDACTED]USING btree (expires_at);
 
 
 --
--- Name: index_api_clients_on_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_api_client_authorizations_on_user_id; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE UNIQUE INDEX index_api_clients_on_uuid ON api_clients USING btree (uuid);
+CREATE INDEX index_api_client_authorizations_on_user_id ON public.[REDACTED]USING btree (user_id);
 
 
 --
--- Name: index_authkeys_on_user_and_expires_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_api_client_authorizations_on_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_authkeys_on_user_and_expires_at ON authorized_keys USING btree (authorized_user_uuid, expires_at);
+CREATE UNIQUE INDEX index_api_client_authorizations_on_uuid ON public.[REDACTED]USING btree (uuid);
 
 
 --
--- Name: index_authorized_keys_on_owner_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_api_clients_on_created_at; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_authorized_keys_on_owner_uuid ON authorized_keys USING btree (owner_uuid);
+CREATE INDEX index_api_clients_on_created_at ON public.api_clients USING btree (created_at);
 
 
 --
--- Name: index_authorized_keys_on_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_api_clients_on_modified_at; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE UNIQUE INDEX index_authorized_keys_on_uuid ON authorized_keys USING btree (uuid);
+CREATE INDEX index_api_clients_on_modified_at ON public.api_clients USING btree (modified_at);
 
 
 --
--- Name: index_collections_on_created_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_api_clients_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_collections_on_created_at ON collections USING btree (created_at);
+CREATE INDEX index_api_clients_on_owner_uuid ON public.api_clients USING btree (owner_uuid);
 
 
 --
--- Name: index_collections_on_delete_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_api_clients_on_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_collections_on_delete_at ON collections USING btree (delete_at);
+CREATE UNIQUE INDEX index_api_clients_on_uuid ON public.api_clients USING btree (uuid);
 
 
 --
--- Name: index_collections_on_is_trashed; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_authkeys_on_user_and_expires_at; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_collections_on_is_trashed ON collections USING btree (is_trashed);
+CREATE INDEX index_authkeys_on_user_and_expires_at ON public.authorized_keys USING btree (authorized_user_uuid, expires_at);
 
 
 --
--- Name: index_collections_on_modified_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_authorized_keys_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_collections_on_modified_at ON collections USING btree (modified_at);
+CREATE INDEX index_authorized_keys_on_owner_uuid ON public.authorized_keys USING btree (owner_uuid);
 
 
 --
--- Name: index_collections_on_owner_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_authorized_keys_on_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_collections_on_owner_uuid ON collections USING btree (owner_uuid);
+CREATE UNIQUE INDEX index_authorized_keys_on_uuid ON public.authorized_keys USING btree (uuid);
 
 
 --
--- Name: index_collections_on_owner_uuid_and_name; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_collections_on_created_at; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE UNIQUE INDEX index_collections_on_owner_uuid_and_name ON collections USING btree (owner_uuid, name) WHERE (is_trashed = false);
+CREATE INDEX index_collections_on_created_at ON public.collections USING btree (created_at);
 
 
 --
--- Name: index_collections_on_portable_data_hash; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_collections_on_current_version_uuid_and_version; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_collections_on_portable_data_hash ON collections USING btree (portable_data_hash);
+CREATE UNIQUE INDEX index_collections_on_current_version_uuid_and_version ON public.collections USING btree (current_version_uuid, version);
 
 
 --
--- Name: index_collections_on_trash_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_collections_on_delete_at; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_collections_on_trash_at ON collections USING btree (trash_at);
+CREATE INDEX index_collections_on_delete_at ON public.collections USING btree (delete_at);
 
 
 --
--- Name: index_collections_on_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_collections_on_is_trashed; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE UNIQUE INDEX index_collections_on_uuid ON collections USING btree (uuid);
+CREATE INDEX index_collections_on_is_trashed ON public.collections USING btree (is_trashed);
 
 
 --
--- Name: index_commit_ancestors_on_descendant_and_ancestor; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_collections_on_modified_at; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE UNIQUE INDEX index_commit_ancestors_on_descendant_and_ancestor ON commit_ancestors USING btree (descendant, ancestor);
+CREATE INDEX index_collections_on_modified_at ON public.collections USING btree (modified_at);
 
 
 --
--- Name: index_commits_on_repository_name_and_sha1; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_collections_on_modified_at_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE UNIQUE INDEX index_commits_on_repository_name_and_sha1 ON commits USING btree (repository_name, sha1);
+CREATE INDEX index_collections_on_modified_at_uuid ON public.collections USING btree (modified_at DESC, uuid);
 
 
 --
--- Name: index_container_requests_on_owner_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_collections_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_container_requests_on_owner_uuid ON container_requests USING btree (owner_uuid);
+CREATE INDEX index_collections_on_owner_uuid ON public.collections USING btree (owner_uuid);
 
 
 --
--- Name: index_container_requests_on_requesting_container_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_collections_on_owner_uuid_and_name; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_container_requests_on_requesting_container_uuid ON container_requests USING btree (requesting_container_uuid);
+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));
 
 
 --
--- Name: index_container_requests_on_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_collections_on_portable_data_hash_and_trash_at; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE UNIQUE INDEX index_container_requests_on_uuid ON container_requests USING btree (uuid);
+CREATE INDEX index_collections_on_portable_data_hash_and_trash_at ON public.collections USING btree (portable_data_hash, trash_at);
 
 
 --
--- Name: index_containers_on_owner_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_collections_on_trash_at; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_containers_on_owner_uuid ON containers USING btree (owner_uuid);
+CREATE INDEX index_collections_on_trash_at ON public.collections USING btree (trash_at);
 
 
 --
--- Name: index_containers_on_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_collections_on_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE UNIQUE INDEX index_containers_on_uuid ON containers USING btree (uuid);
+CREATE UNIQUE INDEX index_collections_on_uuid ON public.collections USING btree (uuid);
 
 
 --
--- Name: index_groups_on_created_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_container_requests_on_container_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_groups_on_created_at ON groups USING btree (created_at);
+CREATE INDEX index_container_requests_on_container_uuid ON public.container_requests USING btree (container_uuid);
 
 
 --
--- Name: index_groups_on_group_class; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_container_requests_on_modified_at_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_groups_on_group_class ON groups USING btree (group_class);
+CREATE INDEX index_container_requests_on_modified_at_uuid ON public.container_requests USING btree (modified_at DESC, uuid);
 
 
 --
--- Name: index_groups_on_modified_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_container_requests_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_groups_on_modified_at ON groups USING btree (modified_at);
+CREATE INDEX index_container_requests_on_owner_uuid ON public.container_requests USING btree (owner_uuid);
 
 
 --
--- Name: index_groups_on_owner_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_container_requests_on_requesting_container_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_groups_on_owner_uuid ON groups USING btree (owner_uuid);
+CREATE INDEX index_container_requests_on_requesting_container_uuid ON public.container_requests USING btree (requesting_container_uuid);
 
 
 --
--- Name: index_groups_on_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_container_requests_on_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE UNIQUE INDEX index_groups_on_uuid ON groups USING btree (uuid);
+CREATE UNIQUE INDEX index_container_requests_on_uuid ON public.container_requests USING btree (uuid);
 
 
 --
--- Name: index_humans_on_owner_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_containers_on_auth_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_humans_on_owner_uuid ON humans USING btree (owner_uuid);
+CREATE INDEX index_containers_on_auth_uuid ON public.containers USING btree (auth_uuid);
 
 
 --
--- Name: index_humans_on_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_containers_on_locked_by_uuid_and_priority; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE UNIQUE INDEX index_humans_on_uuid ON humans USING btree (uuid);
+CREATE INDEX index_containers_on_locked_by_uuid_and_priority ON public.containers USING btree (locked_by_uuid, priority);
 
 
 --
--- Name: index_job_tasks_on_created_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_containers_on_locked_by_uuid_and_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_job_tasks_on_created_at ON job_tasks USING btree (created_at);
+CREATE INDEX index_containers_on_locked_by_uuid_and_uuid ON public.containers USING btree (locked_by_uuid, uuid);
 
 
 --
--- Name: index_job_tasks_on_created_by_job_task_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_containers_on_modified_at_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_job_tasks_on_created_by_job_task_uuid ON job_tasks USING btree (created_by_job_task_uuid);
+CREATE INDEX index_containers_on_modified_at_uuid ON public.containers USING btree (modified_at DESC, uuid);
 
 
 --
--- Name: index_job_tasks_on_job_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_containers_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_job_tasks_on_job_uuid ON job_tasks USING btree (job_uuid);
+CREATE INDEX index_containers_on_owner_uuid ON public.containers USING btree (owner_uuid);
 
 
 --
--- Name: index_job_tasks_on_modified_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_containers_on_queued_state; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_job_tasks_on_modified_at ON job_tasks USING btree (modified_at);
+CREATE INDEX index_containers_on_queued_state ON public.containers USING btree (state, ((priority > 0)));
 
 
 --
--- Name: index_job_tasks_on_owner_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_containers_on_reuse_columns; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_job_tasks_on_owner_uuid ON job_tasks USING btree (owner_uuid);
+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));
 
 
 --
--- Name: index_job_tasks_on_sequence; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_containers_on_runtime_status; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_job_tasks_on_sequence ON job_tasks USING btree (sequence);
+CREATE INDEX index_containers_on_runtime_status ON public.containers USING gin (runtime_status);
 
 
 --
--- Name: index_job_tasks_on_success; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_containers_on_secret_mounts_md5; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_job_tasks_on_success ON job_tasks USING btree (success);
+CREATE INDEX index_containers_on_secret_mounts_md5 ON public.containers USING btree (secret_mounts_md5);
 
 
 --
--- Name: index_job_tasks_on_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_containers_on_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE UNIQUE INDEX index_job_tasks_on_uuid ON job_tasks USING btree (uuid);
+CREATE UNIQUE INDEX index_containers_on_uuid ON public.containers USING btree (uuid);
 
 
 --
--- Name: index_jobs_on_created_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_groups_on_created_at; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_jobs_on_created_at ON jobs USING btree (created_at);
+CREATE INDEX index_groups_on_created_at ON public.groups USING btree (created_at);
 
 
 --
--- Name: index_jobs_on_finished_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_groups_on_delete_at; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_jobs_on_finished_at ON jobs USING btree (finished_at);
+CREATE INDEX index_groups_on_delete_at ON public.groups USING btree (delete_at);
 
 
 --
--- Name: index_jobs_on_modified_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_groups_on_group_class; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_jobs_on_modified_at ON jobs USING btree (modified_at);
+CREATE INDEX index_groups_on_group_class ON public.groups USING btree (group_class);
 
 
 --
--- Name: index_jobs_on_output; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_groups_on_is_trashed; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_jobs_on_output ON jobs USING btree (output);
+CREATE INDEX index_groups_on_is_trashed ON public.groups USING btree (is_trashed);
 
 
 --
--- Name: index_jobs_on_owner_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_groups_on_modified_at; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_jobs_on_owner_uuid ON jobs USING btree (owner_uuid);
+CREATE INDEX index_groups_on_modified_at ON public.groups USING btree (modified_at);
 
 
 --
--- Name: index_jobs_on_script; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_groups_on_modified_at_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_jobs_on_script ON jobs USING btree (script);
+CREATE INDEX index_groups_on_modified_at_uuid ON public.groups USING btree (modified_at DESC, uuid);
 
 
 --
--- Name: index_jobs_on_script_parameters_digest; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_groups_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_jobs_on_script_parameters_digest ON jobs USING btree (script_parameters_digest);
+CREATE INDEX index_groups_on_owner_uuid ON public.groups USING btree (owner_uuid);
 
 
 --
--- Name: index_jobs_on_started_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_groups_on_owner_uuid_and_name; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_jobs_on_started_at ON jobs USING btree (started_at);
+CREATE UNIQUE INDEX index_groups_on_owner_uuid_and_name ON public.groups USING btree (owner_uuid, name) WHERE (is_trashed = false);
 
 
 --
--- Name: index_jobs_on_submit_id; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_groups_on_trash_at; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE UNIQUE INDEX index_jobs_on_submit_id ON jobs USING btree (submit_id);
+CREATE INDEX index_groups_on_trash_at ON public.groups USING btree (trash_at);
 
 
 --
--- Name: index_jobs_on_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_groups_on_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE UNIQUE INDEX index_jobs_on_uuid ON jobs USING btree (uuid);
+CREATE UNIQUE INDEX index_groups_on_uuid ON public.groups USING btree (uuid);
 
 
 --
--- Name: index_keep_disks_on_filesystem_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_humans_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_keep_disks_on_filesystem_uuid ON keep_disks USING btree (filesystem_uuid);
+CREATE INDEX index_humans_on_owner_uuid ON public.humans USING btree (owner_uuid);
 
 
 --
--- Name: index_keep_disks_on_last_ping_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_humans_on_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_keep_disks_on_last_ping_at ON keep_disks USING btree (last_ping_at);
+CREATE UNIQUE INDEX index_humans_on_uuid ON public.humans USING btree (uuid);
 
 
 --
--- Name: index_keep_disks_on_node_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_job_tasks_on_created_at; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_keep_disks_on_node_uuid ON keep_disks USING btree (node_uuid);
+CREATE INDEX index_job_tasks_on_created_at ON public.job_tasks USING btree (created_at);
 
 
 --
--- Name: index_keep_disks_on_owner_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_job_tasks_on_created_by_job_task_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_keep_disks_on_owner_uuid ON keep_disks USING btree (owner_uuid);
+CREATE INDEX index_job_tasks_on_created_by_job_task_uuid ON public.job_tasks USING btree (created_by_job_task_uuid);
 
 
 --
--- Name: index_keep_disks_on_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_job_tasks_on_job_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE UNIQUE INDEX index_keep_disks_on_uuid ON keep_disks USING btree (uuid);
+CREATE INDEX index_job_tasks_on_job_uuid ON public.job_tasks USING btree (job_uuid);
 
 
 --
--- Name: index_keep_services_on_owner_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_job_tasks_on_modified_at; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_keep_services_on_owner_uuid ON keep_services USING btree (owner_uuid);
+CREATE INDEX index_job_tasks_on_modified_at ON public.job_tasks USING btree (modified_at);
 
 
 --
--- Name: index_keep_services_on_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_job_tasks_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE UNIQUE INDEX index_keep_services_on_uuid ON keep_services USING btree (uuid);
+CREATE INDEX index_job_tasks_on_owner_uuid ON public.job_tasks USING btree (owner_uuid);
 
 
 --
--- Name: index_links_on_created_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_job_tasks_on_sequence; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_links_on_created_at ON links USING btree (created_at);
+CREATE INDEX index_job_tasks_on_sequence ON public.job_tasks USING btree (sequence);
 
 
 --
--- Name: index_links_on_head_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_job_tasks_on_success; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_links_on_head_uuid ON links USING btree (head_uuid);
+CREATE INDEX index_job_tasks_on_success ON public.job_tasks USING btree (success);
 
 
 --
--- Name: index_links_on_modified_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_job_tasks_on_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_links_on_modified_at ON links USING btree (modified_at);
+CREATE UNIQUE INDEX index_job_tasks_on_uuid ON public.job_tasks USING btree (uuid);
 
 
 --
--- Name: index_links_on_owner_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_jobs_on_created_at; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_links_on_owner_uuid ON links USING btree (owner_uuid);
+CREATE INDEX index_jobs_on_created_at ON public.jobs USING btree (created_at);
 
 
 --
--- Name: index_links_on_tail_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_jobs_on_finished_at; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_links_on_tail_uuid ON links USING btree (tail_uuid);
+CREATE INDEX index_jobs_on_finished_at ON public.jobs USING btree (finished_at);
 
 
 --
--- Name: index_links_on_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_jobs_on_modified_at; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE UNIQUE INDEX index_links_on_uuid ON links USING btree (uuid);
+CREATE INDEX index_jobs_on_modified_at ON public.jobs USING btree (modified_at);
 
 
 --
--- Name: index_logs_on_created_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_jobs_on_modified_at_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_logs_on_created_at ON logs USING btree (created_at);
+CREATE INDEX index_jobs_on_modified_at_uuid ON public.jobs USING btree (modified_at DESC, uuid);
 
 
 --
--- Name: index_logs_on_event_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_jobs_on_output; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_logs_on_event_at ON logs USING btree (event_at);
+CREATE INDEX index_jobs_on_output ON public.jobs USING btree (output);
 
 
 --
--- Name: index_logs_on_event_type; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_jobs_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_logs_on_event_type ON logs USING btree (event_type);
+CREATE INDEX index_jobs_on_owner_uuid ON public.jobs USING btree (owner_uuid);
 
 
 --
--- Name: index_logs_on_modified_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_jobs_on_script; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_logs_on_modified_at ON logs USING btree (modified_at);
+CREATE INDEX index_jobs_on_script ON public.jobs USING btree (script);
 
 
 --
--- Name: index_logs_on_object_owner_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_jobs_on_script_parameters_digest; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_logs_on_object_owner_uuid ON logs USING btree (object_owner_uuid);
+CREATE INDEX index_jobs_on_script_parameters_digest ON public.jobs USING btree (script_parameters_digest);
 
 
 --
--- Name: index_logs_on_object_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_jobs_on_started_at; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_logs_on_object_uuid ON logs USING btree (object_uuid);
+CREATE INDEX index_jobs_on_started_at ON public.jobs USING btree (started_at);
 
 
 --
--- Name: index_logs_on_owner_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_jobs_on_submit_id; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_logs_on_owner_uuid ON logs USING btree (owner_uuid);
+CREATE UNIQUE INDEX index_jobs_on_submit_id ON public.jobs USING btree (submit_id);
 
 
 --
--- Name: index_logs_on_summary; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_jobs_on_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_logs_on_summary ON logs USING btree (summary);
+CREATE UNIQUE INDEX index_jobs_on_uuid ON public.jobs USING btree (uuid);
 
 
 --
--- Name: index_logs_on_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_keep_disks_on_filesystem_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE UNIQUE INDEX index_logs_on_uuid ON logs USING btree (uuid);
+CREATE INDEX index_keep_disks_on_filesystem_uuid ON public.keep_disks USING btree (filesystem_uuid);
 
 
 --
--- Name: index_nodes_on_created_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_keep_disks_on_last_ping_at; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_nodes_on_created_at ON nodes USING btree (created_at);
+CREATE INDEX index_keep_disks_on_last_ping_at ON public.keep_disks USING btree (last_ping_at);
 
 
 --
--- Name: index_nodes_on_hostname; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_keep_disks_on_node_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_nodes_on_hostname ON nodes USING btree (hostname);
+CREATE INDEX index_keep_disks_on_node_uuid ON public.keep_disks USING btree (node_uuid);
 
 
 --
--- Name: index_nodes_on_modified_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_keep_disks_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_nodes_on_modified_at ON nodes USING btree (modified_at);
+CREATE INDEX index_keep_disks_on_owner_uuid ON public.keep_disks USING btree (owner_uuid);
 
 
 --
--- Name: index_nodes_on_owner_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_keep_disks_on_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_nodes_on_owner_uuid ON nodes USING btree (owner_uuid);
+CREATE UNIQUE INDEX index_keep_disks_on_uuid ON public.keep_disks USING btree (uuid);
 
 
 --
--- Name: index_nodes_on_slot_number; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_keep_services_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE UNIQUE INDEX index_nodes_on_slot_number ON nodes USING btree (slot_number);
+CREATE INDEX index_keep_services_on_owner_uuid ON public.keep_services USING btree (owner_uuid);
 
 
 --
--- Name: index_nodes_on_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_keep_services_on_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE UNIQUE INDEX index_nodes_on_uuid ON nodes USING btree (uuid);
+CREATE UNIQUE INDEX index_keep_services_on_uuid ON public.keep_services USING btree (uuid);
 
 
 --
--- Name: index_pipeline_instances_on_created_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_links_on_created_at; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_pipeline_instances_on_created_at ON pipeline_instances USING btree (created_at);
+CREATE INDEX index_links_on_created_at ON public.links USING btree (created_at);
 
 
 --
--- Name: index_pipeline_instances_on_modified_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_links_on_head_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_pipeline_instances_on_modified_at ON pipeline_instances USING btree (modified_at);
+CREATE INDEX index_links_on_head_uuid ON public.links USING btree (head_uuid);
 
 
 --
--- Name: index_pipeline_instances_on_owner_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_links_on_modified_at; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_pipeline_instances_on_owner_uuid ON pipeline_instances USING btree (owner_uuid);
+CREATE INDEX index_links_on_modified_at ON public.links USING btree (modified_at);
 
 
 --
--- Name: index_pipeline_instances_on_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_links_on_modified_at_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE UNIQUE INDEX index_pipeline_instances_on_uuid ON pipeline_instances USING btree (uuid);
+CREATE INDEX index_links_on_modified_at_uuid ON public.links USING btree (modified_at DESC, uuid);
 
 
 --
--- Name: index_pipeline_templates_on_created_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_links_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_pipeline_templates_on_created_at ON pipeline_templates USING btree (created_at);
+CREATE INDEX index_links_on_owner_uuid ON public.links USING btree (owner_uuid);
 
 
 --
--- Name: index_pipeline_templates_on_modified_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_links_on_substring_head_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_pipeline_templates_on_modified_at ON pipeline_templates USING btree (modified_at);
+CREATE INDEX index_links_on_substring_head_uuid ON public.links USING btree ("substring"((head_uuid)::text, 7, 5));
 
 
 --
--- Name: index_pipeline_templates_on_owner_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_links_on_substring_tail_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_pipeline_templates_on_owner_uuid ON pipeline_templates USING btree (owner_uuid);
+CREATE INDEX index_links_on_substring_tail_uuid ON public.links USING btree ("substring"((tail_uuid)::text, 7, 5));
 
 
 --
--- Name: index_pipeline_templates_on_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_links_on_tail_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE UNIQUE INDEX index_pipeline_templates_on_uuid ON pipeline_templates USING btree (uuid);
+CREATE INDEX index_links_on_tail_uuid ON public.links USING btree (tail_uuid);
 
 
 --
--- Name: index_repositories_on_name; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_links_on_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE UNIQUE INDEX index_repositories_on_name ON repositories USING btree (name);
+CREATE UNIQUE INDEX index_links_on_uuid ON public.links USING btree (uuid);
 
 
 --
--- Name: index_repositories_on_owner_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_logs_on_created_at; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_repositories_on_owner_uuid ON repositories USING btree (owner_uuid);
+CREATE INDEX index_logs_on_created_at ON public.logs USING btree (created_at);
 
 
 --
--- Name: index_repositories_on_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_logs_on_event_at; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE UNIQUE INDEX index_repositories_on_uuid ON repositories USING btree (uuid);
+CREATE INDEX index_logs_on_event_at ON public.logs USING btree (event_at);
 
 
 --
--- Name: index_specimens_on_created_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_logs_on_event_type; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_specimens_on_created_at ON specimens USING btree (created_at);
+CREATE INDEX index_logs_on_event_type ON public.logs USING btree (event_type);
 
 
 --
--- Name: index_specimens_on_modified_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_logs_on_modified_at; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_specimens_on_modified_at ON specimens USING btree (modified_at);
+CREATE INDEX index_logs_on_modified_at ON public.logs USING btree (modified_at);
 
 
 --
--- Name: index_specimens_on_owner_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_logs_on_modified_at_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_specimens_on_owner_uuid ON specimens USING btree (owner_uuid);
+CREATE INDEX index_logs_on_modified_at_uuid ON public.logs USING btree (modified_at DESC, uuid);
 
 
 --
--- Name: index_specimens_on_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_logs_on_object_owner_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE UNIQUE INDEX index_specimens_on_uuid ON specimens USING btree (uuid);
+CREATE INDEX index_logs_on_object_owner_uuid ON public.logs USING btree (object_owner_uuid);
 
 
 --
--- Name: index_traits_on_name; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_logs_on_object_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_traits_on_name ON traits USING btree (name);
+CREATE INDEX index_logs_on_object_uuid ON public.logs USING btree (object_uuid);
 
 
 --
--- Name: index_traits_on_owner_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_logs_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_traits_on_owner_uuid ON traits USING btree (owner_uuid);
+CREATE INDEX index_logs_on_owner_uuid ON public.logs USING btree (owner_uuid);
 
 
 --
--- Name: index_traits_on_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_logs_on_summary; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE UNIQUE INDEX index_traits_on_uuid ON traits USING btree (uuid);
+CREATE INDEX index_logs_on_summary ON public.logs USING btree (summary);
 
 
 --
--- Name: index_users_on_created_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_logs_on_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_users_on_created_at ON users USING btree (created_at);
+CREATE UNIQUE INDEX index_logs_on_uuid ON public.logs USING btree (uuid);
 
 
 --
--- Name: index_users_on_modified_at; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_nodes_on_created_at; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_users_on_modified_at ON users USING btree (modified_at);
+CREATE INDEX index_nodes_on_created_at ON public.nodes USING btree (created_at);
 
 
 --
--- Name: index_users_on_owner_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_nodes_on_hostname; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_users_on_owner_uuid ON users USING btree (owner_uuid);
+CREATE INDEX index_nodes_on_hostname ON public.nodes USING btree (hostname);
 
 
 --
--- Name: index_users_on_username; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_nodes_on_modified_at; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE UNIQUE INDEX index_users_on_username ON users USING btree (username);
+CREATE INDEX index_nodes_on_modified_at ON public.nodes USING btree (modified_at);
 
 
 --
--- Name: index_users_on_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_nodes_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE UNIQUE INDEX index_users_on_uuid ON users USING btree (uuid);
+CREATE INDEX index_nodes_on_owner_uuid ON public.nodes USING btree (owner_uuid);
 
 
 --
--- Name: index_virtual_machines_on_hostname; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_nodes_on_slot_number; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_virtual_machines_on_hostname ON virtual_machines USING btree (hostname);
+CREATE UNIQUE INDEX index_nodes_on_slot_number ON public.nodes USING btree (slot_number);
 
 
 --
--- Name: index_virtual_machines_on_owner_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_nodes_on_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_virtual_machines_on_owner_uuid ON virtual_machines USING btree (owner_uuid);
+CREATE UNIQUE INDEX index_nodes_on_uuid ON public.nodes USING btree (uuid);
 
 
 --
--- Name: index_virtual_machines_on_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_pipeline_instances_on_created_at; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE UNIQUE INDEX index_virtual_machines_on_uuid ON virtual_machines USING btree (uuid);
+CREATE INDEX index_pipeline_instances_on_created_at ON public.pipeline_instances USING btree (created_at);
 
 
 --
--- Name: index_workflows_on_owner_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_pipeline_instances_on_modified_at; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX index_workflows_on_owner_uuid ON workflows USING btree (owner_uuid);
+CREATE INDEX index_pipeline_instances_on_modified_at ON public.pipeline_instances USING btree (modified_at);
 
 
 --
--- Name: index_workflows_on_uuid; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_pipeline_instances_on_modified_at_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE UNIQUE INDEX index_workflows_on_uuid ON workflows USING btree (uuid);
+CREATE INDEX index_pipeline_instances_on_modified_at_uuid ON public.pipeline_instances USING btree (modified_at DESC, uuid);
 
 
 --
--- Name: job_tasks_search_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_pipeline_instances_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX job_tasks_search_index ON job_tasks USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, job_uuid, created_by_job_task_uuid);
+CREATE INDEX index_pipeline_instances_on_owner_uuid ON public.pipeline_instances USING btree (owner_uuid);
 
 
 --
--- Name: jobs_full_text_search_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_pipeline_instances_on_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX jobs_full_text_search_idx ON jobs USING gin (to_tsvector('english'::regconfig, (((((((((((((((((((((((((((((((((((((((((((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))));
+CREATE UNIQUE INDEX index_pipeline_instances_on_uuid ON public.pipeline_instances USING btree (uuid);
 
 
 --
--- Name: jobs_search_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_pipeline_templates_on_created_at; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX jobs_search_index ON 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);
+CREATE INDEX index_pipeline_templates_on_created_at ON public.pipeline_templates USING btree (created_at);
 
 
 --
--- Name: keep_disks_search_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_pipeline_templates_on_modified_at; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX keep_disks_search_index ON keep_disks USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, ping_secret, node_uuid, filesystem_uuid, keep_service_uuid);
+CREATE INDEX index_pipeline_templates_on_modified_at ON public.pipeline_templates USING btree (modified_at);
 
 
 --
--- Name: keep_services_search_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_pipeline_templates_on_modified_at_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX keep_services_search_index ON keep_services USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, service_host, service_type);
+CREATE INDEX index_pipeline_templates_on_modified_at_uuid ON public.pipeline_templates USING btree (modified_at DESC, uuid);
 
 
 --
--- Name: links_search_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_pipeline_templates_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX links_search_index ON links USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, tail_uuid, link_class, name, head_uuid);
+CREATE INDEX index_pipeline_templates_on_owner_uuid ON public.pipeline_templates USING btree (owner_uuid);
 
 
 --
--- Name: links_tail_name_unique_if_link_class_name; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_pipeline_templates_on_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE UNIQUE INDEX links_tail_name_unique_if_link_class_name ON links USING btree (tail_uuid, name) WHERE ((link_class)::text = 'name'::text);
+CREATE UNIQUE INDEX index_pipeline_templates_on_uuid ON public.pipeline_templates USING btree (uuid);
 
 
 --
--- Name: logs_search_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_repositories_on_modified_at_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX logs_search_index ON logs USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, object_uuid, event_type, object_owner_uuid);
+CREATE INDEX index_repositories_on_modified_at_uuid ON public.repositories USING btree (modified_at DESC, uuid);
 
 
 --
--- Name: nodes_search_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_repositories_on_name; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX nodes_search_index ON nodes USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, hostname, domain, ip_address, job_uuid);
+CREATE UNIQUE INDEX index_repositories_on_name ON public.repositories USING btree (name);
 
 
 --
--- Name: pipeline_instances_full_text_search_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_repositories_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX pipeline_instances_full_text_search_idx ON pipeline_instances USING gin (to_tsvector('english'::regconfig, (((((((((((((((((((((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)));
+CREATE INDEX index_repositories_on_owner_uuid ON public.repositories USING btree (owner_uuid);
 
 
 --
--- Name: pipeline_instances_search_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_repositories_on_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX pipeline_instances_search_index ON pipeline_instances USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, pipeline_template_uuid, name, state);
+CREATE UNIQUE INDEX index_repositories_on_uuid ON public.repositories USING btree (uuid);
 
 
 --
--- Name: pipeline_template_owner_uuid_name_unique; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_specimens_on_created_at; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE UNIQUE INDEX pipeline_template_owner_uuid_name_unique ON pipeline_templates USING btree (owner_uuid, name);
+CREATE INDEX index_specimens_on_created_at ON public.specimens USING btree (created_at);
 
 
 --
--- Name: pipeline_templates_full_text_search_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_specimens_on_modified_at; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX pipeline_templates_full_text_search_idx ON pipeline_templates USING gin (to_tsvector('english'::regconfig, (((((((((((((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)));
+CREATE INDEX index_specimens_on_modified_at ON public.specimens USING btree (modified_at);
 
 
 --
--- Name: pipeline_templates_search_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_specimens_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX pipeline_templates_search_index ON pipeline_templates USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, name);
+CREATE INDEX index_specimens_on_owner_uuid ON public.specimens USING btree (owner_uuid);
 
 
 --
--- Name: repositories_search_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_specimens_on_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX repositories_search_index ON repositories USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, name);
+CREATE UNIQUE INDEX index_specimens_on_uuid ON public.specimens USING btree (uuid);
 
 
 --
--- Name: specimens_search_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_traits_on_name; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX specimens_search_index ON specimens USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, material);
+CREATE INDEX index_traits_on_name ON public.traits USING btree (name);
 
 
 --
--- Name: traits_search_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_traits_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX traits_search_index ON traits USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, name);
+CREATE INDEX index_traits_on_owner_uuid ON public.traits USING btree (owner_uuid);
 
 
 --
--- Name: unique_schema_migrations; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_traits_on_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE UNIQUE INDEX unique_schema_migrations ON schema_migrations USING btree (version);
+CREATE UNIQUE INDEX index_traits_on_uuid ON public.traits USING btree (uuid);
 
 
 --
--- Name: users_search_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_users_on_created_at; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX users_search_index ON 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);
+CREATE INDEX index_users_on_created_at ON public.users USING btree (created_at);
 
 
 --
--- Name: virtual_machines_search_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_users_on_modified_at; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX virtual_machines_search_index ON virtual_machines USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, hostname);
+CREATE INDEX index_users_on_modified_at ON public.users USING btree (modified_at);
 
 
 --
--- Name: workflows_full_text_search_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_users_on_modified_at_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX workflows_full_text_search_idx ON workflows USING gin (to_tsvector('english'::regconfig, (((((((((((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))));
+CREATE INDEX index_users_on_modified_at_uuid ON public.users USING btree (modified_at DESC, uuid);
 
 
 --
--- Name: workflows_search_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 
+-- Name: index_users_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
 --
 
-CREATE INDEX workflows_search_idx ON workflows USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, name);
+CREATE INDEX index_users_on_owner_uuid ON public.users USING btree (owner_uuid);
 
 
 --
--- PostgreSQL database dump complete
+-- Name: index_users_on_username; Type: INDEX; Schema: public; Owner: -
 --
 
-SET search_path TO "$user",public;
-
-INSERT INTO schema_migrations (version) VALUES ('20121016005009');
-
-INSERT INTO schema_migrations (version) VALUES ('20130105203021');
-
-INSERT INTO schema_migrations (version) VALUES ('20130105224358');
-
-INSERT INTO schema_migrations (version) VALUES ('20130105224618');
-
-INSERT INTO schema_migrations (version) VALUES ('20130107181109');
-
-INSERT INTO schema_migrations (version) VALUES ('20130107212832');
-
-INSERT INTO schema_migrations (version) VALUES ('20130109175700');
-
-INSERT INTO schema_migrations (version) VALUES ('20130109220548');
-
-INSERT INTO schema_migrations (version) VALUES ('20130113214204');
-
-INSERT INTO schema_migrations (version) VALUES ('20130116024233');
-
-INSERT INTO schema_migrations (version) VALUES ('20130116215213');
+CREATE UNIQUE INDEX index_users_on_username ON public.users USING btree (username);
 
-INSERT INTO schema_migrations (version) VALUES ('20130118002239');
 
-INSERT INTO schema_migrations (version) VALUES ('20130122020042');
-
-INSERT INTO schema_migrations (version) VALUES ('20130122201442');
-
-INSERT INTO schema_migrations (version) VALUES ('20130122221616');
-
-INSERT INTO schema_migrations (version) VALUES ('20130123174514');
-
-INSERT INTO schema_migrations (version) VALUES ('20130123180224');
-
-INSERT INTO schema_migrations (version) VALUES ('20130123180228');
-
-INSERT INTO schema_migrations (version) VALUES ('20130125220425');
-
-INSERT INTO schema_migrations (version) VALUES ('20130128202518');
-
-INSERT INTO schema_migrations (version) VALUES ('20130128231343');
-
-INSERT INTO schema_migrations (version) VALUES ('20130130205749');
-
-INSERT INTO schema_migrations (version) VALUES ('20130203104818');
-
-INSERT INTO schema_migrations (version) VALUES ('20130203104824');
-
-INSERT INTO schema_migrations (version) VALUES ('20130203115329');
-
-INSERT INTO schema_migrations (version) VALUES ('20130207195855');
-
-INSERT INTO schema_migrations (version) VALUES ('20130218181504');
-
-INSERT INTO schema_migrations (version) VALUES ('20130226170000');
-
-INSERT INTO schema_migrations (version) VALUES ('20130313175417');
-
-INSERT INTO schema_migrations (version) VALUES ('20130315155820');
-
-INSERT INTO schema_migrations (version) VALUES ('20130315183626');
-
-INSERT INTO schema_migrations (version) VALUES ('20130315213205');
-
-INSERT INTO schema_migrations (version) VALUES ('20130318002138');
+--
+-- Name: index_users_on_uuid; Type: INDEX; Schema: public; Owner: -
+--
 
-INSERT INTO schema_migrations (version) VALUES ('20130319165853');
+CREATE UNIQUE INDEX index_users_on_uuid ON public.users USING btree (uuid);
 
-INSERT INTO schema_migrations (version) VALUES ('20130319180730');
 
-INSERT INTO schema_migrations (version) VALUES ('20130319194637');
+--
+-- Name: index_virtual_machines_on_hostname; Type: INDEX; Schema: public; Owner: -
+--
 
-INSERT INTO schema_migrations (version) VALUES ('20130319201431');
+CREATE INDEX index_virtual_machines_on_hostname ON public.virtual_machines USING btree (hostname);
 
-INSERT INTO schema_migrations (version) VALUES ('20130319235957');
 
-INSERT INTO schema_migrations (version) VALUES ('20130320000107');
+--
+-- Name: index_virtual_machines_on_modified_at_uuid; Type: INDEX; Schema: public; Owner: -
+--
 
-INSERT INTO schema_migrations (version) VALUES ('20130326173804');
+CREATE INDEX index_virtual_machines_on_modified_at_uuid ON public.virtual_machines USING btree (modified_at DESC, uuid);
 
-INSERT INTO schema_migrations (version) VALUES ('20130326182917');
 
-INSERT INTO schema_migrations (version) VALUES ('20130415020241');
+--
+-- Name: index_virtual_machines_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
+--
 
-INSERT INTO schema_migrations (version) VALUES ('20130425024459');
+CREATE INDEX index_virtual_machines_on_owner_uuid ON public.virtual_machines USING btree (owner_uuid);
 
-INSERT INTO schema_migrations (version) VALUES ('20130425214427');
 
-INSERT INTO schema_migrations (version) VALUES ('20130523060112');
+--
+-- Name: index_virtual_machines_on_uuid; Type: INDEX; Schema: public; Owner: -
+--
 
-INSERT INTO schema_migrations (version) VALUES ('20130523060213');
+CREATE UNIQUE INDEX index_virtual_machines_on_uuid ON public.virtual_machines USING btree (uuid);
 
-INSERT INTO schema_migrations (version) VALUES ('20130524042319');
 
-INSERT INTO schema_migrations (version) VALUES ('20130528134100');
+--
+-- Name: index_workflows_on_modified_at_uuid; Type: INDEX; Schema: public; Owner: -
+--
 
-INSERT INTO schema_migrations (version) VALUES ('20130606183519');
+CREATE INDEX index_workflows_on_modified_at_uuid ON public.workflows USING btree (modified_at DESC, uuid);
 
-INSERT INTO schema_migrations (version) VALUES ('20130608053730');
 
-INSERT INTO schema_migrations (version) VALUES ('20130610202538');
+--
+-- Name: index_workflows_on_owner_uuid; Type: INDEX; Schema: public; Owner: -
+--
 
-INSERT INTO schema_migrations (version) VALUES ('20130611163736');
+CREATE INDEX index_workflows_on_owner_uuid ON public.workflows USING btree (owner_uuid);
 
-INSERT INTO schema_migrations (version) VALUES ('20130612042554');
 
-INSERT INTO schema_migrations (version) VALUES ('20130617150007');
+--
+-- Name: index_workflows_on_uuid; Type: INDEX; Schema: public; Owner: -
+--
 
-INSERT INTO schema_migrations (version) VALUES ('20130626002829');
+CREATE UNIQUE INDEX index_workflows_on_uuid ON public.workflows USING btree (uuid);
 
-INSERT INTO schema_migrations (version) VALUES ('20130626022810');
 
-INSERT INTO schema_migrations (version) VALUES ('20130627154537');
+--
+-- Name: job_tasks_search_index; Type: INDEX; Schema: public; Owner: -
+--
 
-INSERT INTO schema_migrations (version) VALUES ('20130627184333');
+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);
 
-INSERT INTO schema_migrations (version) VALUES ('20130708163414');
 
-INSERT INTO schema_migrations (version) VALUES ('20130708182912');
+--
+-- Name: jobs_full_text_search_idx; Type: INDEX; Schema: public; Owner: -
+--
 
-INSERT INTO schema_migrations (version) VALUES ('20130708185153');
+CREATE INDEX jobs_full_text_search_idx ON public.jobs USING gin (to_tsvector('english'::regconfig, substr((((((((((((((((((((((((((((((((((((((((((((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)), 0, 1000000)));
 
-INSERT INTO schema_migrations (version) VALUES ('20130724153034');
 
-INSERT INTO schema_migrations (version) VALUES ('20131007180607');
+--
+-- Name: jobs_search_index; Type: INDEX; Schema: public; Owner: -
+--
 
-INSERT INTO schema_migrations (version) VALUES ('20140117231056');
+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);
 
-INSERT INTO schema_migrations (version) VALUES ('20140124222114');
 
-INSERT INTO schema_migrations (version) VALUES ('20140129184311');
+--
+-- Name: jobs_trgm_text_search_idx; Type: INDEX; Schema: public; Owner: -
+--
 
-INSERT INTO schema_migrations (version) VALUES ('20140317135600');
+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);
 
-INSERT INTO schema_migrations (version) VALUES ('20140319160547');
 
-INSERT INTO schema_migrations (version) VALUES ('20140321191343');
+--
+-- Name: keep_disks_search_index; Type: INDEX; Schema: public; Owner: -
+--
 
-INSERT INTO schema_migrations (version) VALUES ('20140324024606');
+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);
 
-INSERT INTO schema_migrations (version) VALUES ('20140325175653');
 
-INSERT INTO schema_migrations (version) VALUES ('20140402001908');
+--
+-- Name: keep_services_search_index; Type: INDEX; Schema: public; Owner: -
+--
 
-INSERT INTO schema_migrations (version) VALUES ('20140407184311');
+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);
 
-INSERT INTO schema_migrations (version) VALUES ('20140421140924');
 
-INSERT INTO schema_migrations (version) VALUES ('20140421151939');
+--
+-- Name: links_index_on_properties; Type: INDEX; Schema: public; Owner: -
+--
 
-INSERT INTO schema_migrations (version) VALUES ('20140421151940');
+CREATE INDEX links_index_on_properties ON public.links USING gin (properties);
 
-INSERT INTO schema_migrations (version) VALUES ('20140422011506');
 
-INSERT INTO schema_migrations (version) VALUES ('20140423132913');
+--
+-- Name: links_search_index; Type: INDEX; Schema: public; Owner: -
+--
 
-INSERT INTO schema_migrations (version) VALUES ('20140423133559');
+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);
 
-INSERT INTO schema_migrations (version) VALUES ('20140501165548');
 
-INSERT INTO schema_migrations (version) VALUES ('20140519205916');
+--
+-- Name: links_tail_name_unique_if_link_class_name; Type: INDEX; Schema: public; Owner: -
+--
 
-INSERT INTO schema_migrations (version) VALUES ('20140527152921');
+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);
 
-INSERT INTO schema_migrations (version) VALUES ('20140530200539');
 
-INSERT INTO schema_migrations (version) VALUES ('20140601022548');
+--
+-- Name: logs_search_index; Type: INDEX; Schema: public; Owner: -
+--
 
-INSERT INTO schema_migrations (version) VALUES ('20140602143352');
+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);
 
-INSERT INTO schema_migrations (version) VALUES ('20140607150616');
 
-INSERT INTO schema_migrations (version) VALUES ('20140611173003');
+--
+-- Name: nodes_index_on_info; Type: INDEX; Schema: public; Owner: -
+--
 
-INSERT INTO schema_migrations (version) VALUES ('20140627210837');
+CREATE INDEX nodes_index_on_info ON public.nodes USING gin (info);
 
-INSERT INTO schema_migrations (version) VALUES ('20140709172343');
 
-INSERT INTO schema_migrations (version) VALUES ('20140714184006');
+--
+-- Name: nodes_index_on_properties; Type: INDEX; Schema: public; Owner: -
+--
 
-INSERT INTO schema_migrations (version) VALUES ('20140811184643');
+CREATE INDEX nodes_index_on_properties ON public.nodes USING gin (properties);
 
-INSERT INTO schema_migrations (version) VALUES ('20140817035914');
 
-INSERT INTO schema_migrations (version) VALUES ('20140818125735');
+--
+-- Name: nodes_search_index; Type: INDEX; Schema: public; Owner: -
+--
 
-INSERT INTO schema_migrations (version) VALUES ('20140826180337');
+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);
 
-INSERT INTO schema_migrations (version) VALUES ('20140828141043');
 
-INSERT INTO schema_migrations (version) VALUES ('20140909183946');
+--
+-- Name: permission_target_trashed; Type: INDEX; Schema: public; Owner: -
+--
 
-INSERT INTO schema_migrations (version) VALUES ('20140911221252');
+CREATE INDEX permission_target_trashed ON public.materialized_permission_view USING btree (trashed, target_uuid);
 
-INSERT INTO schema_migrations (version) VALUES ('20140918141529');
 
-INSERT INTO schema_migrations (version) VALUES ('20140918153541');
+--
+-- Name: permission_target_user_trashed_level; Type: INDEX; Schema: public; Owner: -
+--
 
-INSERT INTO schema_migrations (version) VALUES ('20140918153705');
+CREATE INDEX permission_target_user_trashed_level ON public.materialized_permission_view USING btree (user_uuid, trashed, perm_level);
 
-INSERT INTO schema_migrations (version) VALUES ('20140924091559');
 
-INSERT INTO schema_migrations (version) VALUES ('20141111133038');
+--
+-- Name: pipeline_instances_full_text_search_idx; Type: INDEX; Schema: public; Owner: -
+--
 
-INSERT INTO schema_migrations (version) VALUES ('20141208164553');
+CREATE INDEX pipeline_instances_full_text_search_idx ON public.pipeline_instances USING gin (to_tsvector('english'::regconfig, substr((((((((((((((((((((((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), 0, 1000000)));
 
-INSERT INTO schema_migrations (version) VALUES ('20141208174553');
 
-INSERT INTO schema_migrations (version) VALUES ('20141208174653');
+--
+-- Name: pipeline_instances_search_index; Type: INDEX; Schema: public; Owner: -
+--
 
-INSERT INTO schema_migrations (version) VALUES ('20141208185217');
+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);
 
-INSERT INTO schema_migrations (version) VALUES ('20150122175935');
 
-INSERT INTO schema_migrations (version) VALUES ('20150123142953');
+--
+-- Name: pipeline_instances_trgm_text_search_idx; Type: INDEX; Schema: public; Owner: -
+--
 
-INSERT INTO schema_migrations (version) VALUES ('20150203180223');
+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);
 
-INSERT INTO schema_migrations (version) VALUES ('20150206210804');
 
-INSERT INTO schema_migrations (version) VALUES ('20150206230342');
+--
+-- Name: pipeline_template_owner_uuid_name_unique; Type: INDEX; Schema: public; Owner: -
+--
 
-INSERT INTO schema_migrations (version) VALUES ('20150216193428');
+CREATE UNIQUE INDEX pipeline_template_owner_uuid_name_unique ON public.pipeline_templates USING btree (owner_uuid, name);
 
-INSERT INTO schema_migrations (version) VALUES ('20150303210106');
 
-INSERT INTO schema_migrations (version) VALUES ('20150312151136');
+--
+-- Name: pipeline_templates_full_text_search_idx; Type: INDEX; Schema: public; Owner: -
+--
 
-INSERT INTO schema_migrations (version) VALUES ('20150317132720');
+CREATE INDEX pipeline_templates_full_text_search_idx ON public.pipeline_templates USING gin (to_tsvector('english'::regconfig, substr((((((((((((((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), 0, 1000000)));
 
-INSERT INTO schema_migrations (version) VALUES ('20150324152204');
 
-INSERT INTO schema_migrations (version) VALUES ('20150423145759');
+--
+-- Name: pipeline_templates_search_index; Type: INDEX; Schema: public; Owner: -
+--
 
-INSERT INTO schema_migrations (version) VALUES ('20150512193020');
+CREATE INDEX pipeline_templates_search_index ON public.pipeline_templates USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, name);
 
-INSERT INTO schema_migrations (version) VALUES ('20150526180251');
 
-INSERT INTO schema_migrations (version) VALUES ('20151202151426');
+--
+-- Name: pipeline_templates_trgm_text_search_idx; Type: INDEX; Schema: public; Owner: -
+--
 
-INSERT INTO schema_migrations (version) VALUES ('20151215134304');
+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);
 
-INSERT INTO schema_migrations (version) VALUES ('20151229214707');
 
-INSERT INTO schema_migrations (version) VALUES ('20160208210629');
+--
+-- Name: repositories_search_index; Type: INDEX; Schema: public; Owner: -
+--
 
-INSERT INTO schema_migrations (version) VALUES ('20160209155729');
+CREATE INDEX repositories_search_index ON public.repositories USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, name);
 
-INSERT INTO schema_migrations (version) VALUES ('20160324144017');
 
-INSERT INTO schema_migrations (version) VALUES ('20160506175108');
+--
+-- Name: specimens_search_index; Type: INDEX; Schema: public; Owner: -
+--
 
-INSERT INTO schema_migrations (version) VALUES ('20160509143250');
+CREATE INDEX specimens_search_index ON public.specimens USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, material);
 
-INSERT INTO schema_migrations (version) VALUES ('20160808151559');
 
-INSERT INTO schema_migrations (version) VALUES ('20160819195557');
+--
+-- Name: traits_search_index; Type: INDEX; Schema: public; Owner: -
+--
 
-INSERT INTO schema_migrations (version) VALUES ('20160819195725');
+CREATE INDEX traits_search_index ON public.traits USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, name);
 
-INSERT INTO schema_migrations (version) VALUES ('20160901210110');
 
-INSERT INTO schema_migrations (version) VALUES ('20160909181442');
+--
+-- Name: unique_schema_migrations; Type: INDEX; Schema: public; Owner: -
+--
 
-INSERT INTO schema_migrations (version) VALUES ('20160926194129');
+CREATE UNIQUE INDEX unique_schema_migrations ON public.schema_migrations USING btree (version);
 
-INSERT INTO schema_migrations (version) VALUES ('20161019171346');
 
-INSERT INTO schema_migrations (version) VALUES ('20161111143147');
+--
+-- Name: users_search_index; Type: INDEX; Schema: public; Owner: -
+--
 
-INSERT INTO schema_migrations (version) VALUES ('20161115171221');
+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);
 
-INSERT INTO schema_migrations (version) VALUES ('20161115174218');
 
-INSERT INTO schema_migrations (version) VALUES ('20161213172944');
+--
+-- Name: virtual_machines_search_index; Type: INDEX; Schema: public; Owner: -
+--
 
-INSERT INTO schema_migrations (version) VALUES ('20161222153434');
+CREATE INDEX virtual_machines_search_index ON public.virtual_machines USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, hostname);
 
-INSERT INTO schema_migrations (version) VALUES ('20161223090712');
 
-INSERT INTO schema_migrations (version) VALUES ('20170102153111');
+--
+-- Name: workflows_full_text_search_idx; Type: INDEX; Schema: public; Owner: -
+--
 
-INSERT INTO schema_migrations (version) VALUES ('20170105160301');
+CREATE INDEX workflows_full_text_search_idx ON public.workflows USING gin (to_tsvector('english'::regconfig, substr((((((((((((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)), 0, 1000000)));
 
-INSERT INTO schema_migrations (version) VALUES ('20170105160302');
 
-INSERT INTO schema_migrations (version) VALUES ('20170216170823');
+--
+-- Name: workflows_search_idx; Type: INDEX; Schema: public; Owner: -
+--
 
-INSERT INTO schema_migrations (version) VALUES ('20170301225558');
+CREATE INDEX workflows_search_idx ON public.workflows USING btree (uuid, owner_uuid, modified_by_client_uuid, modified_by_user_uuid, name);
 
-INSERT INTO schema_migrations (version) VALUES ('20170319063406');
 
-INSERT INTO schema_migrations (version) VALUES ('20170328215436');
+--
+-- Name: workflows_trgm_text_search_idx; Type: INDEX; Schema: public; Owner: -
+--
 
-INSERT INTO schema_migrations (version) VALUES ('20170330012505');
+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);
 
-INSERT INTO schema_migrations (version) VALUES ('20170419173031');
 
-INSERT INTO schema_migrations (version) VALUES ('20170419173712');
+--
+-- PostgreSQL database dump complete
+--
 
-INSERT INTO schema_migrations (version) VALUES ('20170419175801');
+SET search_path TO "$user", public;
+
+INSERT INTO "schema_migrations" (version) VALUES
+('20121016005009'),
+('20130105203021'),
+('20130105224358'),
+('20130105224618'),
+('20130107181109'),
+('20130107212832'),
+('20130109175700'),
+('20130109220548'),
+('20130113214204'),
+('20130116024233'),
+('20130116215213'),
+('20130118002239'),
+('20130122020042'),
+('20130122201442'),
+('20130122221616'),
+('20130123174514'),
+('20130123180224'),
+('20130123180228'),
+('20130125220425'),
+('20130128202518'),
+('20130128231343'),
+('20130130205749'),
+('20130203104818'),
+('20130203104824'),
+('20130203115329'),
+('20130207195855'),
+('20130218181504'),
+('20130226170000'),
+('20130313175417'),
+('20130315155820'),
+('20130315183626'),
+('20130315213205'),
+('20130318002138'),
+('20130319165853'),
+('20130319180730'),
+('20130319194637'),
+('20130319201431'),
+('20130319235957'),
+('20130320000107'),
+('20130326173804'),
+('20130326182917'),
+('20130415020241'),
+('20130425024459'),
+('20130425214427'),
+('20130523060112'),
+('20130523060213'),
+('20130524042319'),
+('20130528134100'),
+('20130606183519'),
+('20130608053730'),
+('20130610202538'),
+('20130611163736'),
+('20130612042554'),
+('20130617150007'),
+('20130626002829'),
+('20130626022810'),
+('20130627154537'),
+('20130627184333'),
+('20130708163414'),
+('20130708182912'),
+('20130708185153'),
+('20130724153034'),
+('20131007180607'),
+('20140117231056'),
+('20140124222114'),
+('20140129184311'),
+('20140317135600'),
+('20140319160547'),
+('20140321191343'),
+('20140324024606'),
+('20140325175653'),
+('20140402001908'),
+('20140407184311'),
+('20140421140924'),
+('20140421151939'),
+('20140421151940'),
+('20140422011506'),
+('20140423132913'),
+('20140423133559'),
+('20140501165548'),
+('20140519205916'),
+('20140527152921'),
+('20140530200539'),
+('20140601022548'),
+('20140602143352'),
+('20140607150616'),
+('20140611173003'),
+('20140627210837'),
+('20140709172343'),
+('20140714184006'),
+('20140811184643'),
+('20140817035914'),
+('20140818125735'),
+('20140826180337'),
+('20140828141043'),
+('20140909183946'),
+('20140911221252'),
+('20140918141529'),
+('20140918153541'),
+('20140918153705'),
+('20140924091559'),
+('20141111133038'),
+('20141208164553'),
+('20141208174553'),
+('20141208174653'),
+('20141208185217'),
+('20150122175935'),
+('20150123142953'),
+('20150203180223'),
+('20150206210804'),
+('20150206230342'),
+('20150216193428'),
+('20150303210106'),
+('20150312151136'),
+('20150317132720'),
+('20150324152204'),
+('20150423145759'),
+('20150512193020'),
+('20150526180251'),
+('20151202151426'),
+('20151215134304'),
+('20151229214707'),
+('20160208210629'),
+('20160209155729'),
+('20160324144017'),
+('20160506175108'),
+('20160509143250'),
+('20160808151559'),
+('20160819195557'),
+('20160819195725'),
+('20160901210110'),
+('20160909181442'),
+('20160926194129'),
+('20161019171346'),
+('20161111143147'),
+('20161115171221'),
+('20161115174218'),
+('20161213172944'),
+('20161222153434'),
+('20161223090712'),
+('20170102153111'),
+('20170105160301'),
+('20170105160302'),
+('20170216170823'),
+('20170301225558'),
+('20170319063406'),
+('20170328215436'),
+('20170330012505'),
+('20170419173031'),
+('20170419173712'),
+('20170419175801'),
+('20170628185847'),
+('20170704160233'),
+('20170706141334'),
+('20170824202826'),
+('20170906224040'),
+('20171027183824'),
+('20171208203841'),
+('20171212153352'),
+('20180216203422'),
+('20180228220311'),
+('20180313180114'),
+('20180501182859'),
+('20180514135529'),
+('20180607175050'),
+('20180608123145'),
+('20180806133039'),
+('20180820130357'),
+('20180820132617'),
+('20180820135808'),
+('20180824152014'),
+('20180824155207'),
+('20180904110712'),
+('20180913175443'),
+('20180915155335'),
+('20180917200000'),
+('20180917205609'),
+('20180919001158'),
+('20181001175023'),
+('20181004131141'),
+('20181005192222'),
+('20181011184200'),
+('20181213183234'),
+('20190214214814'),
+('20190322174136'),
+('20190422144631'),
+('20190523180148'),
+('20190808145904'),
+('20190809135453');
 
-INSERT INTO schema_migrations (version) VALUES ('20170628185847');
 
