diff --git a/cypress/dumps/decision_completed.sql b/cypress/dumps/decision_completed.sql
new file mode 100644
index 0000000000000000000000000000000000000000..131e3333d986432395c5488837c6c94cbd0f1a5b
--- /dev/null
+++ b/cypress/dumps/decision_completed.sql
@@ -0,0 +1,886 @@
+--
+-- PostgreSQL database dump
+--
+
+-- Dumped from database version 10.5
+-- Dumped by pg_dump version 10.5
+
+SET statement_timeout = 0;
+SET lock_timeout = 0;
+SET idle_in_transaction_session_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 client_min_messages = warning;
+SET row_security = off;
+
+--
+-- Name: pgboss; Type: SCHEMA; Schema: -; Owner: test
+--
+
+CREATE SCHEMA pgboss;
+
+
+ALTER SCHEMA pgboss OWNER TO test;
+
+--
+-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: 
+--
+
+CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
+
+
+--
+-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: 
+--
+
+COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
+
+
+--
+-- Name: pgcrypto; Type: EXTENSION; Schema: -; Owner: 
+--
+
+CREATE EXTENSION IF NOT EXISTS pgcrypto WITH SCHEMA public;
+
+
+--
+-- Name: EXTENSION pgcrypto; Type: COMMENT; Schema: -; Owner: 
+--
+
+COMMENT ON EXTENSION pgcrypto IS 'cryptographic functions';
+
+
+--
+-- Name: job_state; Type: TYPE; Schema: pgboss; Owner: test
+--
+
+CREATE TYPE pgboss.job_state AS ENUM (
+    'created',
+    'retry',
+    'active',
+    'completed',
+    'expired',
+    'cancelled',
+    'failed'
+);
+
+
+ALTER TYPE pgboss.job_state OWNER TO test;
+
+SET default_tablespace = '';
+
+SET default_with_oids = false;
+
+--
+-- Name: archive; Type: TABLE; Schema: pgboss; Owner: test
+--
+
+CREATE TABLE pgboss.archive (
+    id uuid NOT NULL,
+    name text NOT NULL,
+    priority integer NOT NULL,
+    data jsonb,
+    state pgboss.job_state NOT NULL,
+    retrylimit integer NOT NULL,
+    retrycount integer NOT NULL,
+    retrydelay integer NOT NULL,
+    retrybackoff boolean NOT NULL,
+    startafter timestamp with time zone NOT NULL,
+    startedon timestamp with time zone,
+    singletonkey text,
+    singletonon timestamp without time zone,
+    expirein interval NOT NULL,
+    createdon timestamp with time zone NOT NULL,
+    completedon timestamp with time zone,
+    archivedon timestamp with time zone DEFAULT now() NOT NULL
+);
+
+
+ALTER TABLE pgboss.archive OWNER TO test;
+
+--
+-- Name: job; Type: TABLE; Schema: pgboss; Owner: test
+--
+
+CREATE TABLE pgboss.job (
+    id uuid DEFAULT public.gen_random_uuid() NOT NULL,
+    name text NOT NULL,
+    priority integer DEFAULT 0 NOT NULL,
+    data jsonb,
+    state pgboss.job_state DEFAULT 'created'::pgboss.job_state NOT NULL,
+    retrylimit integer DEFAULT 0 NOT NULL,
+    retrycount integer DEFAULT 0 NOT NULL,
+    retrydelay integer DEFAULT 0 NOT NULL,
+    retrybackoff boolean DEFAULT false NOT NULL,
+    startafter timestamp with time zone DEFAULT now() NOT NULL,
+    startedon timestamp with time zone,
+    singletonkey text,
+    singletonon timestamp without time zone,
+    expirein interval DEFAULT '00:15:00'::interval NOT NULL,
+    createdon timestamp with time zone DEFAULT now() NOT NULL,
+    completedon timestamp with time zone
+);
+
+
+ALTER TABLE pgboss.job OWNER TO test;
+
+--
+-- Name: version; Type: TABLE; Schema: pgboss; Owner: test
+--
+
+CREATE TABLE pgboss.version (
+    version text NOT NULL
+);
+
+
+ALTER TABLE pgboss.version OWNER TO test;
+
+--
+-- Name: aliases; Type: TABLE; Schema: public; Owner: test
+--
+
+CREATE TABLE public.aliases (
+    id uuid NOT NULL,
+    created timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
+    updated timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
+    name text,
+    email text,
+    aff text
+);
+
+
+ALTER TABLE public.aliases OWNER TO test;
+
+--
+-- Name: channel_members; Type: TABLE; Schema: public; Owner: test
+--
+
+CREATE TABLE public.channel_members (
+    id uuid NOT NULL,
+    created timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
+    updated timestamp with time zone,
+    user_id uuid NOT NULL,
+    channel_id uuid NOT NULL
+);
+
+
+ALTER TABLE public.channel_members OWNER TO test;
+
+--
+-- Name: channels; Type: TABLE; Schema: public; Owner: test
+--
+
+CREATE TABLE public.channels (
+    id uuid NOT NULL,
+    manuscript_id uuid,
+    created timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
+    updated timestamp with time zone,
+    topic text,
+    type text
+);
+
+
+ALTER TABLE public.channels OWNER TO test;
+
+--
+-- Name: entities; Type: TABLE; Schema: public; Owner: test
+--
+
+CREATE TABLE public.entities (
+    id uuid NOT NULL,
+    data jsonb
+);
+
+
+ALTER TABLE public.entities OWNER TO test;
+
+--
+-- Name: files; Type: TABLE; Schema: public; Owner: test
+--
+
+CREATE TABLE public.files (
+    id uuid NOT NULL,
+    created timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
+    updated timestamp with time zone,
+    label text,
+    file_type text,
+    filename text,
+    url text,
+    mime_type text,
+    size integer,
+    type text NOT NULL,
+    manuscript_id uuid,
+    review_comment_id uuid,
+    CONSTRAINT exactly_one_file_owner CHECK (((((manuscript_id IS NOT NULL))::integer + ((review_comment_id IS NOT NULL))::integer) = 1))
+);
+
+
+ALTER TABLE public.files OWNER TO test;
+
+--
+-- Name: identities; Type: TABLE; Schema: public; Owner: test
+--
+
+CREATE TABLE public.identities (
+    id uuid NOT NULL,
+    user_id uuid NOT NULL,
+    created timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
+    updated timestamp with time zone,
+    type text NOT NULL,
+    identifier text,
+    name text,
+    aff text,
+    oauth jsonb,
+    is_default boolean
+);
+
+
+ALTER TABLE public.identities OWNER TO test;
+
+--
+-- Name: manuscripts; Type: TABLE; Schema: public; Owner: test
+--
+
+CREATE TABLE public.manuscripts (
+    id uuid NOT NULL,
+    created timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
+    updated timestamp with time zone,
+    parent_id uuid,
+    submitter_id uuid,
+    status text,
+    decision text,
+    authors jsonb,
+    suggestions jsonb,
+    meta jsonb,
+    submission jsonb,
+    type text NOT NULL
+);
+
+
+ALTER TABLE public.manuscripts OWNER TO test;
+
+--
+-- Name: messages; Type: TABLE; Schema: public; Owner: test
+--
+
+CREATE TABLE public.messages (
+    id uuid NOT NULL,
+    user_id uuid NOT NULL,
+    channel_id uuid NOT NULL,
+    created timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
+    updated timestamp with time zone,
+    content text
+);
+
+
+ALTER TABLE public.messages OWNER TO test;
+
+--
+-- Name: migrations; Type: TABLE; Schema: public; Owner: test
+--
+
+CREATE TABLE public.migrations (
+    id text NOT NULL,
+    run_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP
+);
+
+
+ALTER TABLE public.migrations OWNER TO test;
+
+--
+-- Name: review_comments; Type: TABLE; Schema: public; Owner: test
+--
+
+CREATE TABLE public.review_comments (
+    id uuid NOT NULL,
+    created timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
+    updated timestamp with time zone,
+    review_id uuid,
+    user_id uuid,
+    content text,
+    comment_type text,
+    type text
+);
+
+
+ALTER TABLE public.review_comments OWNER TO test;
+
+--
+-- Name: reviews; Type: TABLE; Schema: public; Owner: test
+--
+
+CREATE TABLE public.reviews (
+    id uuid NOT NULL,
+    created timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
+    updated timestamp with time zone,
+    recommendation text,
+    is_decision boolean DEFAULT false,
+    user_id uuid,
+    manuscript_id uuid,
+    type text NOT NULL
+);
+
+
+ALTER TABLE public.reviews OWNER TO test;
+
+--
+-- Name: team_members; Type: TABLE; Schema: public; Owner: test
+--
+
+CREATE TABLE public.team_members (
+    id uuid NOT NULL,
+    created timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
+    updated timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
+    status character varying(255),
+    team_id uuid,
+    user_id uuid,
+    alias_id uuid
+);
+
+
+ALTER TABLE public.team_members OWNER TO test;
+
+--
+-- Name: teams; Type: TABLE; Schema: public; Owner: test
+--
+
+CREATE TABLE public.teams (
+    id uuid NOT NULL,
+    created timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
+    updated timestamp with time zone,
+    name text,
+    role text NOT NULL,
+    members jsonb,
+    owners jsonb,
+    global boolean,
+    type text NOT NULL,
+    manuscript_id uuid
+);
+
+
+ALTER TABLE public.teams OWNER TO test;
+
+--
+-- Name: users; Type: TABLE; Schema: public; Owner: test
+--
+
+CREATE TABLE public.users (
+    id uuid NOT NULL,
+    created timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
+    updated timestamp with time zone,
+    admin boolean,
+    email text,
+    username text,
+    password_hash text,
+    teams jsonb,
+    password_reset_token text,
+    password_reset_timestamp timestamp with time zone,
+    type text NOT NULL,
+    profile_picture text,
+    online boolean
+);
+
+
+ALTER TABLE public.users OWNER TO test;
+
+--
+-- Data for Name: archive; Type: TABLE DATA; Schema: pgboss; Owner: test
+--
+
+
+
+--
+-- Data for Name: job; Type: TABLE DATA; Schema: pgboss; Owner: test
+--
+
+
+
+--
+-- Data for Name: version; Type: TABLE DATA; Schema: pgboss; Owner: test
+--
+
+INSERT INTO pgboss.version (version) VALUES ('11');
+
+
+--
+-- Data for Name: aliases; Type: TABLE DATA; Schema: public; Owner: test
+--
+
+
+
+--
+-- Data for Name: channel_members; Type: TABLE DATA; Schema: public; Owner: test
+--
+
+
+
+--
+-- Data for Name: channels; Type: TABLE DATA; Schema: public; Owner: test
+--
+
+INSERT INTO public.channels (id, manuscript_id, created, updated, topic, type) VALUES ('afd95c06-011b-46e3-9985-964283d51c4a', '93735475-08f6-436b-9db3-fe2364b9dbb2', '2020-08-12 16:16:44.916+02', '2020-08-12 16:16:44.916+02', 'Manuscript discussion', 'all');
+INSERT INTO public.channels (id, manuscript_id, created, updated, topic, type) VALUES ('75540565-6619-495f-a8c5-d6bf11ece72d', '93735475-08f6-436b-9db3-fe2364b9dbb2', '2020-08-12 16:16:44.916+02', '2020-08-12 16:16:44.916+02', 'Editorial discussion', 'editorial');
+
+
+--
+-- Data for Name: entities; Type: TABLE DATA; Schema: public; Owner: test
+--
+
+
+
+--
+-- Data for Name: files; Type: TABLE DATA; Schema: public; Owner: test
+--
+
+
+
+--
+-- Data for Name: identities; Type: TABLE DATA; Schema: public; Owner: test
+--
+
+INSERT INTO public.identities (id, user_id, created, updated, type, identifier, name, aff, oauth, is_default) VALUES ('d341a633-cdce-4a7f-a9ad-5afc03cd0dd1', '027afa6a-edbc-486e-bb31-71e12f8ea1c5', '2020-07-21 16:17:24.741+02', '2020-07-21 16:17:25.87+02', 'orcid', '0000-0002-0564-2016', 'Emily Clay', NULL, '{"accessToken": "079a1165-31e5-4b59-9a99-d80ff7a21ebf", "refreshToken": "ccadc737-defc-419e-823b-a9f3673848ba"}', true);
+INSERT INTO public.identities (id, user_id, created, updated, type, identifier, name, aff, oauth, is_default) VALUES ('bcda196e-765a-42c8-94da-ca2e43b80f96', '3802b0e7-aadc-45de-9cf9-918fede99b97', '2020-07-21 16:30:45.721+02', '2020-07-21 16:33:26.742+02', 'orcid', '0000-0002-5641-5729', 'Sinead Sullivan', NULL, '{"accessToken": "ef1ed3ec-8371-41b2-a136-fd196ae52a72", "refreshToken": "6972dace-d9a6-4cd3-a2ad-ec7eb3e457c7"}', true);
+INSERT INTO public.identities (id, user_id, created, updated, type, identifier, name, aff, oauth, is_default) VALUES ('4af83984-6359-47c5-a075-5ddfa9c555d9', '0da0bbec-9261-4706-b990-0c10aa3cc6b4', '2020-07-21 16:35:06.127+02', '2020-07-21 16:35:07.104+02', 'orcid', '0000-0002-7645-9921', 'Sherry Crofoot', NULL, '{"accessToken": "2ad4e130-0775-4e13-87fb-8e8f5a0570ae", "refreshToken": "159933d9-2020-4c02-bdfb-163af41017dc"}', true);
+INSERT INTO public.identities (id, user_id, created, updated, type, identifier, name, aff, oauth, is_default) VALUES ('acfa1777-0aec-4fe1-bc16-92bb9d19e884', '85e1300e-003c-4e96-987b-23812f902477', '2020-07-21 16:35:38.384+02', '2020-07-21 16:35:39.358+02', 'orcid', '0000-0002-9429-4446', 'Elaine Barnes', NULL, '{"accessToken": "dcf07bc7-e59c-41b3-9ce0-924ac20aeeea", "refreshToken": "ae49d6a1-8e62-419d-8767-4a3ec22c1950"}', true);
+INSERT INTO public.identities (id, user_id, created, updated, type, identifier, name, aff, oauth, is_default) VALUES ('88c85115-d83c-42d7-a1a1-0139827977da', '40e3d054-9ac8-4c0f-84ed-e3c6307662cd', '2020-07-21 16:36:24.975+02', '2020-07-21 16:36:26.059+02', 'orcid', '0000-0001-5956-7341', 'Gale Davis', NULL, '{"accessToken": "3e9f6f6c-7cc0-4afa-9fdf-6ed377c36aad", "refreshToken": "80b1e911-df97-43f1-9f11-17b61913f6d7"}', true);
+INSERT INTO public.identities (id, user_id, created, updated, type, identifier, name, aff, oauth, is_default) VALUES ('049f91da-c84e-4b80-be2e-6e0cfca7a136', '231717dd-ba09-43d4-ac98-9d5542b27a0c', '2020-07-22 14:18:36.611+02', '2020-07-22 14:18:37.745+02', 'orcid', '0000-0003-2536-230X', 'Test Account', NULL, '{"accessToken": "eb551178-79e5-4189-8c5f-0a553092a9b5", "refreshToken": "4506fa5f-bd77-4867-afb4-0b07ea5302d6"}', true);
+INSERT INTO public.identities (id, user_id, created, updated, type, identifier, name, aff, oauth, is_default) VALUES ('2fb8359c-239c-43fa-91f5-1ff2058272a6', '1d599f2c-d293-4d5e-b6c1-ba34e81e3fc8', '2020-07-24 15:21:54.604+02', '2020-07-24 15:21:55.7+02', 'orcid', '0000-0003-1838-2441', 'Joanne Pilger', NULL, '{"accessToken": "842de329-ef16-4461-b83b-e8fe57238904", "refreshToken": "524fbdc5-9c67-4b4c-af17-2ce4cf294e88"}', true);
+
+
+--
+-- Data for Name: manuscripts; Type: TABLE DATA; Schema: public; Owner: test
+--
+
+INSERT INTO public.manuscripts (id, created, updated, parent_id, submitter_id, status, decision, authors, suggestions, meta, submission, type) VALUES ('93735475-08f6-436b-9db3-fe2364b9dbb2', '2020-08-12 16:16:44.9+02', '2020-08-13 15:12:29.223+02', NULL, '027afa6a-edbc-486e-bb31-71e12f8ea1c5', 'accepted', 'accepted', NULL, NULL, '{"notes": [{"content": "", "notesType": "fundingAcknowledgement"}, {"content": "", "notesType": "specialInstructions"}], "title": "My URL submission"}', '{"irb": "yes", "name": "Emily Clay", "cover": "This is my cover letter", "links": "https://doi.org/10.6084/m9.figshare.913521.v1, https://github.com/jure/mathtype_to_mathml", "ethics": "This is my ethics statement", "contact": "emily@example.com", "methods": ["Functional MRI", "Optical Imaging"], "datacode": "This is my data and code availability statement", "humanMRI": "3T", "keywords": "some, keyword", "packages": ["SPM", "FSL"], "subjects": "patients", "suggested": "Erica James, Matthew Matretzky", "objectType": "software", "affiliation": "Example University, Egland", "otherMethods": "Erica James, Matthew Matretzky", "humanMRIother": "7T", "otherPackages": "Jupyter, Stencila", "animal_research_approval": "yes"}', 'Manuscript');
+
+
+--
+-- Data for Name: messages; Type: TABLE DATA; Schema: public; Owner: test
+--
+
+
+
+--
+-- Data for Name: migrations; Type: TABLE DATA; Schema: public; Owner: test
+--
+
+INSERT INTO public.migrations (id, run_at) VALUES ('1524494862-entities.sql', '2020-08-12 14:59:10.439327+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1542276313-initial-user-migration.sql', '2020-08-12 14:59:10.452184+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1560771823-add-unique-constraints-to-users.sql', '2020-08-12 14:59:10.463129+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1580908536-add-identities.sql', '2020-08-12 14:59:10.477935+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1581371297-migrate-users-to-identities.js', '2020-08-12 14:59:10.499722+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1581450834-manuscript.sql', '2020-08-12 14:59:10.509542+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1582930582-drop-fragments-and-collections.js', '2020-08-12 14:59:10.519573+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1585323910-add-channels.sql', '2020-08-12 14:59:10.533012+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1585344885-add-messages.sql', '2020-08-12 14:59:10.544214+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1585513226-add-profile-pic.sql', '2020-08-12 14:59:10.549847+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1592915682-change-identities-constraint.sql', '2020-08-12 14:59:10.558714+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1596830547-review.sql', '2020-08-12 14:59:10.571826+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1596830548-add-review-comments.sql', '2020-08-12 14:59:10.583466+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1596830548-initial-team-migration.sql', '2020-08-12 14:59:10.611618+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1596838897-files.sql', '2020-08-12 14:59:10.627188+02');
+
+
+--
+-- Data for Name: review_comments; Type: TABLE DATA; Schema: public; Owner: test
+--
+
+INSERT INTO public.review_comments (id, created, updated, review_id, user_id, content, comment_type, type) VALUES ('f73fdbd8-6fb6-4d7a-a74a-ab2c2c07b572', '2020-08-13 15:09:33.838+02', '2020-08-13 15:09:33.838+02', '5a06fcf3-d368-4f65-917c-1acdb73fcc71', NULL, '<p>Great paper, congratulations! Gale Davis</p>', 'review', 'ReviewComment');
+INSERT INTO public.review_comments (id, created, updated, review_id, user_id, content, comment_type, type) VALUES ('5c86da62-bc7f-4d23-8968-62bd5a56a52b', '2020-08-13 15:09:34.88+02', '2020-08-13 15:09:34.88+02', '5a06fcf3-d368-4f65-917c-1acdb73fcc71', NULL, '<p>This is a very important paper. Gale Davis</p>', 'confidential', 'ReviewComment');
+INSERT INTO public.review_comments (id, created, updated, review_id, user_id, content, comment_type, type) VALUES ('ef96b249-dab6-4f7e-b24e-571b340b9b41', '2020-08-13 15:09:38.761+02', '2020-08-13 15:09:38.761+02', '7c6cd2f6-c23e-4902-96ac-df4801ac3d0a', NULL, '<p>Great paper, congratulations! Sherry Crofoot</p>', 'review', 'ReviewComment');
+INSERT INTO public.review_comments (id, created, updated, review_id, user_id, content, comment_type, type) VALUES ('04a8a70e-7787-4fd6-bdca-bfac3aa86951', '2020-08-13 15:09:40.155+02', '2020-08-13 15:09:40.155+02', '7c6cd2f6-c23e-4902-96ac-df4801ac3d0a', NULL, '<p>This is a very important paper. Sherry Crofoot</p>', 'confidential', 'ReviewComment');
+INSERT INTO public.review_comments (id, created, updated, review_id, user_id, content, comment_type, type) VALUES ('7ccda096-07c2-4569-ad0f-5b3574db205e', '2020-08-13 15:09:44.046+02', '2020-08-13 15:09:44.046+02', '3a34e0ef-6695-4268-b901-60de20f9cf4e', NULL, '<p>Great paper, congratulations! Elaine Barnes</p>', 'review', 'ReviewComment');
+INSERT INTO public.review_comments (id, created, updated, review_id, user_id, content, comment_type, type) VALUES ('c8b7d1c9-aef2-47d0-a9ad-c9d46706e79e', '2020-08-13 15:09:45.548+02', '2020-08-13 15:09:45.548+02', '3a34e0ef-6695-4268-b901-60de20f9cf4e', NULL, '<p>This is a very important paper. Elaine Barnes</p>', 'confidential', 'ReviewComment');
+
+
+--
+-- Data for Name: reviews; Type: TABLE DATA; Schema: public; Owner: test
+--
+
+INSERT INTO public.reviews (id, created, updated, recommendation, is_decision, user_id, manuscript_id, type) VALUES ('5a06fcf3-d368-4f65-917c-1acdb73fcc71', '2020-08-13 15:09:32.358+02', '2020-08-13 15:09:34.925+02', 'accepted', false, '40e3d054-9ac8-4c0f-84ed-e3c6307662cd', '93735475-08f6-436b-9db3-fe2364b9dbb2', 'Review');
+INSERT INTO public.reviews (id, created, updated, recommendation, is_decision, user_id, manuscript_id, type) VALUES ('7c6cd2f6-c23e-4902-96ac-df4801ac3d0a', '2020-08-13 15:09:36.501+02', '2020-08-13 15:09:40.159+02', 'accepted', false, '0da0bbec-9261-4706-b990-0c10aa3cc6b4', '93735475-08f6-436b-9db3-fe2364b9dbb2', 'Review');
+INSERT INTO public.reviews (id, created, updated, recommendation, is_decision, user_id, manuscript_id, type) VALUES ('3a34e0ef-6695-4268-b901-60de20f9cf4e', '2020-08-13 15:09:41.911+02', '2020-08-13 15:09:45.561+02', 'accepted', false, '85e1300e-003c-4e96-987b-23812f902477', '93735475-08f6-436b-9db3-fe2364b9dbb2', 'Review');
+INSERT INTO public.reviews (id, created, updated, recommendation, is_decision, user_id, manuscript_id, type) VALUES ('7d962c82-322e-4b02-8981-5f26479433ab', '2020-08-13 15:12:28.737+02', '2020-08-13 15:12:28.737+02', 'accepted', true, '1d599f2c-d293-4d5e-b6c1-ba34e81e3fc8', '93735475-08f6-436b-9db3-fe2364b9dbb2', 'Review');
+
+
+--
+-- Data for Name: team_members; Type: TABLE DATA; Schema: public; Owner: test
+--
+
+INSERT INTO public.team_members (id, created, updated, status, team_id, user_id, alias_id) VALUES ('6505126d-2ecd-498b-a27d-18eafbdbc8a6', '2020-08-12 16:16:44.923+02', '2020-08-12 16:16:44.923+02', NULL, 'c31e3116-6176-45b5-b52c-6f7cbfc86007', '027afa6a-edbc-486e-bb31-71e12f8ea1c5', NULL);
+INSERT INTO public.team_members (id, created, updated, status, team_id, user_id, alias_id) VALUES ('031ae180-e94e-458d-86b7-f2dc1d456e2e', '2020-08-12 16:17:14.795+02', '2020-08-12 16:17:14.795+02', NULL, 'bf800912-56c4-44eb-b425-64e51a9824fe', '1d599f2c-d293-4d5e-b6c1-ba34e81e3fc8', NULL);
+INSERT INTO public.team_members (id, created, updated, status, team_id, user_id, alias_id) VALUES ('c4ac4fc0-3fae-43b0-89ee-bf7f8fd9885f', '2020-08-12 16:17:43.262+02', '2020-08-13 15:09:41.898+02', 'completed', '0719d132-bb6c-49d9-9122-7911a48cfd60', '40e3d054-9ac8-4c0f-84ed-e3c6307662cd', NULL);
+INSERT INTO public.team_members (id, created, updated, status, team_id, user_id, alias_id) VALUES ('69e896c6-0fdb-421d-a638-1ef7670c03c9', '2020-08-12 16:17:43.884+02', '2020-08-13 15:09:41.898+02', 'completed', '0719d132-bb6c-49d9-9122-7911a48cfd60', '0da0bbec-9261-4706-b990-0c10aa3cc6b4', NULL);
+INSERT INTO public.team_members (id, created, updated, status, team_id, user_id, alias_id) VALUES ('12c33ef5-4fc3-4d48-8309-a90c0461113c', '2020-08-12 16:17:44.547+02', '2020-08-13 15:09:45.782+02', 'completed', '0719d132-bb6c-49d9-9122-7911a48cfd60', '85e1300e-003c-4e96-987b-23812f902477', NULL);
+
+
+--
+-- Data for Name: teams; Type: TABLE DATA; Schema: public; Owner: test
+--
+
+INSERT INTO public.teams (id, created, updated, name, role, members, owners, global, type, manuscript_id) VALUES ('c31e3116-6176-45b5-b52c-6f7cbfc86007', '2020-08-12 16:16:44.916+02', '2020-08-12 16:16:44.916+02', 'Author', 'author', NULL, NULL, NULL, 'team', '93735475-08f6-436b-9db3-fe2364b9dbb2');
+INSERT INTO public.teams (id, created, updated, name, role, members, owners, global, type, manuscript_id) VALUES ('bf800912-56c4-44eb-b425-64e51a9824fe', '2020-08-12 16:17:14.789+02', '2020-08-12 16:17:14.789+02', 'Senior Editor', 'seniorEditor', NULL, NULL, NULL, 'team', '93735475-08f6-436b-9db3-fe2364b9dbb2');
+INSERT INTO public.teams (id, created, updated, name, role, members, owners, global, type, manuscript_id) VALUES ('0719d132-bb6c-49d9-9122-7911a48cfd60', '2020-08-12 16:17:43.258+02', '2020-08-13 15:09:41.898+02', 'Reviewers', 'reviewer', NULL, NULL, NULL, 'team', '93735475-08f6-436b-9db3-fe2364b9dbb2');
+
+
+--
+-- Data for Name: users; Type: TABLE DATA; Schema: public; Owner: test
+--
+
+INSERT INTO public.users (id, created, updated, admin, email, username, password_hash, teams, password_reset_token, password_reset_timestamp, type, profile_picture, online) VALUES ('231717dd-ba09-43d4-ac98-9d5542b27a0c', '2020-07-22 14:18:36.597+02', '2020-07-24 16:43:54.939+02', NULL, NULL, '000000032536230X', NULL, NULL, NULL, NULL, 'user', '/static/profiles/testuser5.jpg', false);
+INSERT INTO public.users (id, created, updated, admin, email, username, password_hash, teams, password_reset_token, password_reset_timestamp, type, profile_picture, online) VALUES ('027afa6a-edbc-486e-bb31-71e12f8ea1c5', '2020-07-21 16:17:24.734+02', '2020-08-12 16:17:13.598+02', NULL, NULL, '0000000205642016', NULL, NULL, NULL, NULL, 'user', '/static/profiles/testuser2.jpg', false);
+INSERT INTO public.users (id, created, updated, admin, email, username, password_hash, teams, password_reset_token, password_reset_timestamp, type, profile_picture, online) VALUES ('3802b0e7-aadc-45de-9cf9-918fede99b97', '2020-07-21 16:30:45.719+02', '2020-08-12 16:17:14.868+02', true, NULL, '0000000256415729', NULL, NULL, NULL, NULL, 'user', '/static/profiles/testuser6.jpg', false);
+INSERT INTO public.users (id, created, updated, admin, email, username, password_hash, teams, password_reset_token, password_reset_timestamp, type, profile_picture, online) VALUES ('40e3d054-9ac8-4c0f-84ed-e3c6307662cd', '2020-07-21 16:36:24.973+02', '2020-08-13 15:09:35.913+02', NULL, NULL, '0000000159567341', NULL, NULL, NULL, NULL, 'user', '/static/profiles/testuser4.jpg', false);
+INSERT INTO public.users (id, created, updated, admin, email, username, password_hash, teams, password_reset_token, password_reset_timestamp, type, profile_picture, online) VALUES ('0da0bbec-9261-4706-b990-0c10aa3cc6b4', '2020-07-21 16:35:06.125+02', '2020-08-13 15:09:41.198+02', NULL, NULL, '0000000276459921', NULL, NULL, NULL, NULL, 'user', '/static/profiles/testuser7.jpg', false);
+INSERT INTO public.users (id, created, updated, admin, email, username, password_hash, teams, password_reset_token, password_reset_timestamp, type, profile_picture, online) VALUES ('85e1300e-003c-4e96-987b-23812f902477', '2020-07-21 16:35:38.381+02', '2020-08-13 15:09:46.741+02', NULL, NULL, '0000000294294446', NULL, NULL, NULL, NULL, 'user', '/static/profiles/testuser1.jpg', false);
+INSERT INTO public.users (id, created, updated, admin, email, username, password_hash, teams, password_reset_token, password_reset_timestamp, type, profile_picture, online) VALUES ('1d599f2c-d293-4d5e-b6c1-ba34e81e3fc8', '2020-07-24 15:21:54.59+02', '2020-08-13 15:12:29.67+02', NULL, NULL, '0000000318382441', NULL, NULL, NULL, NULL, 'user', '/static/profiles/testuser3.jpg', true);
+
+
+--
+-- Name: job job_pkey; Type: CONSTRAINT; Schema: pgboss; Owner: test
+--
+
+ALTER TABLE ONLY pgboss.job
+    ADD CONSTRAINT job_pkey PRIMARY KEY (id);
+
+
+--
+-- Name: version version_pkey; Type: CONSTRAINT; Schema: pgboss; Owner: test
+--
+
+ALTER TABLE ONLY pgboss.version
+    ADD CONSTRAINT version_pkey PRIMARY KEY (version);
+
+
+--
+-- Name: aliases aliases_pkey; Type: CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.aliases
+    ADD CONSTRAINT aliases_pkey PRIMARY KEY (id);
+
+
+--
+-- Name: channel_members channel_members_pkey; Type: CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.channel_members
+    ADD CONSTRAINT channel_members_pkey PRIMARY KEY (id);
+
+
+--
+-- Name: channels channels_pkey; Type: CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.channels
+    ADD CONSTRAINT channels_pkey PRIMARY KEY (id);
+
+
+--
+-- Name: entities entities_pkey; Type: CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.entities
+    ADD CONSTRAINT entities_pkey PRIMARY KEY (id);
+
+
+--
+-- Name: files files_pkey; Type: CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.files
+    ADD CONSTRAINT files_pkey PRIMARY KEY (id);
+
+
+--
+-- Name: identities identities_pkey; Type: CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.identities
+    ADD CONSTRAINT identities_pkey PRIMARY KEY (id);
+
+
+--
+-- Name: manuscripts manuscripts_pkey; Type: CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.manuscripts
+    ADD CONSTRAINT manuscripts_pkey PRIMARY KEY (id);
+
+
+--
+-- Name: messages messages_pkey; Type: CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.messages
+    ADD CONSTRAINT messages_pkey PRIMARY KEY (id);
+
+
+--
+-- Name: migrations migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.migrations
+    ADD CONSTRAINT migrations_pkey PRIMARY KEY (id);
+
+
+--
+-- Name: review_comments review_comments_pkey; Type: CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.review_comments
+    ADD CONSTRAINT review_comments_pkey PRIMARY KEY (id);
+
+
+--
+-- Name: reviews reviews_pkey; Type: CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.reviews
+    ADD CONSTRAINT reviews_pkey PRIMARY KEY (id);
+
+
+--
+-- Name: team_members team_members_pkey; Type: CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.team_members
+    ADD CONSTRAINT team_members_pkey PRIMARY KEY (id);
+
+
+--
+-- Name: teams teams_pkey; Type: CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.teams
+    ADD CONSTRAINT teams_pkey PRIMARY KEY (id);
+
+
+--
+-- Name: users users_email_key; Type: CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.users
+    ADD CONSTRAINT users_email_key UNIQUE (email);
+
+
+--
+-- Name: users users_pkey; Type: CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.users
+    ADD CONSTRAINT users_pkey PRIMARY KEY (id);
+
+
+--
+-- Name: users users_username_key; Type: CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.users
+    ADD CONSTRAINT users_username_key UNIQUE (username);
+
+
+--
+-- Name: archive_archivedon_idx; Type: INDEX; Schema: pgboss; Owner: test
+--
+
+CREATE INDEX archive_archivedon_idx ON pgboss.archive USING btree (archivedon);
+
+
+--
+-- Name: archive_id_idx; Type: INDEX; Schema: pgboss; Owner: test
+--
+
+CREATE INDEX archive_id_idx ON pgboss.archive USING btree (id);
+
+
+--
+-- Name: job_name; Type: INDEX; Schema: pgboss; Owner: test
+--
+
+CREATE INDEX job_name ON pgboss.job USING btree (name text_pattern_ops);
+
+
+--
+-- Name: job_singletonkey; Type: INDEX; Schema: pgboss; Owner: test
+--
+
+CREATE UNIQUE INDEX job_singletonkey ON pgboss.job USING btree (name, singletonkey) WHERE ((state < 'completed'::pgboss.job_state) AND (singletonon IS NULL));
+
+
+--
+-- Name: job_singletonkeyon; Type: INDEX; Schema: pgboss; Owner: test
+--
+
+CREATE UNIQUE INDEX job_singletonkeyon ON pgboss.job USING btree (name, singletonon, singletonkey) WHERE (state < 'expired'::pgboss.job_state);
+
+
+--
+-- Name: job_singletonon; Type: INDEX; Schema: pgboss; Owner: test
+--
+
+CREATE UNIQUE INDEX job_singletonon ON pgboss.job USING btree (name, singletonon) WHERE ((state < 'expired'::pgboss.job_state) AND (singletonkey IS NULL));
+
+
+--
+-- Name: channel_members_idx; Type: INDEX; Schema: public; Owner: test
+--
+
+CREATE INDEX channel_members_idx ON public.channel_members USING btree (user_id, channel_id);
+
+
+--
+-- Name: is_default_idx; Type: INDEX; Schema: public; Owner: test
+--
+
+CREATE UNIQUE INDEX is_default_idx ON public.identities USING btree (is_default, user_id) WHERE (is_default IS TRUE);
+
+
+--
+-- Name: team_members_team_id_user_id_idx; Type: INDEX; Schema: public; Owner: test
+--
+
+CREATE INDEX team_members_team_id_user_id_idx ON public.team_members USING btree (team_id, user_id);
+
+
+--
+-- Name: teams_manuscript_id_idx; Type: INDEX; Schema: public; Owner: test
+--
+
+CREATE INDEX teams_manuscript_id_idx ON public.teams USING btree (manuscript_id);
+
+
+--
+-- Name: channel_members channel_members_channel_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.channel_members
+    ADD CONSTRAINT channel_members_channel_id_fkey FOREIGN KEY (channel_id) REFERENCES public.channels(id);
+
+
+--
+-- Name: channel_members channel_members_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.channel_members
+    ADD CONSTRAINT channel_members_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;
+
+
+--
+-- Name: channels channels_manuscript_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.channels
+    ADD CONSTRAINT channels_manuscript_id_fkey FOREIGN KEY (manuscript_id) REFERENCES public.manuscripts(id) ON DELETE CASCADE;
+
+
+--
+-- Name: files files_manuscript_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.files
+    ADD CONSTRAINT files_manuscript_id_fkey FOREIGN KEY (manuscript_id) REFERENCES public.manuscripts(id) ON DELETE CASCADE;
+
+
+--
+-- Name: files files_review_comment_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.files
+    ADD CONSTRAINT files_review_comment_id_fkey FOREIGN KEY (review_comment_id) REFERENCES public.review_comments(id) ON DELETE CASCADE;
+
+
+--
+-- Name: manuscripts manuscripts_submitter_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.manuscripts
+    ADD CONSTRAINT manuscripts_submitter_id_fkey FOREIGN KEY (submitter_id) REFERENCES public.users(id);
+
+
+--
+-- Name: messages messages_channel_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.messages
+    ADD CONSTRAINT messages_channel_id_fkey FOREIGN KEY (channel_id) REFERENCES public.channels(id) ON DELETE CASCADE;
+
+
+--
+-- Name: messages messages_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.messages
+    ADD CONSTRAINT messages_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;
+
+
+--
+-- Name: review_comments review_comments_review_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.review_comments
+    ADD CONSTRAINT review_comments_review_id_fkey FOREIGN KEY (review_id) REFERENCES public.reviews(id) ON DELETE CASCADE;
+
+
+--
+-- Name: review_comments review_comments_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.review_comments
+    ADD CONSTRAINT review_comments_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE SET NULL;
+
+
+--
+-- Name: reviews reviews_manuscript_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.reviews
+    ADD CONSTRAINT reviews_manuscript_id_fkey FOREIGN KEY (manuscript_id) REFERENCES public.manuscripts(id) ON DELETE CASCADE;
+
+
+--
+-- Name: identities sidentities_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.identities
+    ADD CONSTRAINT sidentities_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;
+
+
+--
+-- Name: team_members team_members_alias_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.team_members
+    ADD CONSTRAINT team_members_alias_id_fkey FOREIGN KEY (alias_id) REFERENCES public.aliases(id);
+
+
+--
+-- Name: team_members team_members_team_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.team_members
+    ADD CONSTRAINT team_members_team_id_fkey FOREIGN KEY (team_id) REFERENCES public.teams(id) ON UPDATE CASCADE ON DELETE CASCADE;
+
+
+--
+-- Name: team_members team_members_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.team_members
+    ADD CONSTRAINT team_members_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;
+
+
+--
+-- Name: teams teams_manuscript_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.teams
+    ADD CONSTRAINT teams_manuscript_id_fkey FOREIGN KEY (manuscript_id) REFERENCES public.manuscripts(id) ON DELETE CASCADE;
+
+
+--
+-- PostgreSQL database dump complete
+--
+
diff --git a/cypress/dumps/initialState.sql b/cypress/dumps/initialState.sql
index 150e6e25c9d79b1b2f7ce6a489693b501b1ab54a..0efe5f96fd618984916c97112e7c973c47411111 100644
--- a/cypress/dumps/initialState.sql
+++ b/cypress/dumps/initialState.sql
@@ -15,6 +15,15 @@ SET check_function_bodies = false;
 SET client_min_messages = warning;
 SET row_security = off;
 
+--
+-- Name: pgboss; Type: SCHEMA; Schema: -; Owner: test
+--
+
+CREATE SCHEMA pgboss;
+
+
+ALTER SCHEMA pgboss OWNER TO test;
+
 --
 -- Name: plpgsql; Type: EXTENSION; Schema: -; Owner:
 --
@@ -29,10 +38,105 @@ CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
 COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
 
 
+--
+-- Name: pgcrypto; Type: EXTENSION; Schema: -; Owner:
+--
+
+CREATE EXTENSION IF NOT EXISTS pgcrypto WITH SCHEMA public;
+
+
+--
+-- Name: EXTENSION pgcrypto; Type: COMMENT; Schema: -; Owner:
+--
+
+COMMENT ON EXTENSION pgcrypto IS 'cryptographic functions';
+
+
+--
+-- Name: job_state; Type: TYPE; Schema: pgboss; Owner: test
+--
+
+CREATE TYPE pgboss.job_state AS ENUM (
+    'created',
+    'retry',
+    'active',
+    'completed',
+    'expired',
+    'cancelled',
+    'failed'
+);
+
+
+ALTER TYPE pgboss.job_state OWNER TO test;
+
 SET default_tablespace = '';
 
 SET default_with_oids = false;
 
+--
+-- Name: archive; Type: TABLE; Schema: pgboss; Owner: test
+--
+
+CREATE TABLE pgboss.archive (
+    id uuid NOT NULL,
+    name text NOT NULL,
+    priority integer NOT NULL,
+    data jsonb,
+    state pgboss.job_state NOT NULL,
+    retrylimit integer NOT NULL,
+    retrycount integer NOT NULL,
+    retrydelay integer NOT NULL,
+    retrybackoff boolean NOT NULL,
+    startafter timestamp with time zone NOT NULL,
+    startedon timestamp with time zone,
+    singletonkey text,
+    singletonon timestamp without time zone,
+    expirein interval NOT NULL,
+    createdon timestamp with time zone NOT NULL,
+    completedon timestamp with time zone,
+    archivedon timestamp with time zone DEFAULT now() NOT NULL
+);
+
+
+ALTER TABLE pgboss.archive OWNER TO test;
+
+--
+-- Name: job; Type: TABLE; Schema: pgboss; Owner: test
+--
+
+CREATE TABLE pgboss.job (
+    id uuid DEFAULT public.gen_random_uuid() NOT NULL,
+    name text NOT NULL,
+    priority integer DEFAULT 0 NOT NULL,
+    data jsonb,
+    state pgboss.job_state DEFAULT 'created'::pgboss.job_state NOT NULL,
+    retrylimit integer DEFAULT 0 NOT NULL,
+    retrycount integer DEFAULT 0 NOT NULL,
+    retrydelay integer DEFAULT 0 NOT NULL,
+    retrybackoff boolean DEFAULT false NOT NULL,
+    startafter timestamp with time zone DEFAULT now() NOT NULL,
+    startedon timestamp with time zone,
+    singletonkey text,
+    singletonon timestamp without time zone,
+    expirein interval DEFAULT '00:15:00'::interval NOT NULL,
+    createdon timestamp with time zone DEFAULT now() NOT NULL,
+    completedon timestamp with time zone
+);
+
+
+ALTER TABLE pgboss.job OWNER TO test;
+
+--
+-- Name: version; Type: TABLE; Schema: pgboss; Owner: test
+--
+
+CREATE TABLE pgboss.version (
+    version text NOT NULL
+);
+
+
+ALTER TABLE pgboss.version OWNER TO test;
+
 --
 -- Name: aliases; Type: TABLE; Schema: public; Owner: test
 --
@@ -213,7 +317,6 @@ CREATE TABLE public.reviews (
     updated timestamp with time zone,
     recommendation text,
     is_decision boolean DEFAULT false,
-    comments jsonb,
     user_id uuid,
     manuscript_id uuid,
     type text NOT NULL
@@ -282,6 +385,25 @@ CREATE TABLE public.users (
 
 ALTER TABLE public.users OWNER TO test;
 
+--
+-- Data for Name: archive; Type: TABLE DATA; Schema: pgboss; Owner: test
+--
+
+
+
+--
+-- Data for Name: job; Type: TABLE DATA; Schema: pgboss; Owner: test
+--
+
+
+
+--
+-- Data for Name: version; Type: TABLE DATA; Schema: pgboss; Owner: test
+--
+
+INSERT INTO pgboss.version (version) VALUES ('11');
+
+
 --
 -- Data for Name: aliases; Type: TABLE DATA; Schema: public; Owner: test
 --
@@ -334,21 +456,21 @@ ALTER TABLE public.users OWNER TO test;
 -- Data for Name: migrations; Type: TABLE DATA; Schema: public; Owner: test
 --
 
-INSERT INTO public.migrations (id, run_at) VALUES ('1524494862-entities.sql', '2020-08-08 01:24:21.497041+02');
-INSERT INTO public.migrations (id, run_at) VALUES ('1542276313-initial-user-migration.sql', '2020-08-08 01:24:21.508257+02');
-INSERT INTO public.migrations (id, run_at) VALUES ('1560771823-add-unique-constraints-to-users.sql', '2020-08-08 01:24:21.516779+02');
-INSERT INTO public.migrations (id, run_at) VALUES ('1580908536-add-identities.sql', '2020-08-08 01:24:21.53186+02');
-INSERT INTO public.migrations (id, run_at) VALUES ('1581371297-migrate-users-to-identities.js', '2020-08-08 01:24:21.553008+02');
-INSERT INTO public.migrations (id, run_at) VALUES ('1581450834-manuscript.sql', '2020-08-08 01:24:21.562353+02');
-INSERT INTO public.migrations (id, run_at) VALUES ('1582930582-drop-fragments-and-collections.js', '2020-08-08 01:24:21.571131+02');
-INSERT INTO public.migrations (id, run_at) VALUES ('1585323910-add-channels.sql', '2020-08-08 01:24:21.584346+02');
-INSERT INTO public.migrations (id, run_at) VALUES ('1585344885-add-messages.sql', '2020-08-08 01:24:21.594971+02');
-INSERT INTO public.migrations (id, run_at) VALUES ('1585513226-add-profile-pic.sql', '2020-08-08 01:24:21.600277+02');
-INSERT INTO public.migrations (id, run_at) VALUES ('1592915682-change-identities-constraint.sql', '2020-08-08 01:24:21.608405+02');
-INSERT INTO public.migrations (id, run_at) VALUES ('1596830547-review.sql', '2020-08-08 01:24:21.617437+02');
-INSERT INTO public.migrations (id, run_at) VALUES ('1596830548-add-review-comments.sql', '2020-08-08 01:24:21.627281+02');
-INSERT INTO public.migrations (id, run_at) VALUES ('1596830548-initial-team-migration.sql', '2020-08-08 01:25:13.230055+02');
-INSERT INTO public.migrations (id, run_at) VALUES ('1596838897-files.sql', '2020-08-08 01:25:13.243773+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1524494862-entities.sql', '2020-08-12 14:59:10.439327+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1542276313-initial-user-migration.sql', '2020-08-12 14:59:10.452184+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1560771823-add-unique-constraints-to-users.sql', '2020-08-12 14:59:10.463129+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1580908536-add-identities.sql', '2020-08-12 14:59:10.477935+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1581371297-migrate-users-to-identities.js', '2020-08-12 14:59:10.499722+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1581450834-manuscript.sql', '2020-08-12 14:59:10.509542+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1582930582-drop-fragments-and-collections.js', '2020-08-12 14:59:10.519573+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1585323910-add-channels.sql', '2020-08-12 14:59:10.533012+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1585344885-add-messages.sql', '2020-08-12 14:59:10.544214+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1585513226-add-profile-pic.sql', '2020-08-12 14:59:10.549847+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1592915682-change-identities-constraint.sql', '2020-08-12 14:59:10.558714+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1596830547-review.sql', '2020-08-12 14:59:10.571826+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1596830548-add-review-comments.sql', '2020-08-12 14:59:10.583466+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1596830548-initial-team-migration.sql', '2020-08-12 14:59:10.611618+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1596838897-files.sql', '2020-08-12 14:59:10.627188+02');
 
 
 --
@@ -381,6 +503,22 @@ INSERT INTO public.migrations (id, run_at) VALUES ('1596838897-files.sql', '2020
 
 
 
+--
+-- Name: job job_pkey; Type: CONSTRAINT; Schema: pgboss; Owner: test
+--
+
+ALTER TABLE ONLY pgboss.job
+    ADD CONSTRAINT job_pkey PRIMARY KEY (id);
+
+
+--
+-- Name: version version_pkey; Type: CONSTRAINT; Schema: pgboss; Owner: test
+--
+
+ALTER TABLE ONLY pgboss.version
+    ADD CONSTRAINT version_pkey PRIMARY KEY (version);
+
+
 --
 -- Name: aliases aliases_pkey; Type: CONSTRAINT; Schema: public; Owner: test
 --
@@ -509,6 +647,48 @@ ALTER TABLE ONLY public.users
     ADD CONSTRAINT users_username_key UNIQUE (username);
 
 
+--
+-- Name: archive_archivedon_idx; Type: INDEX; Schema: pgboss; Owner: test
+--
+
+CREATE INDEX archive_archivedon_idx ON pgboss.archive USING btree (archivedon);
+
+
+--
+-- Name: archive_id_idx; Type: INDEX; Schema: pgboss; Owner: test
+--
+
+CREATE INDEX archive_id_idx ON pgboss.archive USING btree (id);
+
+
+--
+-- Name: job_name; Type: INDEX; Schema: pgboss; Owner: test
+--
+
+CREATE INDEX job_name ON pgboss.job USING btree (name text_pattern_ops);
+
+
+--
+-- Name: job_singletonkey; Type: INDEX; Schema: pgboss; Owner: test
+--
+
+CREATE UNIQUE INDEX job_singletonkey ON pgboss.job USING btree (name, singletonkey) WHERE ((state < 'completed'::pgboss.job_state) AND (singletonon IS NULL));
+
+
+--
+-- Name: job_singletonkeyon; Type: INDEX; Schema: pgboss; Owner: test
+--
+
+CREATE UNIQUE INDEX job_singletonkeyon ON pgboss.job USING btree (name, singletonon, singletonkey) WHERE (state < 'expired'::pgboss.job_state);
+
+
+--
+-- Name: job_singletonon; Type: INDEX; Schema: pgboss; Owner: test
+--
+
+CREATE UNIQUE INDEX job_singletonon ON pgboss.job USING btree (name, singletonon) WHERE ((state < 'expired'::pgboss.job_state) AND (singletonkey IS NULL));
+
+
 --
 -- Name: channel_members_idx; Type: INDEX; Schema: public; Owner: test
 --
diff --git a/cypress/dumps/reviewers_invited.sql b/cypress/dumps/reviewers_invited.sql
index 0af47e77a00e7b820c4706585abb16bfeffe0d1f..3733f35db91d178c49e70b354276c2dedc16d5b7 100644
--- a/cypress/dumps/reviewers_invited.sql
+++ b/cypress/dumps/reviewers_invited.sql
@@ -145,9 +145,9 @@ CREATE TABLE public.aliases (
     id uuid NOT NULL,
     created timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
     updated timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
-    name character varying(255),
-    email character varying(255),
-    aff character varying(255)
+    name text,
+    email text,
+    aff text
 );
 
 
@@ -175,7 +175,6 @@ ALTER TABLE public.channel_members OWNER TO test;
 CREATE TABLE public.channels (
     id uuid NOT NULL,
     manuscript_id uuid,
-    team_id uuid,
     created timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
     updated timestamp with time zone,
     topic text,
@@ -205,15 +204,16 @@ CREATE TABLE public.files (
     id uuid NOT NULL,
     created timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
     updated timestamp with time zone,
-    object text,
-    object_id uuid,
     label text,
     file_type text,
     filename text,
     url text,
     mime_type text,
     size integer,
-    type text NOT NULL
+    type text NOT NULL,
+    manuscript_id uuid,
+    review_comment_id uuid,
+    CONSTRAINT exactly_one_file_owner CHECK (((((manuscript_id IS NOT NULL))::integer + ((review_comment_id IS NOT NULL))::integer) = 1))
 );
 
 
@@ -289,6 +289,24 @@ CREATE TABLE public.migrations (
 
 ALTER TABLE public.migrations OWNER TO test;
 
+--
+-- Name: review_comments; Type: TABLE; Schema: public; Owner: test
+--
+
+CREATE TABLE public.review_comments (
+    id uuid NOT NULL,
+    created timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
+    updated timestamp with time zone,
+    review_id uuid,
+    user_id uuid,
+    content text,
+    comment_type text,
+    type text
+);
+
+
+ALTER TABLE public.review_comments OWNER TO test;
+
 --
 -- Name: reviews; Type: TABLE; Schema: public; Owner: test
 --
@@ -299,7 +317,6 @@ CREATE TABLE public.reviews (
     updated timestamp with time zone,
     recommendation text,
     is_decision boolean DEFAULT false,
-    comments jsonb,
     user_id uuid,
     manuscript_id uuid,
     type text NOT NULL
@@ -335,11 +352,11 @@ CREATE TABLE public.teams (
     updated timestamp with time zone,
     name text,
     role text NOT NULL,
+    members jsonb,
     owners jsonb,
     global boolean,
     type text NOT NULL,
-    object_id uuid,
-    object_type character varying(255)
+    manuscript_id uuid
 );
 
 
@@ -403,8 +420,8 @@ INSERT INTO pgboss.version (version) VALUES ('11');
 -- Data for Name: channels; Type: TABLE DATA; Schema: public; Owner: test
 --
 
-INSERT INTO public.channels (id, manuscript_id, team_id, created, updated, topic, type) VALUES ('466f49f5-f4ca-46ca-82ca-693212ca9ba2', 'fb2534c6-ecbb-4846-a61d-609dc119e9b0', NULL, '2020-07-28 00:41:34.01+02', '2020-07-28 00:41:34.01+02', 'Editorial discussion', 'editorial');
-INSERT INTO public.channels (id, manuscript_id, team_id, created, updated, topic, type) VALUES ('d24525e7-f36e-4f5e-b0cb-e05ef0ea9062', 'fb2534c6-ecbb-4846-a61d-609dc119e9b0', NULL, '2020-07-28 00:41:34.011+02', '2020-07-28 00:41:34.011+02', 'Manuscript discussion', 'all');
+INSERT INTO public.channels (id, manuscript_id, created, updated, topic, type) VALUES ('afd95c06-011b-46e3-9985-964283d51c4a', '93735475-08f6-436b-9db3-fe2364b9dbb2', '2020-08-12 16:16:44.916+02', '2020-08-12 16:16:44.916+02', 'Manuscript discussion', 'all');
+INSERT INTO public.channels (id, manuscript_id, created, updated, topic, type) VALUES ('75540565-6619-495f-a8c5-d6bf11ece72d', '93735475-08f6-436b-9db3-fe2364b9dbb2', '2020-08-12 16:16:44.916+02', '2020-08-12 16:16:44.916+02', 'Editorial discussion', 'editorial');
 
 
 --
@@ -436,7 +453,7 @@ INSERT INTO public.identities (id, user_id, created, updated, type, identifier,
 -- Data for Name: manuscripts; Type: TABLE DATA; Schema: public; Owner: test
 --
 
-INSERT INTO public.manuscripts (id, created, updated, parent_id, submitter_id, status, decision, authors, suggestions, meta, submission, type) VALUES ('fb2534c6-ecbb-4846-a61d-609dc119e9b0', '2020-07-28 00:41:33.983+02', '2020-07-28 00:42:03.231+02', NULL, '027afa6a-edbc-486e-bb31-71e12f8ea1c5', 'submitted', NULL, NULL, NULL, '{"notes": [{"content": "", "notesType": "fundingAcknowledgement"}, {"content": "", "notesType": "specialInstructions"}], "title": "My URL submission"}', '{"irb": "yes", "name": "Emily Clay", "cover": "This is my cover letter", "links": "https://doi.org/10.6084/m9.figshare.913521.v1, https://github.com/jure/mathtype_to_mathml", "contact": "emily@example.com", "methods": ["Functional MRI", "Optical Imaging"], "datacode": "This is my data and code availability statement", "humanMRI": "3T", "keywords": "some, keywords", "packages": ["SPM", "FSL"], "subjects": "patients", "suggested": "Erica James, Matthew Matretzky", "objectType": "software", "affiliation": "Example University, Egland", "otherMethods": "Erica James, Matthew Matretzk", "humanMRIother": "7T", "otherPackages": "Jupyter, Stencila", "animal_research_approval": "yes"}', 'Manuscript');
+INSERT INTO public.manuscripts (id, created, updated, parent_id, submitter_id, status, decision, authors, suggestions, meta, submission, type) VALUES ('93735475-08f6-436b-9db3-fe2364b9dbb2', '2020-08-12 16:16:44.9+02', '2020-08-12 16:17:12.499+02', NULL, '027afa6a-edbc-486e-bb31-71e12f8ea1c5', 'submitted', NULL, NULL, NULL, '{"notes": [{"content": "", "notesType": "fundingAcknowledgement"}, {"content": "", "notesType": "specialInstructions"}], "title": "My URL submission"}', '{"irb": "yes", "name": "Emily Clay", "cover": "This is my cover letter", "links": "https://doi.org/10.6084/m9.figshare.913521.v1, https://github.com/jure/mathtype_to_mathml", "ethics": "This is my ethics statement", "contact": "emily@example.com", "methods": ["Functional MRI", "Optical Imaging"], "datacode": "This is my data and code availability statement", "humanMRI": "3T", "keywords": "some, keyword", "packages": ["SPM", "FSL"], "subjects": "patients", "suggested": "Erica James, Matthew Matretzky", "objectType": "software", "affiliation": "Example University, Egland", "otherMethods": "Erica James, Matthew Matretzky", "humanMRIother": "7T", "otherPackages": "Jupyter, Stencila", "animal_research_approval": "yes"}', 'Manuscript');
 
 
 --
@@ -449,24 +466,27 @@ INSERT INTO public.manuscripts (id, created, updated, parent_id, submitter_id, s
 -- Data for Name: migrations; Type: TABLE DATA; Schema: public; Owner: test
 --
 
-INSERT INTO public.migrations (id, run_at) VALUES ('1524494862-entities.sql', '2020-07-21 16:01:00.856209+02');
-INSERT INTO public.migrations (id, run_at) VALUES ('1537450834-files.sql', '2020-07-21 16:01:00.866487+02');
-INSERT INTO public.migrations (id, run_at) VALUES ('1537450834-review.sql', '2020-07-21 16:01:00.876573+02');
-INSERT INTO public.migrations (id, run_at) VALUES ('1542276313-initial-user-migration.sql', '2020-07-21 16:01:00.887088+02');
-INSERT INTO public.migrations (id, run_at) VALUES ('1542801241-initial-team-migration.sql', '2020-07-21 16:01:00.898301+02');
-INSERT INTO public.migrations (id, run_at) VALUES ('1547596236-initial-team-member-migration.js', '2020-07-21 16:01:00.954317+02');
-INSERT INTO public.migrations (id, run_at) VALUES ('1548205275-move-members.js', '2020-07-21 16:01:01.009825+02');
-INSERT INTO public.migrations (id, run_at) VALUES ('1548205276-simplify-object.js', '2020-07-21 16:01:01.025532+02');
-INSERT INTO public.migrations (id, run_at) VALUES ('1548328420-add-alias-migration.js', '2020-07-21 16:01:01.068783+02');
-INSERT INTO public.migrations (id, run_at) VALUES ('1560771823-add-unique-constraints-to-users.sql', '2020-07-21 16:01:01.078878+02');
-INSERT INTO public.migrations (id, run_at) VALUES ('1580908536-add-identities.sql', '2020-07-21 16:01:01.092107+02');
-INSERT INTO public.migrations (id, run_at) VALUES ('1581371297-migrate-users-to-identities.js', '2020-07-21 16:01:01.107057+02');
-INSERT INTO public.migrations (id, run_at) VALUES ('1581450834-manuscript.sql', '2020-07-21 16:01:01.118725+02');
-INSERT INTO public.migrations (id, run_at) VALUES ('1582930582-drop-fragments-and-collections.js', '2020-07-21 16:01:01.12668+02');
-INSERT INTO public.migrations (id, run_at) VALUES ('1585323910-add-channels.sql', '2020-07-21 16:01:01.14497+02');
-INSERT INTO public.migrations (id, run_at) VALUES ('1585344885-add-messages.sql', '2020-07-21 16:01:01.15657+02');
-INSERT INTO public.migrations (id, run_at) VALUES ('1585513226-add-profile-pic.sql', '2020-07-21 16:01:01.162443+02');
-INSERT INTO public.migrations (id, run_at) VALUES ('1592915682-change-identities-constraint.sql', '2020-07-21 16:01:01.17359+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1524494862-entities.sql', '2020-08-12 14:59:10.439327+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1542276313-initial-user-migration.sql', '2020-08-12 14:59:10.452184+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1560771823-add-unique-constraints-to-users.sql', '2020-08-12 14:59:10.463129+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1580908536-add-identities.sql', '2020-08-12 14:59:10.477935+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1581371297-migrate-users-to-identities.js', '2020-08-12 14:59:10.499722+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1581450834-manuscript.sql', '2020-08-12 14:59:10.509542+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1582930582-drop-fragments-and-collections.js', '2020-08-12 14:59:10.519573+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1585323910-add-channels.sql', '2020-08-12 14:59:10.533012+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1585344885-add-messages.sql', '2020-08-12 14:59:10.544214+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1585513226-add-profile-pic.sql', '2020-08-12 14:59:10.549847+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1592915682-change-identities-constraint.sql', '2020-08-12 14:59:10.558714+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1596830547-review.sql', '2020-08-12 14:59:10.571826+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1596830548-add-review-comments.sql', '2020-08-12 14:59:10.583466+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1596830548-initial-team-migration.sql', '2020-08-12 14:59:10.611618+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1596838897-files.sql', '2020-08-12 14:59:10.627188+02');
+
+
+--
+-- Data for Name: review_comments; Type: TABLE DATA; Schema: public; Owner: test
+--
+
 
 
 --
@@ -479,20 +499,20 @@ INSERT INTO public.migrations (id, run_at) VALUES ('1592915682-change-identities
 -- Data for Name: team_members; Type: TABLE DATA; Schema: public; Owner: test
 --
 
-INSERT INTO public.team_members (id, created, updated, status, team_id, user_id, alias_id) VALUES ('af28eb3b-495e-485d-879d-4d609e146dc6', '2020-07-28 00:41:34.024+02', '2020-07-28 00:41:34.024+02', NULL, '0ecdfc46-2400-4818-8623-ee29ad2102cf', '027afa6a-edbc-486e-bb31-71e12f8ea1c5', NULL);
-INSERT INTO public.team_members (id, created, updated, status, team_id, user_id, alias_id) VALUES ('39066380-96b2-408e-8329-4ff3833f06be', '2020-07-28 00:42:07.541+02', '2020-07-28 00:42:07.541+02', NULL, '6eb1044b-1d8a-4d07-a84d-a167f152a5bf', '1d599f2c-d293-4d5e-b6c1-ba34e81e3fc8', NULL);
-INSERT INTO public.team_members (id, created, updated, status, team_id, user_id, alias_id) VALUES ('9927026f-4ffa-4805-bc00-cb9b097b7df4', '2020-07-28 00:45:13.354+02', '2020-07-28 00:45:13.354+02', 'invited', 'b107739f-9c14-4f89-9303-229dbfbd2140', '40e3d054-9ac8-4c0f-84ed-e3c6307662cd', NULL);
-INSERT INTO public.team_members (id, created, updated, status, team_id, user_id, alias_id) VALUES ('e69ca277-c295-44aa-a657-af0c7437840e', '2020-07-28 00:45:14.037+02', '2020-07-28 00:45:14.037+02', 'invited', 'b107739f-9c14-4f89-9303-229dbfbd2140', '0da0bbec-9261-4706-b990-0c10aa3cc6b4', NULL);
-INSERT INTO public.team_members (id, created, updated, status, team_id, user_id, alias_id) VALUES ('2e64054b-6a0a-4768-9b37-8638b618141e', '2020-07-28 00:45:14.852+02', '2020-07-28 00:45:14.852+02', 'invited', 'b107739f-9c14-4f89-9303-229dbfbd2140', '85e1300e-003c-4e96-987b-23812f902477', NULL);
+INSERT INTO public.team_members (id, created, updated, status, team_id, user_id, alias_id) VALUES ('6505126d-2ecd-498b-a27d-18eafbdbc8a6', '2020-08-12 16:16:44.923+02', '2020-08-12 16:16:44.923+02', NULL, 'c31e3116-6176-45b5-b52c-6f7cbfc86007', '027afa6a-edbc-486e-bb31-71e12f8ea1c5', NULL);
+INSERT INTO public.team_members (id, created, updated, status, team_id, user_id, alias_id) VALUES ('031ae180-e94e-458d-86b7-f2dc1d456e2e', '2020-08-12 16:17:14.795+02', '2020-08-12 16:17:14.795+02', NULL, 'bf800912-56c4-44eb-b425-64e51a9824fe', '1d599f2c-d293-4d5e-b6c1-ba34e81e3fc8', NULL);
+INSERT INTO public.team_members (id, created, updated, status, team_id, user_id, alias_id) VALUES ('c4ac4fc0-3fae-43b0-89ee-bf7f8fd9885f', '2020-08-12 16:17:43.262+02', '2020-08-12 16:17:43.262+02', 'invited', '0719d132-bb6c-49d9-9122-7911a48cfd60', '40e3d054-9ac8-4c0f-84ed-e3c6307662cd', NULL);
+INSERT INTO public.team_members (id, created, updated, status, team_id, user_id, alias_id) VALUES ('69e896c6-0fdb-421d-a638-1ef7670c03c9', '2020-08-12 16:17:43.884+02', '2020-08-12 16:17:43.884+02', 'invited', '0719d132-bb6c-49d9-9122-7911a48cfd60', '0da0bbec-9261-4706-b990-0c10aa3cc6b4', NULL);
+INSERT INTO public.team_members (id, created, updated, status, team_id, user_id, alias_id) VALUES ('12c33ef5-4fc3-4d48-8309-a90c0461113c', '2020-08-12 16:17:44.547+02', '2020-08-12 16:17:44.547+02', 'invited', '0719d132-bb6c-49d9-9122-7911a48cfd60', '85e1300e-003c-4e96-987b-23812f902477', NULL);
 
 
 --
 -- Data for Name: teams; Type: TABLE DATA; Schema: public; Owner: test
 --
 
-INSERT INTO public.teams (id, created, updated, name, role, owners, global, type, object_id, object_type) VALUES ('0ecdfc46-2400-4818-8623-ee29ad2102cf', '2020-07-28 00:41:34.01+02', '2020-07-28 00:41:34.01+02', 'Author', 'author', NULL, NULL, 'team', 'fb2534c6-ecbb-4846-a61d-609dc119e9b0', 'Manuscript');
-INSERT INTO public.teams (id, created, updated, name, role, owners, global, type, object_id, object_type) VALUES ('6eb1044b-1d8a-4d07-a84d-a167f152a5bf', '2020-07-28 00:42:07.533+02', '2020-07-28 00:42:07.533+02', 'Senior Editor', 'seniorEditor', NULL, NULL, 'team', 'fb2534c6-ecbb-4846-a61d-609dc119e9b0', 'Manuscript');
-INSERT INTO public.teams (id, created, updated, name, role, owners, global, type, object_id, object_type) VALUES ('b107739f-9c14-4f89-9303-229dbfbd2140', '2020-07-28 00:45:13.348+02', '2020-07-28 00:45:13.348+02', 'Reviewers', 'reviewer', NULL, NULL, 'team', 'fb2534c6-ecbb-4846-a61d-609dc119e9b0', 'Manuscript');
+INSERT INTO public.teams (id, created, updated, name, role, members, owners, global, type, manuscript_id) VALUES ('c31e3116-6176-45b5-b52c-6f7cbfc86007', '2020-08-12 16:16:44.916+02', '2020-08-12 16:16:44.916+02', 'Author', 'author', NULL, NULL, NULL, 'team', '93735475-08f6-436b-9db3-fe2364b9dbb2');
+INSERT INTO public.teams (id, created, updated, name, role, members, owners, global, type, manuscript_id) VALUES ('bf800912-56c4-44eb-b425-64e51a9824fe', '2020-08-12 16:17:14.789+02', '2020-08-12 16:17:14.789+02', 'Senior Editor', 'seniorEditor', NULL, NULL, NULL, 'team', '93735475-08f6-436b-9db3-fe2364b9dbb2');
+INSERT INTO public.teams (id, created, updated, name, role, members, owners, global, type, manuscript_id) VALUES ('0719d132-bb6c-49d9-9122-7911a48cfd60', '2020-08-12 16:17:43.258+02', '2020-08-12 16:17:43.258+02', 'Reviewers', 'reviewer', NULL, NULL, NULL, 'team', '93735475-08f6-436b-9db3-fe2364b9dbb2');
 
 
 --
@@ -503,9 +523,9 @@ INSERT INTO public.users (id, created, updated, admin, email, username, password
 INSERT INTO public.users (id, created, updated, admin, email, username, password_hash, teams, password_reset_token, password_reset_timestamp, type, profile_picture, online) VALUES ('40e3d054-9ac8-4c0f-84ed-e3c6307662cd', '2020-07-21 16:36:24.973+02', '2020-07-24 16:43:43.943+02', NULL, NULL, '0000000159567341', NULL, NULL, NULL, NULL, 'user', '/static/profiles/testuser4.jpg', true);
 INSERT INTO public.users (id, created, updated, admin, email, username, password_hash, teams, password_reset_token, password_reset_timestamp, type, profile_picture, online) VALUES ('231717dd-ba09-43d4-ac98-9d5542b27a0c', '2020-07-22 14:18:36.597+02', '2020-07-24 16:43:54.939+02', NULL, NULL, '000000032536230X', NULL, NULL, NULL, NULL, 'user', '/static/profiles/testuser5.jpg', false);
 INSERT INTO public.users (id, created, updated, admin, email, username, password_hash, teams, password_reset_token, password_reset_timestamp, type, profile_picture, online) VALUES ('0da0bbec-9261-4706-b990-0c10aa3cc6b4', '2020-07-21 16:35:06.125+02', '2020-07-24 16:44:59.306+02', NULL, NULL, '0000000276459921', NULL, NULL, NULL, NULL, 'user', '/static/profiles/testuser7.jpg', true);
-INSERT INTO public.users (id, created, updated, admin, email, username, password_hash, teams, password_reset_token, password_reset_timestamp, type, profile_picture, online) VALUES ('027afa6a-edbc-486e-bb31-71e12f8ea1c5', '2020-07-21 16:17:24.734+02', '2020-07-28 00:42:05.08+02', NULL, NULL, '0000000205642016', NULL, NULL, NULL, NULL, 'user', '/static/profiles/testuser2.jpg', false);
-INSERT INTO public.users (id, created, updated, admin, email, username, password_hash, teams, password_reset_token, password_reset_timestamp, type, profile_picture, online) VALUES ('3802b0e7-aadc-45de-9cf9-918fede99b97', '2020-07-21 16:30:45.719+02', '2020-07-28 00:42:07.665+02', true, NULL, '0000000256415729', NULL, NULL, NULL, NULL, 'user', '/static/profiles/testuser6.jpg', false);
-INSERT INTO public.users (id, created, updated, admin, email, username, password_hash, teams, password_reset_token, password_reset_timestamp, type, profile_picture, online) VALUES ('1d599f2c-d293-4d5e-b6c1-ba34e81e3fc8', '2020-07-24 15:21:54.59+02', '2020-07-28 00:45:11.921+02', NULL, NULL, '0000000318382441', NULL, NULL, NULL, NULL, 'user', '/static/profiles/testuser3.jpg', true);
+INSERT INTO public.users (id, created, updated, admin, email, username, password_hash, teams, password_reset_token, password_reset_timestamp, type, profile_picture, online) VALUES ('027afa6a-edbc-486e-bb31-71e12f8ea1c5', '2020-07-21 16:17:24.734+02', '2020-08-12 16:17:13.598+02', NULL, NULL, '0000000205642016', NULL, NULL, NULL, NULL, 'user', '/static/profiles/testuser2.jpg', false);
+INSERT INTO public.users (id, created, updated, admin, email, username, password_hash, teams, password_reset_token, password_reset_timestamp, type, profile_picture, online) VALUES ('3802b0e7-aadc-45de-9cf9-918fede99b97', '2020-07-21 16:30:45.719+02', '2020-08-12 16:17:14.868+02', true, NULL, '0000000256415729', NULL, NULL, NULL, NULL, 'user', '/static/profiles/testuser6.jpg', false);
+INSERT INTO public.users (id, created, updated, admin, email, username, password_hash, teams, password_reset_token, password_reset_timestamp, type, profile_picture, online) VALUES ('1d599f2c-d293-4d5e-b6c1-ba34e81e3fc8', '2020-07-24 15:21:54.59+02', '2020-08-12 16:17:41.916+02', NULL, NULL, '0000000318382441', NULL, NULL, NULL, NULL, 'user', '/static/profiles/testuser3.jpg', true);
 
 
 --
@@ -596,6 +616,14 @@ ALTER TABLE ONLY public.migrations
     ADD CONSTRAINT migrations_pkey PRIMARY KEY (id);
 
 
+--
+-- Name: review_comments review_comments_pkey; Type: CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.review_comments
+    ADD CONSTRAINT review_comments_pkey PRIMARY KEY (id);
+
+
 --
 -- Name: reviews reviews_pkey; Type: CONSTRAINT; Schema: public; Owner: test
 --
@@ -701,17 +729,17 @@ CREATE UNIQUE INDEX is_default_idx ON public.identities USING btree (is_default,
 
 
 --
--- Name: team_members_team_id_user_id_index; Type: INDEX; Schema: public; Owner: test
+-- Name: team_members_team_id_user_id_idx; Type: INDEX; Schema: public; Owner: test
 --
 
-CREATE INDEX team_members_team_id_user_id_index ON public.team_members USING btree (team_id, user_id);
+CREATE INDEX team_members_team_id_user_id_idx ON public.team_members USING btree (team_id, user_id);
 
 
 --
--- Name: teams_object_id_object_type_index; Type: INDEX; Schema: public; Owner: test
+-- Name: teams_manuscript_id_idx; Type: INDEX; Schema: public; Owner: test
 --
 
-CREATE INDEX teams_object_id_object_type_index ON public.teams USING btree (object_id, object_type);
+CREATE INDEX teams_manuscript_id_idx ON public.teams USING btree (manuscript_id);
 
 
 --
@@ -739,11 +767,19 @@ ALTER TABLE ONLY public.channels
 
 
 --
--- Name: channels channels_team_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
+-- Name: files files_manuscript_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
 --
 
-ALTER TABLE ONLY public.channels
-    ADD CONSTRAINT channels_team_id_fkey FOREIGN KEY (team_id) REFERENCES public.teams(id);
+ALTER TABLE ONLY public.files
+    ADD CONSTRAINT files_manuscript_id_fkey FOREIGN KEY (manuscript_id) REFERENCES public.manuscripts(id) ON DELETE CASCADE;
+
+
+--
+-- Name: files files_review_comment_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.files
+    ADD CONSTRAINT files_review_comment_id_fkey FOREIGN KEY (review_comment_id) REFERENCES public.review_comments(id) ON DELETE CASCADE;
 
 
 --
@@ -770,6 +806,30 @@ ALTER TABLE ONLY public.messages
     ADD CONSTRAINT messages_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;
 
 
+--
+-- Name: review_comments review_comments_review_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.review_comments
+    ADD CONSTRAINT review_comments_review_id_fkey FOREIGN KEY (review_id) REFERENCES public.reviews(id) ON DELETE CASCADE;
+
+
+--
+-- Name: review_comments review_comments_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.review_comments
+    ADD CONSTRAINT review_comments_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE SET NULL;
+
+
+--
+-- Name: reviews reviews_manuscript_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.reviews
+    ADD CONSTRAINT reviews_manuscript_id_fkey FOREIGN KEY (manuscript_id) REFERENCES public.manuscripts(id) ON DELETE CASCADE;
+
+
 --
 -- Name: identities sidentities_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
 --
@@ -779,27 +839,35 @@ ALTER TABLE ONLY public.identities
 
 
 --
--- Name: team_members team_members_alias_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: test
+-- Name: team_members team_members_alias_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
 --
 
 ALTER TABLE ONLY public.team_members
-    ADD CONSTRAINT team_members_alias_id_foreign FOREIGN KEY (alias_id) REFERENCES public.aliases(id);
+    ADD CONSTRAINT team_members_alias_id_fkey FOREIGN KEY (alias_id) REFERENCES public.aliases(id);
 
 
 --
--- Name: team_members team_members_team_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: test
+-- Name: team_members team_members_team_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
 --
 
 ALTER TABLE ONLY public.team_members
-    ADD CONSTRAINT team_members_team_id_foreign FOREIGN KEY (team_id) REFERENCES public.teams(id) ON UPDATE CASCADE ON DELETE CASCADE;
+    ADD CONSTRAINT team_members_team_id_fkey FOREIGN KEY (team_id) REFERENCES public.teams(id) ON UPDATE CASCADE ON DELETE CASCADE;
 
 
 --
--- Name: team_members team_members_user_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: test
+-- Name: team_members team_members_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
 --
 
 ALTER TABLE ONLY public.team_members
-    ADD CONSTRAINT team_members_user_id_foreign FOREIGN KEY (user_id) REFERENCES public.users(id) ON UPDATE CASCADE ON DELETE CASCADE;
+    ADD CONSTRAINT team_members_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;
+
+
+--
+-- Name: teams teams_manuscript_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.teams
+    ADD CONSTRAINT teams_manuscript_id_fkey FOREIGN KEY (manuscript_id) REFERENCES public.manuscripts(id) ON DELETE CASCADE;
 
 
 --
diff --git a/cypress/dumps/senior_editor_assigned.sql b/cypress/dumps/senior_editor_assigned.sql
index 1d2b7ce072f2500e08b12e58db79182c09bfbebf..31e0f3e7492017a2e62177a8d3ce55f58638e59f 100644
--- a/cypress/dumps/senior_editor_assigned.sql
+++ b/cypress/dumps/senior_editor_assigned.sql
@@ -145,9 +145,9 @@ CREATE TABLE public.aliases (
     id uuid NOT NULL,
     created timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
     updated timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
-    name character varying(255),
-    email character varying(255),
-    aff character varying(255)
+    name text,
+    email text,
+    aff text
 );
 
 
@@ -175,7 +175,6 @@ ALTER TABLE public.channel_members OWNER TO test;
 CREATE TABLE public.channels (
     id uuid NOT NULL,
     manuscript_id uuid,
-    team_id uuid,
     created timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
     updated timestamp with time zone,
     topic text,
@@ -205,15 +204,16 @@ CREATE TABLE public.files (
     id uuid NOT NULL,
     created timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
     updated timestamp with time zone,
-    object text,
-    object_id uuid,
     label text,
     file_type text,
     filename text,
     url text,
     mime_type text,
     size integer,
-    type text NOT NULL
+    type text NOT NULL,
+    manuscript_id uuid,
+    review_comment_id uuid,
+    CONSTRAINT exactly_one_file_owner CHECK (((((manuscript_id IS NOT NULL))::integer + ((review_comment_id IS NOT NULL))::integer) = 1))
 );
 
 
@@ -289,6 +289,24 @@ CREATE TABLE public.migrations (
 
 ALTER TABLE public.migrations OWNER TO test;
 
+--
+-- Name: review_comments; Type: TABLE; Schema: public; Owner: test
+--
+
+CREATE TABLE public.review_comments (
+    id uuid NOT NULL,
+    created timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
+    updated timestamp with time zone,
+    review_id uuid,
+    user_id uuid,
+    content text,
+    comment_type text,
+    type text
+);
+
+
+ALTER TABLE public.review_comments OWNER TO test;
+
 --
 -- Name: reviews; Type: TABLE; Schema: public; Owner: test
 --
@@ -299,7 +317,6 @@ CREATE TABLE public.reviews (
     updated timestamp with time zone,
     recommendation text,
     is_decision boolean DEFAULT false,
-    comments jsonb,
     user_id uuid,
     manuscript_id uuid,
     type text NOT NULL
@@ -335,11 +352,11 @@ CREATE TABLE public.teams (
     updated timestamp with time zone,
     name text,
     role text NOT NULL,
+    members jsonb,
     owners jsonb,
     global boolean,
     type text NOT NULL,
-    object_id uuid,
-    object_type character varying(255)
+    manuscript_id uuid
 );
 
 
@@ -403,8 +420,8 @@ INSERT INTO pgboss.version (version) VALUES ('11');
 -- Data for Name: channels; Type: TABLE DATA; Schema: public; Owner: test
 --
 
-INSERT INTO public.channels (id, manuscript_id, team_id, created, updated, topic, type) VALUES ('466f49f5-f4ca-46ca-82ca-693212ca9ba2', 'fb2534c6-ecbb-4846-a61d-609dc119e9b0', NULL, '2020-07-28 00:41:34.01+02', '2020-07-28 00:41:34.01+02', 'Editorial discussion', 'editorial');
-INSERT INTO public.channels (id, manuscript_id, team_id, created, updated, topic, type) VALUES ('d24525e7-f36e-4f5e-b0cb-e05ef0ea9062', 'fb2534c6-ecbb-4846-a61d-609dc119e9b0', NULL, '2020-07-28 00:41:34.011+02', '2020-07-28 00:41:34.011+02', 'Manuscript discussion', 'all');
+INSERT INTO public.channels (id, manuscript_id, created, updated, topic, type) VALUES ('8be9c91e-10f8-42c1-9d98-429ffb7164a0', 'a696348d-b226-4703-aad1-ff64ddf30d17', '2020-08-12 16:35:01.376+02', '2020-08-12 16:35:01.376+02', 'Manuscript discussion', 'all');
+INSERT INTO public.channels (id, manuscript_id, created, updated, topic, type) VALUES ('89848abe-a992-45e4-ace7-36e9c64c4162', 'a696348d-b226-4703-aad1-ff64ddf30d17', '2020-08-12 16:35:01.376+02', '2020-08-12 16:35:01.376+02', 'Editorial discussion', 'editorial');
 
 
 --
@@ -417,6 +434,7 @@ INSERT INTO public.channels (id, manuscript_id, team_id, created, updated, topic
 -- Data for Name: files; Type: TABLE DATA; Schema: public; Owner: test
 --
 
+INSERT INTO public.files (id, created, updated, label, file_type, filename, url, mime_type, size, type, manuscript_id, review_comment_id) VALUES ('66070eaf-6ee1-475f-98ba-774843f1238e', '2020-08-12 16:35:19.664+02', '2020-08-12 16:35:19.664+02', NULL, 'supplementary', 'test-pdf.pdf', '/static/uploads/bfc74d5e3c0b8bf97cd5a522bfdb3c87.pdf', 'application/pdf', 142400, 'file', 'a696348d-b226-4703-aad1-ff64ddf30d17', NULL);
 
 
 --
@@ -436,7 +454,7 @@ INSERT INTO public.identities (id, user_id, created, updated, type, identifier,
 -- Data for Name: manuscripts; Type: TABLE DATA; Schema: public; Owner: test
 --
 
-INSERT INTO public.manuscripts (id, created, updated, parent_id, submitter_id, status, decision, authors, suggestions, meta, submission, type) VALUES ('fb2534c6-ecbb-4846-a61d-609dc119e9b0', '2020-07-28 00:41:33.983+02', '2020-07-28 00:42:03.231+02', NULL, '027afa6a-edbc-486e-bb31-71e12f8ea1c5', 'submitted', NULL, NULL, NULL, '{"notes": [{"content": "", "notesType": "fundingAcknowledgement"}, {"content": "", "notesType": "specialInstructions"}], "title": "My URL submission"}', '{"irb": "yes", "name": "Emily Clay", "cover": "This is my cover letter", "links": "https://doi.org/10.6084/m9.figshare.913521.v1, https://github.com/jure/mathtype_to_mathml", "contact": "emily@example.com", "methods": ["Functional MRI", "Optical Imaging"], "datacode": "This is my data and code availability statement", "humanMRI": "3T", "keywords": "some, keywords", "packages": ["SPM", "FSL"], "subjects": "patients", "suggested": "Erica James, Matthew Matretzky", "objectType": "software", "affiliation": "Example University, Egland", "otherMethods": "Erica James, Matthew Matretzk", "humanMRIother": "7T", "otherPackages": "Jupyter, Stencila", "animal_research_approval": "yes"}', 'Manuscript');
+INSERT INTO public.manuscripts (id, created, updated, parent_id, submitter_id, status, decision, authors, suggestions, meta, submission, type) VALUES ('a696348d-b226-4703-aad1-ff64ddf30d17', '2020-08-12 16:35:01.371+02', '2020-08-12 16:35:28.918+02', NULL, '027afa6a-edbc-486e-bb31-71e12f8ea1c5', 'submitted', NULL, NULL, NULL, '{"notes": [{"content": "", "notesType": "fundingAcknowledgement"}, {"content": "", "notesType": "specialInstructions"}], "title": "My URL submission"}', '{"irb": "yes", "name": "Emily Clay", "cover": "This is my cover letter", "links": "https://doi.org/10.6084/m9.figshare.913521.v1, https://github.com/jure/mathtype_to_mathml", "ethics": "This is my ethics statement", "contact": "emily@example.com", "methods": ["Functional MRI", "Optical Imaging"], "datacode": "This is my data and code availability statement", "humanMRI": "3T", "keywords": "some, keywords", "packages": ["SPM", "FSL"], "subjects": "patients", "suggested": "Erica James, Matthew Matretzky", "objectType": "software", "affiliation": "Example University, Egland", "otherMethods": "Erica James, Matthew Matretzky", "humanMRIother": "7T", "otherPackages": "Jupyter, Stencila", "animal_research_approval": "yes"}', 'Manuscript');
 
 
 --
@@ -449,24 +467,27 @@ INSERT INTO public.manuscripts (id, created, updated, parent_id, submitter_id, s
 -- Data for Name: migrations; Type: TABLE DATA; Schema: public; Owner: test
 --
 
-INSERT INTO public.migrations (id, run_at) VALUES ('1524494862-entities.sql', '2020-07-21 16:01:00.856209+02');
-INSERT INTO public.migrations (id, run_at) VALUES ('1537450834-files.sql', '2020-07-21 16:01:00.866487+02');
-INSERT INTO public.migrations (id, run_at) VALUES ('1537450834-review.sql', '2020-07-21 16:01:00.876573+02');
-INSERT INTO public.migrations (id, run_at) VALUES ('1542276313-initial-user-migration.sql', '2020-07-21 16:01:00.887088+02');
-INSERT INTO public.migrations (id, run_at) VALUES ('1542801241-initial-team-migration.sql', '2020-07-21 16:01:00.898301+02');
-INSERT INTO public.migrations (id, run_at) VALUES ('1547596236-initial-team-member-migration.js', '2020-07-21 16:01:00.954317+02');
-INSERT INTO public.migrations (id, run_at) VALUES ('1548205275-move-members.js', '2020-07-21 16:01:01.009825+02');
-INSERT INTO public.migrations (id, run_at) VALUES ('1548205276-simplify-object.js', '2020-07-21 16:01:01.025532+02');
-INSERT INTO public.migrations (id, run_at) VALUES ('1548328420-add-alias-migration.js', '2020-07-21 16:01:01.068783+02');
-INSERT INTO public.migrations (id, run_at) VALUES ('1560771823-add-unique-constraints-to-users.sql', '2020-07-21 16:01:01.078878+02');
-INSERT INTO public.migrations (id, run_at) VALUES ('1580908536-add-identities.sql', '2020-07-21 16:01:01.092107+02');
-INSERT INTO public.migrations (id, run_at) VALUES ('1581371297-migrate-users-to-identities.js', '2020-07-21 16:01:01.107057+02');
-INSERT INTO public.migrations (id, run_at) VALUES ('1581450834-manuscript.sql', '2020-07-21 16:01:01.118725+02');
-INSERT INTO public.migrations (id, run_at) VALUES ('1582930582-drop-fragments-and-collections.js', '2020-07-21 16:01:01.12668+02');
-INSERT INTO public.migrations (id, run_at) VALUES ('1585323910-add-channels.sql', '2020-07-21 16:01:01.14497+02');
-INSERT INTO public.migrations (id, run_at) VALUES ('1585344885-add-messages.sql', '2020-07-21 16:01:01.15657+02');
-INSERT INTO public.migrations (id, run_at) VALUES ('1585513226-add-profile-pic.sql', '2020-07-21 16:01:01.162443+02');
-INSERT INTO public.migrations (id, run_at) VALUES ('1592915682-change-identities-constraint.sql', '2020-07-21 16:01:01.17359+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1524494862-entities.sql', '2020-08-12 14:59:10.439327+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1542276313-initial-user-migration.sql', '2020-08-12 14:59:10.452184+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1560771823-add-unique-constraints-to-users.sql', '2020-08-12 14:59:10.463129+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1580908536-add-identities.sql', '2020-08-12 14:59:10.477935+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1581371297-migrate-users-to-identities.js', '2020-08-12 14:59:10.499722+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1581450834-manuscript.sql', '2020-08-12 14:59:10.509542+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1582930582-drop-fragments-and-collections.js', '2020-08-12 14:59:10.519573+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1585323910-add-channels.sql', '2020-08-12 14:59:10.533012+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1585344885-add-messages.sql', '2020-08-12 14:59:10.544214+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1585513226-add-profile-pic.sql', '2020-08-12 14:59:10.549847+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1592915682-change-identities-constraint.sql', '2020-08-12 14:59:10.558714+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1596830547-review.sql', '2020-08-12 14:59:10.571826+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1596830548-add-review-comments.sql', '2020-08-12 14:59:10.583466+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1596830548-initial-team-migration.sql', '2020-08-12 14:59:10.611618+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1596838897-files.sql', '2020-08-12 14:59:10.627188+02');
+
+
+--
+-- Data for Name: review_comments; Type: TABLE DATA; Schema: public; Owner: test
+--
+
 
 
 --
@@ -479,16 +500,16 @@ INSERT INTO public.migrations (id, run_at) VALUES ('1592915682-change-identities
 -- Data for Name: team_members; Type: TABLE DATA; Schema: public; Owner: test
 --
 
-INSERT INTO public.team_members (id, created, updated, status, team_id, user_id, alias_id) VALUES ('af28eb3b-495e-485d-879d-4d609e146dc6', '2020-07-28 00:41:34.024+02', '2020-07-28 00:41:34.024+02', NULL, '0ecdfc46-2400-4818-8623-ee29ad2102cf', '027afa6a-edbc-486e-bb31-71e12f8ea1c5', NULL);
-INSERT INTO public.team_members (id, created, updated, status, team_id, user_id, alias_id) VALUES ('39066380-96b2-408e-8329-4ff3833f06be', '2020-07-28 00:42:07.541+02', '2020-07-28 00:42:07.541+02', NULL, '6eb1044b-1d8a-4d07-a84d-a167f152a5bf', '1d599f2c-d293-4d5e-b6c1-ba34e81e3fc8', NULL);
+INSERT INTO public.team_members (id, created, updated, status, team_id, user_id, alias_id) VALUES ('d80380a6-c741-4e3c-9933-126cf368c43b', '2020-08-12 16:35:01.381+02', '2020-08-12 16:35:01.381+02', NULL, 'd5dc5913-db33-4576-a129-3c90321464f6', '027afa6a-edbc-486e-bb31-71e12f8ea1c5', NULL);
+INSERT INTO public.team_members (id, created, updated, status, team_id, user_id, alias_id) VALUES ('a58d3e82-54b7-4946-8ff8-116d84cbc065', '2020-08-12 16:36:01.535+02', '2020-08-12 16:36:01.535+02', NULL, 'd7cd46ee-8d79-47c1-9c06-da5dfd464075', '1d599f2c-d293-4d5e-b6c1-ba34e81e3fc8', NULL);
 
 
 --
 -- Data for Name: teams; Type: TABLE DATA; Schema: public; Owner: test
 --
 
-INSERT INTO public.teams (id, created, updated, name, role, owners, global, type, object_id, object_type) VALUES ('0ecdfc46-2400-4818-8623-ee29ad2102cf', '2020-07-28 00:41:34.01+02', '2020-07-28 00:41:34.01+02', 'Author', 'author', NULL, NULL, 'team', 'fb2534c6-ecbb-4846-a61d-609dc119e9b0', 'Manuscript');
-INSERT INTO public.teams (id, created, updated, name, role, owners, global, type, object_id, object_type) VALUES ('6eb1044b-1d8a-4d07-a84d-a167f152a5bf', '2020-07-28 00:42:07.533+02', '2020-07-28 00:42:07.533+02', 'Senior Editor', 'seniorEditor', NULL, NULL, 'team', 'fb2534c6-ecbb-4846-a61d-609dc119e9b0', 'Manuscript');
+INSERT INTO public.teams (id, created, updated, name, role, members, owners, global, type, manuscript_id) VALUES ('d5dc5913-db33-4576-a129-3c90321464f6', '2020-08-12 16:35:01.376+02', '2020-08-12 16:35:01.376+02', 'Author', 'author', NULL, NULL, NULL, 'team', 'a696348d-b226-4703-aad1-ff64ddf30d17');
+INSERT INTO public.teams (id, created, updated, name, role, members, owners, global, type, manuscript_id) VALUES ('d7cd46ee-8d79-47c1-9c06-da5dfd464075', '2020-08-12 16:36:01.513+02', '2020-08-12 16:36:01.513+02', 'Senior Editor', 'seniorEditor', NULL, NULL, NULL, 'team', 'a696348d-b226-4703-aad1-ff64ddf30d17');
 
 
 --
@@ -499,9 +520,9 @@ INSERT INTO public.users (id, created, updated, admin, email, username, password
 INSERT INTO public.users (id, created, updated, admin, email, username, password_hash, teams, password_reset_token, password_reset_timestamp, type, profile_picture, online) VALUES ('40e3d054-9ac8-4c0f-84ed-e3c6307662cd', '2020-07-21 16:36:24.973+02', '2020-07-24 16:43:43.943+02', NULL, NULL, '0000000159567341', NULL, NULL, NULL, NULL, 'user', '/static/profiles/testuser4.jpg', true);
 INSERT INTO public.users (id, created, updated, admin, email, username, password_hash, teams, password_reset_token, password_reset_timestamp, type, profile_picture, online) VALUES ('231717dd-ba09-43d4-ac98-9d5542b27a0c', '2020-07-22 14:18:36.597+02', '2020-07-24 16:43:54.939+02', NULL, NULL, '000000032536230X', NULL, NULL, NULL, NULL, 'user', '/static/profiles/testuser5.jpg', false);
 INSERT INTO public.users (id, created, updated, admin, email, username, password_hash, teams, password_reset_token, password_reset_timestamp, type, profile_picture, online) VALUES ('0da0bbec-9261-4706-b990-0c10aa3cc6b4', '2020-07-21 16:35:06.125+02', '2020-07-24 16:44:59.306+02', NULL, NULL, '0000000276459921', NULL, NULL, NULL, NULL, 'user', '/static/profiles/testuser7.jpg', true);
-INSERT INTO public.users (id, created, updated, admin, email, username, password_hash, teams, password_reset_token, password_reset_timestamp, type, profile_picture, online) VALUES ('027afa6a-edbc-486e-bb31-71e12f8ea1c5', '2020-07-21 16:17:24.734+02', '2020-07-28 00:42:05.08+02', NULL, NULL, '0000000205642016', NULL, NULL, NULL, NULL, 'user', '/static/profiles/testuser2.jpg', false);
-INSERT INTO public.users (id, created, updated, admin, email, username, password_hash, teams, password_reset_token, password_reset_timestamp, type, profile_picture, online) VALUES ('3802b0e7-aadc-45de-9cf9-918fede99b97', '2020-07-21 16:30:45.719+02', '2020-07-28 00:42:07.665+02', true, NULL, '0000000256415729', NULL, NULL, NULL, NULL, 'user', '/static/profiles/testuser6.jpg', false);
-INSERT INTO public.users (id, created, updated, admin, email, username, password_hash, teams, password_reset_token, password_reset_timestamp, type, profile_picture, online) VALUES ('1d599f2c-d293-4d5e-b6c1-ba34e81e3fc8', '2020-07-24 15:21:54.59+02', '2020-07-28 00:42:08.153+02', NULL, NULL, '0000000318382441', NULL, NULL, NULL, NULL, 'user', '/static/profiles/testuser3.jpg', true);
+INSERT INTO public.users (id, created, updated, admin, email, username, password_hash, teams, password_reset_token, password_reset_timestamp, type, profile_picture, online) VALUES ('027afa6a-edbc-486e-bb31-71e12f8ea1c5', '2020-07-21 16:17:24.734+02', '2020-08-12 16:35:01.383+02', NULL, NULL, '0000000205642016', NULL, NULL, NULL, NULL, 'user', '/static/profiles/testuser2.jpg', true);
+INSERT INTO public.users (id, created, updated, admin, email, username, password_hash, teams, password_reset_token, password_reset_timestamp, type, profile_picture, online) VALUES ('3802b0e7-aadc-45de-9cf9-918fede99b97', '2020-07-21 16:30:45.719+02', '2020-08-12 16:36:01.679+02', true, NULL, '0000000256415729', NULL, NULL, NULL, NULL, 'user', '/static/profiles/testuser6.jpg', false);
+INSERT INTO public.users (id, created, updated, admin, email, username, password_hash, teams, password_reset_token, password_reset_timestamp, type, profile_picture, online) VALUES ('1d599f2c-d293-4d5e-b6c1-ba34e81e3fc8', '2020-07-24 15:21:54.59+02', '2020-08-12 16:36:02.11+02', NULL, NULL, '0000000318382441', NULL, NULL, NULL, NULL, 'user', '/static/profiles/testuser3.jpg', true);
 
 
 --
@@ -592,6 +613,14 @@ ALTER TABLE ONLY public.migrations
     ADD CONSTRAINT migrations_pkey PRIMARY KEY (id);
 
 
+--
+-- Name: review_comments review_comments_pkey; Type: CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.review_comments
+    ADD CONSTRAINT review_comments_pkey PRIMARY KEY (id);
+
+
 --
 -- Name: reviews reviews_pkey; Type: CONSTRAINT; Schema: public; Owner: test
 --
@@ -697,17 +726,17 @@ CREATE UNIQUE INDEX is_default_idx ON public.identities USING btree (is_default,
 
 
 --
--- Name: team_members_team_id_user_id_index; Type: INDEX; Schema: public; Owner: test
+-- Name: team_members_team_id_user_id_idx; Type: INDEX; Schema: public; Owner: test
 --
 
-CREATE INDEX team_members_team_id_user_id_index ON public.team_members USING btree (team_id, user_id);
+CREATE INDEX team_members_team_id_user_id_idx ON public.team_members USING btree (team_id, user_id);
 
 
 --
--- Name: teams_object_id_object_type_index; Type: INDEX; Schema: public; Owner: test
+-- Name: teams_manuscript_id_idx; Type: INDEX; Schema: public; Owner: test
 --
 
-CREATE INDEX teams_object_id_object_type_index ON public.teams USING btree (object_id, object_type);
+CREATE INDEX teams_manuscript_id_idx ON public.teams USING btree (manuscript_id);
 
 
 --
@@ -735,11 +764,19 @@ ALTER TABLE ONLY public.channels
 
 
 --
--- Name: channels channels_team_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
+-- Name: files files_manuscript_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
 --
 
-ALTER TABLE ONLY public.channels
-    ADD CONSTRAINT channels_team_id_fkey FOREIGN KEY (team_id) REFERENCES public.teams(id);
+ALTER TABLE ONLY public.files
+    ADD CONSTRAINT files_manuscript_id_fkey FOREIGN KEY (manuscript_id) REFERENCES public.manuscripts(id) ON DELETE CASCADE;
+
+
+--
+-- Name: files files_review_comment_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.files
+    ADD CONSTRAINT files_review_comment_id_fkey FOREIGN KEY (review_comment_id) REFERENCES public.review_comments(id) ON DELETE CASCADE;
 
 
 --
@@ -766,6 +803,30 @@ ALTER TABLE ONLY public.messages
     ADD CONSTRAINT messages_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;
 
 
+--
+-- Name: review_comments review_comments_review_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.review_comments
+    ADD CONSTRAINT review_comments_review_id_fkey FOREIGN KEY (review_id) REFERENCES public.reviews(id) ON DELETE CASCADE;
+
+
+--
+-- Name: review_comments review_comments_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.review_comments
+    ADD CONSTRAINT review_comments_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE SET NULL;
+
+
+--
+-- Name: reviews reviews_manuscript_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.reviews
+    ADD CONSTRAINT reviews_manuscript_id_fkey FOREIGN KEY (manuscript_id) REFERENCES public.manuscripts(id) ON DELETE CASCADE;
+
+
 --
 -- Name: identities sidentities_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
 --
@@ -775,27 +836,35 @@ ALTER TABLE ONLY public.identities
 
 
 --
--- Name: team_members team_members_alias_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: test
+-- Name: team_members team_members_alias_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
 --
 
 ALTER TABLE ONLY public.team_members
-    ADD CONSTRAINT team_members_alias_id_foreign FOREIGN KEY (alias_id) REFERENCES public.aliases(id);
+    ADD CONSTRAINT team_members_alias_id_fkey FOREIGN KEY (alias_id) REFERENCES public.aliases(id);
 
 
 --
--- Name: team_members team_members_team_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: test
+-- Name: team_members team_members_team_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
 --
 
 ALTER TABLE ONLY public.team_members
-    ADD CONSTRAINT team_members_team_id_foreign FOREIGN KEY (team_id) REFERENCES public.teams(id) ON UPDATE CASCADE ON DELETE CASCADE;
+    ADD CONSTRAINT team_members_team_id_fkey FOREIGN KEY (team_id) REFERENCES public.teams(id) ON UPDATE CASCADE ON DELETE CASCADE;
 
 
 --
--- Name: team_members team_members_user_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: test
+-- Name: team_members team_members_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
 --
 
 ALTER TABLE ONLY public.team_members
-    ADD CONSTRAINT team_members_user_id_foreign FOREIGN KEY (user_id) REFERENCES public.users(id) ON UPDATE CASCADE ON DELETE CASCADE;
+    ADD CONSTRAINT team_members_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;
+
+
+--
+-- Name: teams teams_manuscript_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.teams
+    ADD CONSTRAINT teams_manuscript_id_fkey FOREIGN KEY (manuscript_id) REFERENCES public.manuscripts(id) ON DELETE CASCADE;
 
 
 --
diff --git a/cypress/dumps/submission_complete.sql b/cypress/dumps/submission_complete.sql
index b318c1f25ef542335d277f2932a1c39028e6d940..f9966719d506445849d95faa2ceef2eec6ce1069 100644
--- a/cypress/dumps/submission_complete.sql
+++ b/cypress/dumps/submission_complete.sql
@@ -145,9 +145,9 @@ CREATE TABLE public.aliases (
     id uuid NOT NULL,
     created timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
     updated timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
-    name character varying(255),
-    email character varying(255),
-    aff character varying(255)
+    name text,
+    email text,
+    aff text
 );
 
 
@@ -175,7 +175,6 @@ ALTER TABLE public.channel_members OWNER TO test;
 CREATE TABLE public.channels (
     id uuid NOT NULL,
     manuscript_id uuid,
-    team_id uuid,
     created timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
     updated timestamp with time zone,
     topic text,
@@ -205,15 +204,16 @@ CREATE TABLE public.files (
     id uuid NOT NULL,
     created timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
     updated timestamp with time zone,
-    object text,
-    object_id uuid,
     label text,
     file_type text,
     filename text,
     url text,
     mime_type text,
     size integer,
-    type text NOT NULL
+    type text NOT NULL,
+    manuscript_id uuid,
+    review_comment_id uuid,
+    CONSTRAINT exactly_one_file_owner CHECK (((((manuscript_id IS NOT NULL))::integer + ((review_comment_id IS NOT NULL))::integer) = 1))
 );
 
 
@@ -289,6 +289,24 @@ CREATE TABLE public.migrations (
 
 ALTER TABLE public.migrations OWNER TO test;
 
+--
+-- Name: review_comments; Type: TABLE; Schema: public; Owner: test
+--
+
+CREATE TABLE public.review_comments (
+    id uuid NOT NULL,
+    created timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
+    updated timestamp with time zone,
+    review_id uuid,
+    user_id uuid,
+    content text,
+    comment_type text,
+    type text
+);
+
+
+ALTER TABLE public.review_comments OWNER TO test;
+
 --
 -- Name: reviews; Type: TABLE; Schema: public; Owner: test
 --
@@ -299,7 +317,6 @@ CREATE TABLE public.reviews (
     updated timestamp with time zone,
     recommendation text,
     is_decision boolean DEFAULT false,
-    comments jsonb,
     user_id uuid,
     manuscript_id uuid,
     type text NOT NULL
@@ -335,11 +352,11 @@ CREATE TABLE public.teams (
     updated timestamp with time zone,
     name text,
     role text NOT NULL,
+    members jsonb,
     owners jsonb,
     global boolean,
     type text NOT NULL,
-    object_id uuid,
-    object_type character varying(255)
+    manuscript_id uuid
 );
 
 
@@ -403,8 +420,8 @@ INSERT INTO pgboss.version (version) VALUES ('11');
 -- Data for Name: channels; Type: TABLE DATA; Schema: public; Owner: test
 --
 
-INSERT INTO public.channels (id, manuscript_id, team_id, created, updated, topic, type) VALUES ('466f49f5-f4ca-46ca-82ca-693212ca9ba2', 'fb2534c6-ecbb-4846-a61d-609dc119e9b0', NULL, '2020-07-28 00:41:34.01+02', '2020-07-28 00:41:34.01+02', 'Editorial discussion', 'editorial');
-INSERT INTO public.channels (id, manuscript_id, team_id, created, updated, topic, type) VALUES ('d24525e7-f36e-4f5e-b0cb-e05ef0ea9062', 'fb2534c6-ecbb-4846-a61d-609dc119e9b0', NULL, '2020-07-28 00:41:34.011+02', '2020-07-28 00:41:34.011+02', 'Manuscript discussion', 'all');
+INSERT INTO public.channels (id, manuscript_id, created, updated, topic, type) VALUES ('8be9c91e-10f8-42c1-9d98-429ffb7164a0', 'a696348d-b226-4703-aad1-ff64ddf30d17', '2020-08-12 16:35:01.376+02', '2020-08-12 16:35:01.376+02', 'Manuscript discussion', 'all');
+INSERT INTO public.channels (id, manuscript_id, created, updated, topic, type) VALUES ('89848abe-a992-45e4-ace7-36e9c64c4162', 'a696348d-b226-4703-aad1-ff64ddf30d17', '2020-08-12 16:35:01.376+02', '2020-08-12 16:35:01.376+02', 'Editorial discussion', 'editorial');
 
 
 --
@@ -417,6 +434,7 @@ INSERT INTO public.channels (id, manuscript_id, team_id, created, updated, topic
 -- Data for Name: files; Type: TABLE DATA; Schema: public; Owner: test
 --
 
+INSERT INTO public.files (id, created, updated, label, file_type, filename, url, mime_type, size, type, manuscript_id, review_comment_id) VALUES ('66070eaf-6ee1-475f-98ba-774843f1238e', '2020-08-12 16:35:19.664+02', '2020-08-12 16:35:19.664+02', NULL, 'supplementary', 'test-pdf.pdf', '/static/uploads/bfc74d5e3c0b8bf97cd5a522bfdb3c87.pdf', 'application/pdf', 142400, 'file', 'a696348d-b226-4703-aad1-ff64ddf30d17', NULL);
 
 
 --
@@ -436,7 +454,7 @@ INSERT INTO public.identities (id, user_id, created, updated, type, identifier,
 -- Data for Name: manuscripts; Type: TABLE DATA; Schema: public; Owner: test
 --
 
-INSERT INTO public.manuscripts (id, created, updated, parent_id, submitter_id, status, decision, authors, suggestions, meta, submission, type) VALUES ('fb2534c6-ecbb-4846-a61d-609dc119e9b0', '2020-07-28 00:41:33.983+02', '2020-07-28 00:42:03.231+02', NULL, '027afa6a-edbc-486e-bb31-71e12f8ea1c5', 'submitted', NULL, NULL, NULL, '{"notes": [{"content": "", "notesType": "fundingAcknowledgement"}, {"content": "", "notesType": "specialInstructions"}], "title": "My URL submission"}', '{"irb": "yes", "name": "Emily Clay", "cover": "This is my cover letter", "links": "https://doi.org/10.6084/m9.figshare.913521.v1, https://github.com/jure/mathtype_to_mathml", "contact": "emily@example.com", "methods": ["Functional MRI", "Optical Imaging"], "datacode": "This is my data and code availability statement", "humanMRI": "3T", "keywords": "some, keywords", "packages": ["SPM", "FSL"], "subjects": "patients", "suggested": "Erica James, Matthew Matretzky", "objectType": "software", "affiliation": "Example University, Egland", "otherMethods": "Erica James, Matthew Matretzk", "humanMRIother": "7T", "otherPackages": "Jupyter, Stencila", "animal_research_approval": "yes"}', 'Manuscript');
+INSERT INTO public.manuscripts (id, created, updated, parent_id, submitter_id, status, decision, authors, suggestions, meta, submission, type) VALUES ('a696348d-b226-4703-aad1-ff64ddf30d17', '2020-08-12 16:35:01.371+02', '2020-08-12 16:35:28.918+02', NULL, '027afa6a-edbc-486e-bb31-71e12f8ea1c5', 'submitted', NULL, NULL, NULL, '{"notes": [{"content": "", "notesType": "fundingAcknowledgement"}, {"content": "", "notesType": "specialInstructions"}], "title": "My URL submission"}', '{"irb": "yes", "name": "Emily Clay", "cover": "This is my cover letter", "links": "https://doi.org/10.6084/m9.figshare.913521.v1, https://github.com/jure/mathtype_to_mathml", "ethics": "This is my ethics statement", "contact": "emily@example.com", "methods": ["Functional MRI", "Optical Imaging"], "datacode": "This is my data and code availability statement", "humanMRI": "3T", "keywords": "some, keywords", "packages": ["SPM", "FSL"], "subjects": "patients", "suggested": "Erica James, Matthew Matretzky", "objectType": "software", "affiliation": "Example University, Egland", "otherMethods": "Erica James, Matthew Matretzky", "humanMRIother": "7T", "otherPackages": "Jupyter, Stencila", "animal_research_approval": "yes"}', 'Manuscript');
 
 
 --
@@ -449,24 +467,27 @@ INSERT INTO public.manuscripts (id, created, updated, parent_id, submitter_id, s
 -- Data for Name: migrations; Type: TABLE DATA; Schema: public; Owner: test
 --
 
-INSERT INTO public.migrations (id, run_at) VALUES ('1524494862-entities.sql', '2020-07-21 16:01:00.856209+02');
-INSERT INTO public.migrations (id, run_at) VALUES ('1537450834-files.sql', '2020-07-21 16:01:00.866487+02');
-INSERT INTO public.migrations (id, run_at) VALUES ('1537450834-review.sql', '2020-07-21 16:01:00.876573+02');
-INSERT INTO public.migrations (id, run_at) VALUES ('1542276313-initial-user-migration.sql', '2020-07-21 16:01:00.887088+02');
-INSERT INTO public.migrations (id, run_at) VALUES ('1542801241-initial-team-migration.sql', '2020-07-21 16:01:00.898301+02');
-INSERT INTO public.migrations (id, run_at) VALUES ('1547596236-initial-team-member-migration.js', '2020-07-21 16:01:00.954317+02');
-INSERT INTO public.migrations (id, run_at) VALUES ('1548205275-move-members.js', '2020-07-21 16:01:01.009825+02');
-INSERT INTO public.migrations (id, run_at) VALUES ('1548205276-simplify-object.js', '2020-07-21 16:01:01.025532+02');
-INSERT INTO public.migrations (id, run_at) VALUES ('1548328420-add-alias-migration.js', '2020-07-21 16:01:01.068783+02');
-INSERT INTO public.migrations (id, run_at) VALUES ('1560771823-add-unique-constraints-to-users.sql', '2020-07-21 16:01:01.078878+02');
-INSERT INTO public.migrations (id, run_at) VALUES ('1580908536-add-identities.sql', '2020-07-21 16:01:01.092107+02');
-INSERT INTO public.migrations (id, run_at) VALUES ('1581371297-migrate-users-to-identities.js', '2020-07-21 16:01:01.107057+02');
-INSERT INTO public.migrations (id, run_at) VALUES ('1581450834-manuscript.sql', '2020-07-21 16:01:01.118725+02');
-INSERT INTO public.migrations (id, run_at) VALUES ('1582930582-drop-fragments-and-collections.js', '2020-07-21 16:01:01.12668+02');
-INSERT INTO public.migrations (id, run_at) VALUES ('1585323910-add-channels.sql', '2020-07-21 16:01:01.14497+02');
-INSERT INTO public.migrations (id, run_at) VALUES ('1585344885-add-messages.sql', '2020-07-21 16:01:01.15657+02');
-INSERT INTO public.migrations (id, run_at) VALUES ('1585513226-add-profile-pic.sql', '2020-07-21 16:01:01.162443+02');
-INSERT INTO public.migrations (id, run_at) VALUES ('1592915682-change-identities-constraint.sql', '2020-07-21 16:01:01.17359+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1524494862-entities.sql', '2020-08-12 14:59:10.439327+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1542276313-initial-user-migration.sql', '2020-08-12 14:59:10.452184+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1560771823-add-unique-constraints-to-users.sql', '2020-08-12 14:59:10.463129+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1580908536-add-identities.sql', '2020-08-12 14:59:10.477935+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1581371297-migrate-users-to-identities.js', '2020-08-12 14:59:10.499722+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1581450834-manuscript.sql', '2020-08-12 14:59:10.509542+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1582930582-drop-fragments-and-collections.js', '2020-08-12 14:59:10.519573+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1585323910-add-channels.sql', '2020-08-12 14:59:10.533012+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1585344885-add-messages.sql', '2020-08-12 14:59:10.544214+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1585513226-add-profile-pic.sql', '2020-08-12 14:59:10.549847+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1592915682-change-identities-constraint.sql', '2020-08-12 14:59:10.558714+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1596830547-review.sql', '2020-08-12 14:59:10.571826+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1596830548-add-review-comments.sql', '2020-08-12 14:59:10.583466+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1596830548-initial-team-migration.sql', '2020-08-12 14:59:10.611618+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1596838897-files.sql', '2020-08-12 14:59:10.627188+02');
+
+
+--
+-- Data for Name: review_comments; Type: TABLE DATA; Schema: public; Owner: test
+--
+
 
 
 --
@@ -479,14 +500,14 @@ INSERT INTO public.migrations (id, run_at) VALUES ('1592915682-change-identities
 -- Data for Name: team_members; Type: TABLE DATA; Schema: public; Owner: test
 --
 
-INSERT INTO public.team_members (id, created, updated, status, team_id, user_id, alias_id) VALUES ('af28eb3b-495e-485d-879d-4d609e146dc6', '2020-07-28 00:41:34.024+02', '2020-07-28 00:41:34.024+02', NULL, '0ecdfc46-2400-4818-8623-ee29ad2102cf', '027afa6a-edbc-486e-bb31-71e12f8ea1c5', NULL);
+INSERT INTO public.team_members (id, created, updated, status, team_id, user_id, alias_id) VALUES ('d80380a6-c741-4e3c-9933-126cf368c43b', '2020-08-12 16:35:01.381+02', '2020-08-12 16:35:01.381+02', NULL, 'd5dc5913-db33-4576-a129-3c90321464f6', '027afa6a-edbc-486e-bb31-71e12f8ea1c5', NULL);
 
 
 --
 -- Data for Name: teams; Type: TABLE DATA; Schema: public; Owner: test
 --
 
-INSERT INTO public.teams (id, created, updated, name, role, owners, global, type, object_id, object_type) VALUES ('0ecdfc46-2400-4818-8623-ee29ad2102cf', '2020-07-28 00:41:34.01+02', '2020-07-28 00:41:34.01+02', 'Author', 'author', NULL, NULL, 'team', 'fb2534c6-ecbb-4846-a61d-609dc119e9b0', 'Manuscript');
+INSERT INTO public.teams (id, created, updated, name, role, members, owners, global, type, manuscript_id) VALUES ('d5dc5913-db33-4576-a129-3c90321464f6', '2020-08-12 16:35:01.376+02', '2020-08-12 16:35:01.376+02', 'Author', 'author', NULL, NULL, NULL, 'team', 'a696348d-b226-4703-aad1-ff64ddf30d17');
 
 
 --
@@ -499,7 +520,7 @@ INSERT INTO public.users (id, created, updated, admin, email, username, password
 INSERT INTO public.users (id, created, updated, admin, email, username, password_hash, teams, password_reset_token, password_reset_timestamp, type, profile_picture, online) VALUES ('231717dd-ba09-43d4-ac98-9d5542b27a0c', '2020-07-22 14:18:36.597+02', '2020-07-24 16:43:54.939+02', NULL, NULL, '000000032536230X', NULL, NULL, NULL, NULL, 'user', '/static/profiles/testuser5.jpg', false);
 INSERT INTO public.users (id, created, updated, admin, email, username, password_hash, teams, password_reset_token, password_reset_timestamp, type, profile_picture, online) VALUES ('3802b0e7-aadc-45de-9cf9-918fede99b97', '2020-07-21 16:30:45.719+02', '2020-07-24 16:49:06.488+02', true, NULL, '0000000256415729', NULL, NULL, NULL, NULL, 'user', '/static/profiles/testuser6.jpg', true);
 INSERT INTO public.users (id, created, updated, admin, email, username, password_hash, teams, password_reset_token, password_reset_timestamp, type, profile_picture, online) VALUES ('0da0bbec-9261-4706-b990-0c10aa3cc6b4', '2020-07-21 16:35:06.125+02', '2020-07-24 16:44:59.306+02', NULL, NULL, '0000000276459921', NULL, NULL, NULL, NULL, 'user', '/static/profiles/testuser7.jpg', true);
-INSERT INTO public.users (id, created, updated, admin, email, username, password_hash, teams, password_reset_token, password_reset_timestamp, type, profile_picture, online) VALUES ('027afa6a-edbc-486e-bb31-71e12f8ea1c5', '2020-07-21 16:17:24.734+02', '2020-07-28 00:41:34.032+02', NULL, NULL, '0000000205642016', NULL, NULL, NULL, NULL, 'user', '/static/profiles/testuser2.jpg', true);
+INSERT INTO public.users (id, created, updated, admin, email, username, password_hash, teams, password_reset_token, password_reset_timestamp, type, profile_picture, online) VALUES ('027afa6a-edbc-486e-bb31-71e12f8ea1c5', '2020-07-21 16:17:24.734+02', '2020-08-12 16:35:01.383+02', NULL, NULL, '0000000205642016', NULL, NULL, NULL, NULL, 'user', '/static/profiles/testuser2.jpg', true);
 
 
 --
@@ -590,6 +611,14 @@ ALTER TABLE ONLY public.migrations
     ADD CONSTRAINT migrations_pkey PRIMARY KEY (id);
 
 
+--
+-- Name: review_comments review_comments_pkey; Type: CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.review_comments
+    ADD CONSTRAINT review_comments_pkey PRIMARY KEY (id);
+
+
 --
 -- Name: reviews reviews_pkey; Type: CONSTRAINT; Schema: public; Owner: test
 --
@@ -695,17 +724,17 @@ CREATE UNIQUE INDEX is_default_idx ON public.identities USING btree (is_default,
 
 
 --
--- Name: team_members_team_id_user_id_index; Type: INDEX; Schema: public; Owner: test
+-- Name: team_members_team_id_user_id_idx; Type: INDEX; Schema: public; Owner: test
 --
 
-CREATE INDEX team_members_team_id_user_id_index ON public.team_members USING btree (team_id, user_id);
+CREATE INDEX team_members_team_id_user_id_idx ON public.team_members USING btree (team_id, user_id);
 
 
 --
--- Name: teams_object_id_object_type_index; Type: INDEX; Schema: public; Owner: test
+-- Name: teams_manuscript_id_idx; Type: INDEX; Schema: public; Owner: test
 --
 
-CREATE INDEX teams_object_id_object_type_index ON public.teams USING btree (object_id, object_type);
+CREATE INDEX teams_manuscript_id_idx ON public.teams USING btree (manuscript_id);
 
 
 --
@@ -733,11 +762,19 @@ ALTER TABLE ONLY public.channels
 
 
 --
--- Name: channels channels_team_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
+-- Name: files files_manuscript_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
 --
 
-ALTER TABLE ONLY public.channels
-    ADD CONSTRAINT channels_team_id_fkey FOREIGN KEY (team_id) REFERENCES public.teams(id);
+ALTER TABLE ONLY public.files
+    ADD CONSTRAINT files_manuscript_id_fkey FOREIGN KEY (manuscript_id) REFERENCES public.manuscripts(id) ON DELETE CASCADE;
+
+
+--
+-- Name: files files_review_comment_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.files
+    ADD CONSTRAINT files_review_comment_id_fkey FOREIGN KEY (review_comment_id) REFERENCES public.review_comments(id) ON DELETE CASCADE;
 
 
 --
@@ -764,6 +801,30 @@ ALTER TABLE ONLY public.messages
     ADD CONSTRAINT messages_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;
 
 
+--
+-- Name: review_comments review_comments_review_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.review_comments
+    ADD CONSTRAINT review_comments_review_id_fkey FOREIGN KEY (review_id) REFERENCES public.reviews(id) ON DELETE CASCADE;
+
+
+--
+-- Name: review_comments review_comments_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.review_comments
+    ADD CONSTRAINT review_comments_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE SET NULL;
+
+
+--
+-- Name: reviews reviews_manuscript_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.reviews
+    ADD CONSTRAINT reviews_manuscript_id_fkey FOREIGN KEY (manuscript_id) REFERENCES public.manuscripts(id) ON DELETE CASCADE;
+
+
 --
 -- Name: identities sidentities_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
 --
@@ -773,27 +834,35 @@ ALTER TABLE ONLY public.identities
 
 
 --
--- Name: team_members team_members_alias_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: test
+-- Name: team_members team_members_alias_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
 --
 
 ALTER TABLE ONLY public.team_members
-    ADD CONSTRAINT team_members_alias_id_foreign FOREIGN KEY (alias_id) REFERENCES public.aliases(id);
+    ADD CONSTRAINT team_members_alias_id_fkey FOREIGN KEY (alias_id) REFERENCES public.aliases(id);
 
 
 --
--- Name: team_members team_members_team_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: test
+-- Name: team_members team_members_team_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
 --
 
 ALTER TABLE ONLY public.team_members
-    ADD CONSTRAINT team_members_team_id_foreign FOREIGN KEY (team_id) REFERENCES public.teams(id) ON UPDATE CASCADE ON DELETE CASCADE;
+    ADD CONSTRAINT team_members_team_id_fkey FOREIGN KEY (team_id) REFERENCES public.teams(id) ON UPDATE CASCADE ON DELETE CASCADE;
 
 
 --
--- Name: team_members team_members_user_id_foreign; Type: FK CONSTRAINT; Schema: public; Owner: test
+-- Name: team_members team_members_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
 --
 
 ALTER TABLE ONLY public.team_members
-    ADD CONSTRAINT team_members_user_id_foreign FOREIGN KEY (user_id) REFERENCES public.users(id) ON UPDATE CASCADE ON DELETE CASCADE;
+    ADD CONSTRAINT team_members_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;
+
+
+--
+-- Name: teams teams_manuscript_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.teams
+    ADD CONSTRAINT teams_manuscript_id_fkey FOREIGN KEY (manuscript_id) REFERENCES public.manuscripts(id) ON DELETE CASCADE;
 
 
 --
diff --git a/cypress/dumps/three_reviews_completed.sql b/cypress/dumps/three_reviews_completed.sql
new file mode 100644
index 0000000000000000000000000000000000000000..8e7c8bba5d5ed812fb202665671a3580c2784c6c
--- /dev/null
+++ b/cypress/dumps/three_reviews_completed.sql
@@ -0,0 +1,885 @@
+--
+-- PostgreSQL database dump
+--
+
+-- Dumped from database version 10.5
+-- Dumped by pg_dump version 10.5
+
+SET statement_timeout = 0;
+SET lock_timeout = 0;
+SET idle_in_transaction_session_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 client_min_messages = warning;
+SET row_security = off;
+
+--
+-- Name: pgboss; Type: SCHEMA; Schema: -; Owner: test
+--
+
+CREATE SCHEMA pgboss;
+
+
+ALTER SCHEMA pgboss OWNER TO test;
+
+--
+-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: 
+--
+
+CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
+
+
+--
+-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: 
+--
+
+COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
+
+
+--
+-- Name: pgcrypto; Type: EXTENSION; Schema: -; Owner: 
+--
+
+CREATE EXTENSION IF NOT EXISTS pgcrypto WITH SCHEMA public;
+
+
+--
+-- Name: EXTENSION pgcrypto; Type: COMMENT; Schema: -; Owner: 
+--
+
+COMMENT ON EXTENSION pgcrypto IS 'cryptographic functions';
+
+
+--
+-- Name: job_state; Type: TYPE; Schema: pgboss; Owner: test
+--
+
+CREATE TYPE pgboss.job_state AS ENUM (
+    'created',
+    'retry',
+    'active',
+    'completed',
+    'expired',
+    'cancelled',
+    'failed'
+);
+
+
+ALTER TYPE pgboss.job_state OWNER TO test;
+
+SET default_tablespace = '';
+
+SET default_with_oids = false;
+
+--
+-- Name: archive; Type: TABLE; Schema: pgboss; Owner: test
+--
+
+CREATE TABLE pgboss.archive (
+    id uuid NOT NULL,
+    name text NOT NULL,
+    priority integer NOT NULL,
+    data jsonb,
+    state pgboss.job_state NOT NULL,
+    retrylimit integer NOT NULL,
+    retrycount integer NOT NULL,
+    retrydelay integer NOT NULL,
+    retrybackoff boolean NOT NULL,
+    startafter timestamp with time zone NOT NULL,
+    startedon timestamp with time zone,
+    singletonkey text,
+    singletonon timestamp without time zone,
+    expirein interval NOT NULL,
+    createdon timestamp with time zone NOT NULL,
+    completedon timestamp with time zone,
+    archivedon timestamp with time zone DEFAULT now() NOT NULL
+);
+
+
+ALTER TABLE pgboss.archive OWNER TO test;
+
+--
+-- Name: job; Type: TABLE; Schema: pgboss; Owner: test
+--
+
+CREATE TABLE pgboss.job (
+    id uuid DEFAULT public.gen_random_uuid() NOT NULL,
+    name text NOT NULL,
+    priority integer DEFAULT 0 NOT NULL,
+    data jsonb,
+    state pgboss.job_state DEFAULT 'created'::pgboss.job_state NOT NULL,
+    retrylimit integer DEFAULT 0 NOT NULL,
+    retrycount integer DEFAULT 0 NOT NULL,
+    retrydelay integer DEFAULT 0 NOT NULL,
+    retrybackoff boolean DEFAULT false NOT NULL,
+    startafter timestamp with time zone DEFAULT now() NOT NULL,
+    startedon timestamp with time zone,
+    singletonkey text,
+    singletonon timestamp without time zone,
+    expirein interval DEFAULT '00:15:00'::interval NOT NULL,
+    createdon timestamp with time zone DEFAULT now() NOT NULL,
+    completedon timestamp with time zone
+);
+
+
+ALTER TABLE pgboss.job OWNER TO test;
+
+--
+-- Name: version; Type: TABLE; Schema: pgboss; Owner: test
+--
+
+CREATE TABLE pgboss.version (
+    version text NOT NULL
+);
+
+
+ALTER TABLE pgboss.version OWNER TO test;
+
+--
+-- Name: aliases; Type: TABLE; Schema: public; Owner: test
+--
+
+CREATE TABLE public.aliases (
+    id uuid NOT NULL,
+    created timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
+    updated timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
+    name text,
+    email text,
+    aff text
+);
+
+
+ALTER TABLE public.aliases OWNER TO test;
+
+--
+-- Name: channel_members; Type: TABLE; Schema: public; Owner: test
+--
+
+CREATE TABLE public.channel_members (
+    id uuid NOT NULL,
+    created timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
+    updated timestamp with time zone,
+    user_id uuid NOT NULL,
+    channel_id uuid NOT NULL
+);
+
+
+ALTER TABLE public.channel_members OWNER TO test;
+
+--
+-- Name: channels; Type: TABLE; Schema: public; Owner: test
+--
+
+CREATE TABLE public.channels (
+    id uuid NOT NULL,
+    manuscript_id uuid,
+    created timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
+    updated timestamp with time zone,
+    topic text,
+    type text
+);
+
+
+ALTER TABLE public.channels OWNER TO test;
+
+--
+-- Name: entities; Type: TABLE; Schema: public; Owner: test
+--
+
+CREATE TABLE public.entities (
+    id uuid NOT NULL,
+    data jsonb
+);
+
+
+ALTER TABLE public.entities OWNER TO test;
+
+--
+-- Name: files; Type: TABLE; Schema: public; Owner: test
+--
+
+CREATE TABLE public.files (
+    id uuid NOT NULL,
+    created timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
+    updated timestamp with time zone,
+    label text,
+    file_type text,
+    filename text,
+    url text,
+    mime_type text,
+    size integer,
+    type text NOT NULL,
+    manuscript_id uuid,
+    review_comment_id uuid,
+    CONSTRAINT exactly_one_file_owner CHECK (((((manuscript_id IS NOT NULL))::integer + ((review_comment_id IS NOT NULL))::integer) = 1))
+);
+
+
+ALTER TABLE public.files OWNER TO test;
+
+--
+-- Name: identities; Type: TABLE; Schema: public; Owner: test
+--
+
+CREATE TABLE public.identities (
+    id uuid NOT NULL,
+    user_id uuid NOT NULL,
+    created timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
+    updated timestamp with time zone,
+    type text NOT NULL,
+    identifier text,
+    name text,
+    aff text,
+    oauth jsonb,
+    is_default boolean
+);
+
+
+ALTER TABLE public.identities OWNER TO test;
+
+--
+-- Name: manuscripts; Type: TABLE; Schema: public; Owner: test
+--
+
+CREATE TABLE public.manuscripts (
+    id uuid NOT NULL,
+    created timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
+    updated timestamp with time zone,
+    parent_id uuid,
+    submitter_id uuid,
+    status text,
+    decision text,
+    authors jsonb,
+    suggestions jsonb,
+    meta jsonb,
+    submission jsonb,
+    type text NOT NULL
+);
+
+
+ALTER TABLE public.manuscripts OWNER TO test;
+
+--
+-- Name: messages; Type: TABLE; Schema: public; Owner: test
+--
+
+CREATE TABLE public.messages (
+    id uuid NOT NULL,
+    user_id uuid NOT NULL,
+    channel_id uuid NOT NULL,
+    created timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
+    updated timestamp with time zone,
+    content text
+);
+
+
+ALTER TABLE public.messages OWNER TO test;
+
+--
+-- Name: migrations; Type: TABLE; Schema: public; Owner: test
+--
+
+CREATE TABLE public.migrations (
+    id text NOT NULL,
+    run_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP
+);
+
+
+ALTER TABLE public.migrations OWNER TO test;
+
+--
+-- Name: review_comments; Type: TABLE; Schema: public; Owner: test
+--
+
+CREATE TABLE public.review_comments (
+    id uuid NOT NULL,
+    created timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
+    updated timestamp with time zone,
+    review_id uuid,
+    user_id uuid,
+    content text,
+    comment_type text,
+    type text
+);
+
+
+ALTER TABLE public.review_comments OWNER TO test;
+
+--
+-- Name: reviews; Type: TABLE; Schema: public; Owner: test
+--
+
+CREATE TABLE public.reviews (
+    id uuid NOT NULL,
+    created timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
+    updated timestamp with time zone,
+    recommendation text,
+    is_decision boolean DEFAULT false,
+    user_id uuid,
+    manuscript_id uuid,
+    type text NOT NULL
+);
+
+
+ALTER TABLE public.reviews OWNER TO test;
+
+--
+-- Name: team_members; Type: TABLE; Schema: public; Owner: test
+--
+
+CREATE TABLE public.team_members (
+    id uuid NOT NULL,
+    created timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
+    updated timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
+    status character varying(255),
+    team_id uuid,
+    user_id uuid,
+    alias_id uuid
+);
+
+
+ALTER TABLE public.team_members OWNER TO test;
+
+--
+-- Name: teams; Type: TABLE; Schema: public; Owner: test
+--
+
+CREATE TABLE public.teams (
+    id uuid NOT NULL,
+    created timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
+    updated timestamp with time zone,
+    name text,
+    role text NOT NULL,
+    members jsonb,
+    owners jsonb,
+    global boolean,
+    type text NOT NULL,
+    manuscript_id uuid
+);
+
+
+ALTER TABLE public.teams OWNER TO test;
+
+--
+-- Name: users; Type: TABLE; Schema: public; Owner: test
+--
+
+CREATE TABLE public.users (
+    id uuid NOT NULL,
+    created timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
+    updated timestamp with time zone,
+    admin boolean,
+    email text,
+    username text,
+    password_hash text,
+    teams jsonb,
+    password_reset_token text,
+    password_reset_timestamp timestamp with time zone,
+    type text NOT NULL,
+    profile_picture text,
+    online boolean
+);
+
+
+ALTER TABLE public.users OWNER TO test;
+
+--
+-- Data for Name: archive; Type: TABLE DATA; Schema: pgboss; Owner: test
+--
+
+
+
+--
+-- Data for Name: job; Type: TABLE DATA; Schema: pgboss; Owner: test
+--
+
+
+
+--
+-- Data for Name: version; Type: TABLE DATA; Schema: pgboss; Owner: test
+--
+
+INSERT INTO pgboss.version (version) VALUES ('11');
+
+
+--
+-- Data for Name: aliases; Type: TABLE DATA; Schema: public; Owner: test
+--
+
+
+
+--
+-- Data for Name: channel_members; Type: TABLE DATA; Schema: public; Owner: test
+--
+
+
+
+--
+-- Data for Name: channels; Type: TABLE DATA; Schema: public; Owner: test
+--
+
+INSERT INTO public.channels (id, manuscript_id, created, updated, topic, type) VALUES ('afd95c06-011b-46e3-9985-964283d51c4a', '93735475-08f6-436b-9db3-fe2364b9dbb2', '2020-08-12 16:16:44.916+02', '2020-08-12 16:16:44.916+02', 'Manuscript discussion', 'all');
+INSERT INTO public.channels (id, manuscript_id, created, updated, topic, type) VALUES ('75540565-6619-495f-a8c5-d6bf11ece72d', '93735475-08f6-436b-9db3-fe2364b9dbb2', '2020-08-12 16:16:44.916+02', '2020-08-12 16:16:44.916+02', 'Editorial discussion', 'editorial');
+
+
+--
+-- Data for Name: entities; Type: TABLE DATA; Schema: public; Owner: test
+--
+
+
+
+--
+-- Data for Name: files; Type: TABLE DATA; Schema: public; Owner: test
+--
+
+
+
+--
+-- Data for Name: identities; Type: TABLE DATA; Schema: public; Owner: test
+--
+
+INSERT INTO public.identities (id, user_id, created, updated, type, identifier, name, aff, oauth, is_default) VALUES ('d341a633-cdce-4a7f-a9ad-5afc03cd0dd1', '027afa6a-edbc-486e-bb31-71e12f8ea1c5', '2020-07-21 16:17:24.741+02', '2020-07-21 16:17:25.87+02', 'orcid', '0000-0002-0564-2016', 'Emily Clay', NULL, '{"accessToken": "079a1165-31e5-4b59-9a99-d80ff7a21ebf", "refreshToken": "ccadc737-defc-419e-823b-a9f3673848ba"}', true);
+INSERT INTO public.identities (id, user_id, created, updated, type, identifier, name, aff, oauth, is_default) VALUES ('bcda196e-765a-42c8-94da-ca2e43b80f96', '3802b0e7-aadc-45de-9cf9-918fede99b97', '2020-07-21 16:30:45.721+02', '2020-07-21 16:33:26.742+02', 'orcid', '0000-0002-5641-5729', 'Sinead Sullivan', NULL, '{"accessToken": "ef1ed3ec-8371-41b2-a136-fd196ae52a72", "refreshToken": "6972dace-d9a6-4cd3-a2ad-ec7eb3e457c7"}', true);
+INSERT INTO public.identities (id, user_id, created, updated, type, identifier, name, aff, oauth, is_default) VALUES ('4af83984-6359-47c5-a075-5ddfa9c555d9', '0da0bbec-9261-4706-b990-0c10aa3cc6b4', '2020-07-21 16:35:06.127+02', '2020-07-21 16:35:07.104+02', 'orcid', '0000-0002-7645-9921', 'Sherry Crofoot', NULL, '{"accessToken": "2ad4e130-0775-4e13-87fb-8e8f5a0570ae", "refreshToken": "159933d9-2020-4c02-bdfb-163af41017dc"}', true);
+INSERT INTO public.identities (id, user_id, created, updated, type, identifier, name, aff, oauth, is_default) VALUES ('acfa1777-0aec-4fe1-bc16-92bb9d19e884', '85e1300e-003c-4e96-987b-23812f902477', '2020-07-21 16:35:38.384+02', '2020-07-21 16:35:39.358+02', 'orcid', '0000-0002-9429-4446', 'Elaine Barnes', NULL, '{"accessToken": "dcf07bc7-e59c-41b3-9ce0-924ac20aeeea", "refreshToken": "ae49d6a1-8e62-419d-8767-4a3ec22c1950"}', true);
+INSERT INTO public.identities (id, user_id, created, updated, type, identifier, name, aff, oauth, is_default) VALUES ('88c85115-d83c-42d7-a1a1-0139827977da', '40e3d054-9ac8-4c0f-84ed-e3c6307662cd', '2020-07-21 16:36:24.975+02', '2020-07-21 16:36:26.059+02', 'orcid', '0000-0001-5956-7341', 'Gale Davis', NULL, '{"accessToken": "3e9f6f6c-7cc0-4afa-9fdf-6ed377c36aad", "refreshToken": "80b1e911-df97-43f1-9f11-17b61913f6d7"}', true);
+INSERT INTO public.identities (id, user_id, created, updated, type, identifier, name, aff, oauth, is_default) VALUES ('049f91da-c84e-4b80-be2e-6e0cfca7a136', '231717dd-ba09-43d4-ac98-9d5542b27a0c', '2020-07-22 14:18:36.611+02', '2020-07-22 14:18:37.745+02', 'orcid', '0000-0003-2536-230X', 'Test Account', NULL, '{"accessToken": "eb551178-79e5-4189-8c5f-0a553092a9b5", "refreshToken": "4506fa5f-bd77-4867-afb4-0b07ea5302d6"}', true);
+INSERT INTO public.identities (id, user_id, created, updated, type, identifier, name, aff, oauth, is_default) VALUES ('2fb8359c-239c-43fa-91f5-1ff2058272a6', '1d599f2c-d293-4d5e-b6c1-ba34e81e3fc8', '2020-07-24 15:21:54.604+02', '2020-07-24 15:21:55.7+02', 'orcid', '0000-0003-1838-2441', 'Joanne Pilger', NULL, '{"accessToken": "842de329-ef16-4461-b83b-e8fe57238904", "refreshToken": "524fbdc5-9c67-4b4c-af17-2ce4cf294e88"}', true);
+
+
+--
+-- Data for Name: manuscripts; Type: TABLE DATA; Schema: public; Owner: test
+--
+
+INSERT INTO public.manuscripts (id, created, updated, parent_id, submitter_id, status, decision, authors, suggestions, meta, submission, type) VALUES ('93735475-08f6-436b-9db3-fe2364b9dbb2', '2020-08-12 16:16:44.9+02', '2020-08-12 16:17:12.499+02', NULL, '027afa6a-edbc-486e-bb31-71e12f8ea1c5', 'submitted', NULL, NULL, NULL, '{"notes": [{"content": "", "notesType": "fundingAcknowledgement"}, {"content": "", "notesType": "specialInstructions"}], "title": "My URL submission"}', '{"irb": "yes", "name": "Emily Clay", "cover": "This is my cover letter", "links": "https://doi.org/10.6084/m9.figshare.913521.v1, https://github.com/jure/mathtype_to_mathml", "ethics": "This is my ethics statement", "contact": "emily@example.com", "methods": ["Functional MRI", "Optical Imaging"], "datacode": "This is my data and code availability statement", "humanMRI": "3T", "keywords": "some, keyword", "packages": ["SPM", "FSL"], "subjects": "patients", "suggested": "Erica James, Matthew Matretzky", "objectType": "software", "affiliation": "Example University, Egland", "otherMethods": "Erica James, Matthew Matretzky", "humanMRIother": "7T", "otherPackages": "Jupyter, Stencila", "animal_research_approval": "yes"}', 'Manuscript');
+
+
+--
+-- Data for Name: messages; Type: TABLE DATA; Schema: public; Owner: test
+--
+
+
+
+--
+-- Data for Name: migrations; Type: TABLE DATA; Schema: public; Owner: test
+--
+
+INSERT INTO public.migrations (id, run_at) VALUES ('1524494862-entities.sql', '2020-08-12 14:59:10.439327+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1542276313-initial-user-migration.sql', '2020-08-12 14:59:10.452184+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1560771823-add-unique-constraints-to-users.sql', '2020-08-12 14:59:10.463129+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1580908536-add-identities.sql', '2020-08-12 14:59:10.477935+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1581371297-migrate-users-to-identities.js', '2020-08-12 14:59:10.499722+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1581450834-manuscript.sql', '2020-08-12 14:59:10.509542+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1582930582-drop-fragments-and-collections.js', '2020-08-12 14:59:10.519573+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1585323910-add-channels.sql', '2020-08-12 14:59:10.533012+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1585344885-add-messages.sql', '2020-08-12 14:59:10.544214+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1585513226-add-profile-pic.sql', '2020-08-12 14:59:10.549847+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1592915682-change-identities-constraint.sql', '2020-08-12 14:59:10.558714+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1596830547-review.sql', '2020-08-12 14:59:10.571826+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1596830548-add-review-comments.sql', '2020-08-12 14:59:10.583466+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1596830548-initial-team-migration.sql', '2020-08-12 14:59:10.611618+02');
+INSERT INTO public.migrations (id, run_at) VALUES ('1596838897-files.sql', '2020-08-12 14:59:10.627188+02');
+
+
+--
+-- Data for Name: review_comments; Type: TABLE DATA; Schema: public; Owner: test
+--
+
+INSERT INTO public.review_comments (id, created, updated, review_id, user_id, content, comment_type, type) VALUES ('f73fdbd8-6fb6-4d7a-a74a-ab2c2c07b572', '2020-08-13 15:09:33.838+02', '2020-08-13 15:09:33.838+02', '5a06fcf3-d368-4f65-917c-1acdb73fcc71', NULL, '<p>Great paper, congratulations! Gale Davis</p>', 'review', 'ReviewComment');
+INSERT INTO public.review_comments (id, created, updated, review_id, user_id, content, comment_type, type) VALUES ('5c86da62-bc7f-4d23-8968-62bd5a56a52b', '2020-08-13 15:09:34.88+02', '2020-08-13 15:09:34.88+02', '5a06fcf3-d368-4f65-917c-1acdb73fcc71', NULL, '<p>This is a very important paper. Gale Davis</p>', 'confidential', 'ReviewComment');
+INSERT INTO public.review_comments (id, created, updated, review_id, user_id, content, comment_type, type) VALUES ('ef96b249-dab6-4f7e-b24e-571b340b9b41', '2020-08-13 15:09:38.761+02', '2020-08-13 15:09:38.761+02', '7c6cd2f6-c23e-4902-96ac-df4801ac3d0a', NULL, '<p>Great paper, congratulations! Sherry Crofoot</p>', 'review', 'ReviewComment');
+INSERT INTO public.review_comments (id, created, updated, review_id, user_id, content, comment_type, type) VALUES ('04a8a70e-7787-4fd6-bdca-bfac3aa86951', '2020-08-13 15:09:40.155+02', '2020-08-13 15:09:40.155+02', '7c6cd2f6-c23e-4902-96ac-df4801ac3d0a', NULL, '<p>This is a very important paper. Sherry Crofoot</p>', 'confidential', 'ReviewComment');
+INSERT INTO public.review_comments (id, created, updated, review_id, user_id, content, comment_type, type) VALUES ('7ccda096-07c2-4569-ad0f-5b3574db205e', '2020-08-13 15:09:44.046+02', '2020-08-13 15:09:44.046+02', '3a34e0ef-6695-4268-b901-60de20f9cf4e', NULL, '<p>Great paper, congratulations! Elaine Barnes</p>', 'review', 'ReviewComment');
+INSERT INTO public.review_comments (id, created, updated, review_id, user_id, content, comment_type, type) VALUES ('c8b7d1c9-aef2-47d0-a9ad-c9d46706e79e', '2020-08-13 15:09:45.548+02', '2020-08-13 15:09:45.548+02', '3a34e0ef-6695-4268-b901-60de20f9cf4e', NULL, '<p>This is a very important paper. Elaine Barnes</p>', 'confidential', 'ReviewComment');
+
+
+--
+-- Data for Name: reviews; Type: TABLE DATA; Schema: public; Owner: test
+--
+
+INSERT INTO public.reviews (id, created, updated, recommendation, is_decision, user_id, manuscript_id, type) VALUES ('5a06fcf3-d368-4f65-917c-1acdb73fcc71', '2020-08-13 15:09:32.358+02', '2020-08-13 15:09:34.925+02', 'accepted', false, '40e3d054-9ac8-4c0f-84ed-e3c6307662cd', '93735475-08f6-436b-9db3-fe2364b9dbb2', 'Review');
+INSERT INTO public.reviews (id, created, updated, recommendation, is_decision, user_id, manuscript_id, type) VALUES ('7c6cd2f6-c23e-4902-96ac-df4801ac3d0a', '2020-08-13 15:09:36.501+02', '2020-08-13 15:09:40.159+02', 'accepted', false, '0da0bbec-9261-4706-b990-0c10aa3cc6b4', '93735475-08f6-436b-9db3-fe2364b9dbb2', 'Review');
+INSERT INTO public.reviews (id, created, updated, recommendation, is_decision, user_id, manuscript_id, type) VALUES ('3a34e0ef-6695-4268-b901-60de20f9cf4e', '2020-08-13 15:09:41.911+02', '2020-08-13 15:09:45.561+02', 'accepted', false, '85e1300e-003c-4e96-987b-23812f902477', '93735475-08f6-436b-9db3-fe2364b9dbb2', 'Review');
+
+
+--
+-- Data for Name: team_members; Type: TABLE DATA; Schema: public; Owner: test
+--
+
+INSERT INTO public.team_members (id, created, updated, status, team_id, user_id, alias_id) VALUES ('6505126d-2ecd-498b-a27d-18eafbdbc8a6', '2020-08-12 16:16:44.923+02', '2020-08-12 16:16:44.923+02', NULL, 'c31e3116-6176-45b5-b52c-6f7cbfc86007', '027afa6a-edbc-486e-bb31-71e12f8ea1c5', NULL);
+INSERT INTO public.team_members (id, created, updated, status, team_id, user_id, alias_id) VALUES ('031ae180-e94e-458d-86b7-f2dc1d456e2e', '2020-08-12 16:17:14.795+02', '2020-08-12 16:17:14.795+02', NULL, 'bf800912-56c4-44eb-b425-64e51a9824fe', '1d599f2c-d293-4d5e-b6c1-ba34e81e3fc8', NULL);
+INSERT INTO public.team_members (id, created, updated, status, team_id, user_id, alias_id) VALUES ('c4ac4fc0-3fae-43b0-89ee-bf7f8fd9885f', '2020-08-12 16:17:43.262+02', '2020-08-13 15:09:41.898+02', 'completed', '0719d132-bb6c-49d9-9122-7911a48cfd60', '40e3d054-9ac8-4c0f-84ed-e3c6307662cd', NULL);
+INSERT INTO public.team_members (id, created, updated, status, team_id, user_id, alias_id) VALUES ('69e896c6-0fdb-421d-a638-1ef7670c03c9', '2020-08-12 16:17:43.884+02', '2020-08-13 15:09:41.898+02', 'completed', '0719d132-bb6c-49d9-9122-7911a48cfd60', '0da0bbec-9261-4706-b990-0c10aa3cc6b4', NULL);
+INSERT INTO public.team_members (id, created, updated, status, team_id, user_id, alias_id) VALUES ('12c33ef5-4fc3-4d48-8309-a90c0461113c', '2020-08-12 16:17:44.547+02', '2020-08-13 15:09:45.782+02', 'completed', '0719d132-bb6c-49d9-9122-7911a48cfd60', '85e1300e-003c-4e96-987b-23812f902477', NULL);
+
+
+--
+-- Data for Name: teams; Type: TABLE DATA; Schema: public; Owner: test
+--
+
+INSERT INTO public.teams (id, created, updated, name, role, members, owners, global, type, manuscript_id) VALUES ('c31e3116-6176-45b5-b52c-6f7cbfc86007', '2020-08-12 16:16:44.916+02', '2020-08-12 16:16:44.916+02', 'Author', 'author', NULL, NULL, NULL, 'team', '93735475-08f6-436b-9db3-fe2364b9dbb2');
+INSERT INTO public.teams (id, created, updated, name, role, members, owners, global, type, manuscript_id) VALUES ('bf800912-56c4-44eb-b425-64e51a9824fe', '2020-08-12 16:17:14.789+02', '2020-08-12 16:17:14.789+02', 'Senior Editor', 'seniorEditor', NULL, NULL, NULL, 'team', '93735475-08f6-436b-9db3-fe2364b9dbb2');
+INSERT INTO public.teams (id, created, updated, name, role, members, owners, global, type, manuscript_id) VALUES ('0719d132-bb6c-49d9-9122-7911a48cfd60', '2020-08-12 16:17:43.258+02', '2020-08-13 15:09:41.898+02', 'Reviewers', 'reviewer', NULL, NULL, NULL, 'team', '93735475-08f6-436b-9db3-fe2364b9dbb2');
+
+
+--
+-- Data for Name: users; Type: TABLE DATA; Schema: public; Owner: test
+--
+
+INSERT INTO public.users (id, created, updated, admin, email, username, password_hash, teams, password_reset_token, password_reset_timestamp, type, profile_picture, online) VALUES ('231717dd-ba09-43d4-ac98-9d5542b27a0c', '2020-07-22 14:18:36.597+02', '2020-07-24 16:43:54.939+02', NULL, NULL, '000000032536230X', NULL, NULL, NULL, NULL, 'user', '/static/profiles/testuser5.jpg', false);
+INSERT INTO public.users (id, created, updated, admin, email, username, password_hash, teams, password_reset_token, password_reset_timestamp, type, profile_picture, online) VALUES ('027afa6a-edbc-486e-bb31-71e12f8ea1c5', '2020-07-21 16:17:24.734+02', '2020-08-12 16:17:13.598+02', NULL, NULL, '0000000205642016', NULL, NULL, NULL, NULL, 'user', '/static/profiles/testuser2.jpg', false);
+INSERT INTO public.users (id, created, updated, admin, email, username, password_hash, teams, password_reset_token, password_reset_timestamp, type, profile_picture, online) VALUES ('3802b0e7-aadc-45de-9cf9-918fede99b97', '2020-07-21 16:30:45.719+02', '2020-08-12 16:17:14.868+02', true, NULL, '0000000256415729', NULL, NULL, NULL, NULL, 'user', '/static/profiles/testuser6.jpg', false);
+INSERT INTO public.users (id, created, updated, admin, email, username, password_hash, teams, password_reset_token, password_reset_timestamp, type, profile_picture, online) VALUES ('40e3d054-9ac8-4c0f-84ed-e3c6307662cd', '2020-07-21 16:36:24.973+02', '2020-08-13 15:09:35.913+02', NULL, NULL, '0000000159567341', NULL, NULL, NULL, NULL, 'user', '/static/profiles/testuser4.jpg', false);
+INSERT INTO public.users (id, created, updated, admin, email, username, password_hash, teams, password_reset_token, password_reset_timestamp, type, profile_picture, online) VALUES ('0da0bbec-9261-4706-b990-0c10aa3cc6b4', '2020-07-21 16:35:06.125+02', '2020-08-13 15:09:41.198+02', NULL, NULL, '0000000276459921', NULL, NULL, NULL, NULL, 'user', '/static/profiles/testuser7.jpg', false);
+INSERT INTO public.users (id, created, updated, admin, email, username, password_hash, teams, password_reset_token, password_reset_timestamp, type, profile_picture, online) VALUES ('85e1300e-003c-4e96-987b-23812f902477', '2020-07-21 16:35:38.381+02', '2020-08-13 15:09:46.741+02', NULL, NULL, '0000000294294446', NULL, NULL, NULL, NULL, 'user', '/static/profiles/testuser1.jpg', false);
+INSERT INTO public.users (id, created, updated, admin, email, username, password_hash, teams, password_reset_token, password_reset_timestamp, type, profile_picture, online) VALUES ('1d599f2c-d293-4d5e-b6c1-ba34e81e3fc8', '2020-07-24 15:21:54.59+02', '2020-08-13 15:09:47.167+02', NULL, NULL, '0000000318382441', NULL, NULL, NULL, NULL, 'user', '/static/profiles/testuser3.jpg', true);
+
+
+--
+-- Name: job job_pkey; Type: CONSTRAINT; Schema: pgboss; Owner: test
+--
+
+ALTER TABLE ONLY pgboss.job
+    ADD CONSTRAINT job_pkey PRIMARY KEY (id);
+
+
+--
+-- Name: version version_pkey; Type: CONSTRAINT; Schema: pgboss; Owner: test
+--
+
+ALTER TABLE ONLY pgboss.version
+    ADD CONSTRAINT version_pkey PRIMARY KEY (version);
+
+
+--
+-- Name: aliases aliases_pkey; Type: CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.aliases
+    ADD CONSTRAINT aliases_pkey PRIMARY KEY (id);
+
+
+--
+-- Name: channel_members channel_members_pkey; Type: CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.channel_members
+    ADD CONSTRAINT channel_members_pkey PRIMARY KEY (id);
+
+
+--
+-- Name: channels channels_pkey; Type: CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.channels
+    ADD CONSTRAINT channels_pkey PRIMARY KEY (id);
+
+
+--
+-- Name: entities entities_pkey; Type: CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.entities
+    ADD CONSTRAINT entities_pkey PRIMARY KEY (id);
+
+
+--
+-- Name: files files_pkey; Type: CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.files
+    ADD CONSTRAINT files_pkey PRIMARY KEY (id);
+
+
+--
+-- Name: identities identities_pkey; Type: CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.identities
+    ADD CONSTRAINT identities_pkey PRIMARY KEY (id);
+
+
+--
+-- Name: manuscripts manuscripts_pkey; Type: CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.manuscripts
+    ADD CONSTRAINT manuscripts_pkey PRIMARY KEY (id);
+
+
+--
+-- Name: messages messages_pkey; Type: CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.messages
+    ADD CONSTRAINT messages_pkey PRIMARY KEY (id);
+
+
+--
+-- Name: migrations migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.migrations
+    ADD CONSTRAINT migrations_pkey PRIMARY KEY (id);
+
+
+--
+-- Name: review_comments review_comments_pkey; Type: CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.review_comments
+    ADD CONSTRAINT review_comments_pkey PRIMARY KEY (id);
+
+
+--
+-- Name: reviews reviews_pkey; Type: CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.reviews
+    ADD CONSTRAINT reviews_pkey PRIMARY KEY (id);
+
+
+--
+-- Name: team_members team_members_pkey; Type: CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.team_members
+    ADD CONSTRAINT team_members_pkey PRIMARY KEY (id);
+
+
+--
+-- Name: teams teams_pkey; Type: CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.teams
+    ADD CONSTRAINT teams_pkey PRIMARY KEY (id);
+
+
+--
+-- Name: users users_email_key; Type: CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.users
+    ADD CONSTRAINT users_email_key UNIQUE (email);
+
+
+--
+-- Name: users users_pkey; Type: CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.users
+    ADD CONSTRAINT users_pkey PRIMARY KEY (id);
+
+
+--
+-- Name: users users_username_key; Type: CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.users
+    ADD CONSTRAINT users_username_key UNIQUE (username);
+
+
+--
+-- Name: archive_archivedon_idx; Type: INDEX; Schema: pgboss; Owner: test
+--
+
+CREATE INDEX archive_archivedon_idx ON pgboss.archive USING btree (archivedon);
+
+
+--
+-- Name: archive_id_idx; Type: INDEX; Schema: pgboss; Owner: test
+--
+
+CREATE INDEX archive_id_idx ON pgboss.archive USING btree (id);
+
+
+--
+-- Name: job_name; Type: INDEX; Schema: pgboss; Owner: test
+--
+
+CREATE INDEX job_name ON pgboss.job USING btree (name text_pattern_ops);
+
+
+--
+-- Name: job_singletonkey; Type: INDEX; Schema: pgboss; Owner: test
+--
+
+CREATE UNIQUE INDEX job_singletonkey ON pgboss.job USING btree (name, singletonkey) WHERE ((state < 'completed'::pgboss.job_state) AND (singletonon IS NULL));
+
+
+--
+-- Name: job_singletonkeyon; Type: INDEX; Schema: pgboss; Owner: test
+--
+
+CREATE UNIQUE INDEX job_singletonkeyon ON pgboss.job USING btree (name, singletonon, singletonkey) WHERE (state < 'expired'::pgboss.job_state);
+
+
+--
+-- Name: job_singletonon; Type: INDEX; Schema: pgboss; Owner: test
+--
+
+CREATE UNIQUE INDEX job_singletonon ON pgboss.job USING btree (name, singletonon) WHERE ((state < 'expired'::pgboss.job_state) AND (singletonkey IS NULL));
+
+
+--
+-- Name: channel_members_idx; Type: INDEX; Schema: public; Owner: test
+--
+
+CREATE INDEX channel_members_idx ON public.channel_members USING btree (user_id, channel_id);
+
+
+--
+-- Name: is_default_idx; Type: INDEX; Schema: public; Owner: test
+--
+
+CREATE UNIQUE INDEX is_default_idx ON public.identities USING btree (is_default, user_id) WHERE (is_default IS TRUE);
+
+
+--
+-- Name: team_members_team_id_user_id_idx; Type: INDEX; Schema: public; Owner: test
+--
+
+CREATE INDEX team_members_team_id_user_id_idx ON public.team_members USING btree (team_id, user_id);
+
+
+--
+-- Name: teams_manuscript_id_idx; Type: INDEX; Schema: public; Owner: test
+--
+
+CREATE INDEX teams_manuscript_id_idx ON public.teams USING btree (manuscript_id);
+
+
+--
+-- Name: channel_members channel_members_channel_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.channel_members
+    ADD CONSTRAINT channel_members_channel_id_fkey FOREIGN KEY (channel_id) REFERENCES public.channels(id);
+
+
+--
+-- Name: channel_members channel_members_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.channel_members
+    ADD CONSTRAINT channel_members_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;
+
+
+--
+-- Name: channels channels_manuscript_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.channels
+    ADD CONSTRAINT channels_manuscript_id_fkey FOREIGN KEY (manuscript_id) REFERENCES public.manuscripts(id) ON DELETE CASCADE;
+
+
+--
+-- Name: files files_manuscript_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.files
+    ADD CONSTRAINT files_manuscript_id_fkey FOREIGN KEY (manuscript_id) REFERENCES public.manuscripts(id) ON DELETE CASCADE;
+
+
+--
+-- Name: files files_review_comment_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.files
+    ADD CONSTRAINT files_review_comment_id_fkey FOREIGN KEY (review_comment_id) REFERENCES public.review_comments(id) ON DELETE CASCADE;
+
+
+--
+-- Name: manuscripts manuscripts_submitter_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.manuscripts
+    ADD CONSTRAINT manuscripts_submitter_id_fkey FOREIGN KEY (submitter_id) REFERENCES public.users(id);
+
+
+--
+-- Name: messages messages_channel_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.messages
+    ADD CONSTRAINT messages_channel_id_fkey FOREIGN KEY (channel_id) REFERENCES public.channels(id) ON DELETE CASCADE;
+
+
+--
+-- Name: messages messages_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.messages
+    ADD CONSTRAINT messages_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;
+
+
+--
+-- Name: review_comments review_comments_review_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.review_comments
+    ADD CONSTRAINT review_comments_review_id_fkey FOREIGN KEY (review_id) REFERENCES public.reviews(id) ON DELETE CASCADE;
+
+
+--
+-- Name: review_comments review_comments_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.review_comments
+    ADD CONSTRAINT review_comments_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE SET NULL;
+
+
+--
+-- Name: reviews reviews_manuscript_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.reviews
+    ADD CONSTRAINT reviews_manuscript_id_fkey FOREIGN KEY (manuscript_id) REFERENCES public.manuscripts(id) ON DELETE CASCADE;
+
+
+--
+-- Name: identities sidentities_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.identities
+    ADD CONSTRAINT sidentities_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;
+
+
+--
+-- Name: team_members team_members_alias_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.team_members
+    ADD CONSTRAINT team_members_alias_id_fkey FOREIGN KEY (alias_id) REFERENCES public.aliases(id);
+
+
+--
+-- Name: team_members team_members_team_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.team_members
+    ADD CONSTRAINT team_members_team_id_fkey FOREIGN KEY (team_id) REFERENCES public.teams(id) ON UPDATE CASCADE ON DELETE CASCADE;
+
+
+--
+-- Name: team_members team_members_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.team_members
+    ADD CONSTRAINT team_members_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;
+
+
+--
+-- Name: teams teams_manuscript_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: test
+--
+
+ALTER TABLE ONLY public.teams
+    ADD CONSTRAINT teams_manuscript_id_fkey FOREIGN KEY (manuscript_id) REFERENCES public.manuscripts(id) ON DELETE CASCADE;
+
+
+--
+-- PostgreSQL database dump complete
+--
+
diff --git a/cypress/integration/assign_reviewers_spec.js b/cypress/integration/assign_reviewers_spec.js
index 8b041451ce0f0697ea9e173f14dbf01859c7326f..84e8c7894ec7bc7b495eadbee17439fcbdedb0c2 100644
--- a/cypress/integration/assign_reviewers_spec.js
+++ b/cypress/integration/assign_reviewers_spec.js
@@ -1,9 +1,9 @@
-const login = name => {
-  cy.task('createToken', name).then(token => {
-    cy.setToken(token)
-    cy.visit('/journal/dashboard')
-  })
-}
+// const login = name => {
+//   cy.task('createToken', name).then(token => {
+//     cy.setToken(token)
+//     cy.visit('/journal/dashboard')
+//   })
+// }
 
 const inviteReviewer = name => {
   cy.get('*[aria-label*="Invite reviewers"]').click({
@@ -21,7 +21,7 @@ describe('Editor assigning reviewers', () => {
   it('can assign 3 reviewers', () => {
     cy.task('restore', 'senior_editor_assigned')
 
-    login('Joanne Pilger')
+    cy.login('Joanne Pilger')
 
     cy.contains('Control Panel').click()
     cy.contains('Manage Reviewers').click()
diff --git a/cypress/integration/decision_spec.js b/cypress/integration/decision_spec.js
new file mode 100644
index 0000000000000000000000000000000000000000..c9fe3c9032d8e9bd37e25aabc8b0ed3928073509
--- /dev/null
+++ b/cypress/integration/decision_spec.js
@@ -0,0 +1,20 @@
+describe('Completing a review', () => {
+  it('accept and do a review', () => {
+    cy.task('restore', 'three_reviews_completed')
+
+    cy.login('Joanne Pilger') // Senior editor
+
+    cy.contains('Control Panel').click()
+
+    cy.get('[data-testid="decisionComment"]')
+      .click()
+      .type(`Great paper, dear authors, congratulations!`)
+
+    cy.contains('Accept').click()
+    cy.contains('Submit').click()
+    cy.visit('/journal/dashboard')
+    cy.contains('Accepted')
+
+    cy.task('dump', 'decision_completed')
+  })
+})
diff --git a/cypress/integration/review_spec.js b/cypress/integration/review_spec.js
new file mode 100644
index 0000000000000000000000000000000000000000..a4a90e1bdc5e462f7f4a6554d63f506f0d178f80
--- /dev/null
+++ b/cypress/integration/review_spec.js
@@ -0,0 +1,38 @@
+const doReview = name => {
+  cy.login(name)
+
+  cy.get('[data-testid="accept-review"]').click()
+  cy.contains('Do Review').click()
+
+  cy.contains('My URL submission')
+  cy.contains('This is my data and code availability statement')
+
+  cy.get('[data-testid="reviewComment"]')
+    .click()
+    .type(`Great paper, congratulations! ${name}`)
+  cy.get('[data-testid="confidentialComment"]')
+    .click()
+    .type(`This is a very important paper. ${name}`)
+
+  cy.contains('Accept').click()
+  cy.contains('Submit').click()
+
+  cy.visit('/journal/dashboard')
+  cy.contains('Completed')
+}
+
+describe('Completing a review', () => {
+  it('accept and do a review', () => {
+    cy.task('restore', 'reviewers_invited')
+
+    doReview('Gale Davis') // Reviewers
+    doReview('Sherry Crofoot')
+    doReview('Elaine Barnes')
+
+    cy.login('Joanne Pilger') // Senior editor
+
+    cy.get('[data-testid="completed"]').should('have.text', '3completed')
+
+    cy.task('dump', 'three_reviews_completed')
+  })
+})
diff --git a/cypress/integration/submission_spec.js b/cypress/integration/submission_spec.js
index dbd1bd2df6ceb52b2fef2c775d2ddce555a773eb..6e98b5780ae19d36a1e7dc25051e8994f995c7ac 100644
--- a/cypress/integration/submission_spec.js
+++ b/cypress/integration/submission_spec.js
@@ -62,6 +62,20 @@ describe('URL submission test', () => {
         'https://doi.org/10.6084/m9.figshare.913521.v1, https://github.com/jure/mathtype_to_mathml',
       )
 
+    // Supplementary file upload
+    cy.fixture('test-pdf.pdf', 'base64').then(fileContent => {
+      cy.get('[data-testid="dropzone"]').attachFile(
+        'test-pdf.pdf',
+        // {
+        //   fileContent,
+        //   fileName: 'test-pdf.pdf',
+        //   encoding: 'base64',
+        //   mimeType: 'application/pdf',
+        // },
+        { subjectType: 'drag-n-drop' },
+      )
+    })
+
     cy.get('[data-testid="submission.keywords"]')
       .click()
       .type('some, keywords')
@@ -144,7 +158,7 @@ describe('URL submission test', () => {
 
     cy.contains('Control Panel').click()
     cy.contains('This is my data and code availability statement')
-
+    cy.contains('test-pdf.pdf')
     cy.task('dump', 'senior_editor_assigned')
   })
 })
diff --git a/cypress/screenshots/assign_reviewers_spec.js/Editor assigning reviewers -- can assign 3 reviewers (failed).png b/cypress/screenshots/assign_reviewers_spec.js/Editor assigning reviewers -- can assign 3 reviewers (failed).png
new file mode 100644
index 0000000000000000000000000000000000000000..9b353afdeae50e1fb53a41e80f817c0bb682414a
Binary files /dev/null and b/cypress/screenshots/assign_reviewers_spec.js/Editor assigning reviewers -- can assign 3 reviewers (failed).png differ
diff --git a/cypress/screenshots/review_spec.js/Editor assigning reviewers -- can assign 3 reviewers (failed).png b/cypress/screenshots/review_spec.js/Editor assigning reviewers -- can assign 3 reviewers (failed).png
new file mode 100644
index 0000000000000000000000000000000000000000..9b353afdeae50e1fb53a41e80f817c0bb682414a
Binary files /dev/null and b/cypress/screenshots/review_spec.js/Editor assigning reviewers -- can assign 3 reviewers (failed).png differ
diff --git a/cypress/screenshots/submission_spec.js/URL submission test -- can submit a URL and some metadata (failed).png b/cypress/screenshots/submission_spec.js/URL submission test -- can submit a URL and some metadata (failed).png
new file mode 100644
index 0000000000000000000000000000000000000000..c8aa71791004b322002139c08c144aeede81dae5
Binary files /dev/null and b/cypress/screenshots/submission_spec.js/URL submission test -- can submit a URL and some metadata (failed).png differ
diff --git a/cypress/screenshots/submission_spec.js/URL submission test -- senior editor can view the submission (failed).png b/cypress/screenshots/submission_spec.js/URL submission test -- senior editor can view the submission (failed).png
new file mode 100644
index 0000000000000000000000000000000000000000..30f7279081d5979ed210e72d724338a351c71aea
Binary files /dev/null and b/cypress/screenshots/submission_spec.js/URL submission test -- senior editor can view the submission (failed).png differ
diff --git a/cypress/support/commands.js b/cypress/support/commands.js
index 9a0fa26c03700524169b7e4b94de90754412054c..348a2bcb967291476f69008018f2d6a80e0240fa 100644
--- a/cypress/support/commands.js
+++ b/cypress/support/commands.js
@@ -1,3 +1,4 @@
+/* eslint-disable no-undef */
 import 'cypress-file-upload'
 
 // ***********************************************
@@ -27,6 +28,12 @@ import 'cypress-file-upload'
 // Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... })
 
 Cypress.Commands.add('setToken', token => {
-  console.log('Setting token', token)
   localStorage.setItem('token', token)
 })
+
+Cypress.Commands.add('login', name => {
+  cy.task('createToken', name).then(token => {
+    cy.setToken(token)
+    cy.visit('/journal/dashboard')
+  })
+})
diff --git a/cypress/videos/assign_reviewers_spec.js.mp4 b/cypress/videos/assign_reviewers_spec.js.mp4
new file mode 100644
index 0000000000000000000000000000000000000000..865430db176851c5dd640d7fe4c8afea33a5f4fe
Binary files /dev/null and b/cypress/videos/assign_reviewers_spec.js.mp4 differ
diff --git a/cypress/videos/login_spec.js.mp4 b/cypress/videos/login_spec.js.mp4
index 677c7899add35cf4c405c59b7b5be934886774d4..9cef58dbb03a38ca8918a5b39eb7cd1f2572f926 100644
Binary files a/cypress/videos/login_spec.js.mp4 and b/cypress/videos/login_spec.js.mp4 differ
diff --git a/cypress/videos/submission_spec.js.mp4 b/cypress/videos/submission_spec.js.mp4
index c15776f8fd7e373407ac86e60ffcfe1fa103290d..3a89b44d3ff16445320d635b489efa0f5a2fd34f 100644
Binary files a/cypress/videos/submission_spec.js.mp4 and b/cypress/videos/submission_spec.js.mp4 differ