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 xmloption = content;
SET client_min_messages = warning;
SET row_security = off;

--
-- Name: fuzzystrmatch; Type: EXTENSION; Schema: -; Owner: -
--

CREATE EXTENSION IF NOT EXISTS fuzzystrmatch WITH SCHEMA public;


--
-- Name: EXTENSION fuzzystrmatch; Type: COMMENT; Schema: -; Owner: -
--

COMMENT ON EXTENSION fuzzystrmatch IS 'determine similarities and distance between strings';


--
-- Name: pg_trgm; Type: EXTENSION; Schema: -; Owner: -
--

CREATE EXTENSION IF NOT EXISTS pg_trgm WITH SCHEMA public;


--
-- Name: EXTENSION pg_trgm; Type: COMMENT; Schema: -; Owner: -
--

COMMENT ON EXTENSION pg_trgm IS 'text similarity measurement and index searching based on trigrams';


--
-- Name: pg_search_dmetaphone(text); Type: FUNCTION; Schema: public; Owner: -
--

CREATE FUNCTION public.pg_search_dmetaphone(text) RETURNS text
    LANGUAGE sql IMMUTABLE STRICT
    AS $_$
  SELECT array_to_string(ARRAY(SELECT dmetaphone(unnest(regexp_split_to_array($1, E'\\s+')))), ' ')
$_$;


SET default_tablespace = '';

SET default_with_oids = false;

--
-- Name: account_auths; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.account_auths (
    id bigint NOT NULL,
    user_id integer,
    account_id integer,
    role integer DEFAULT 0,
    created_at timestamp(6) without time zone NOT NULL,
    updated_at timestamp(6) without time zone NOT NULL
);


--
-- Name: account_auths_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.account_auths_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: account_auths_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.account_auths_id_seq OWNED BY public.account_auths.id;


--
-- Name: accounts; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.accounts (
    id bigint NOT NULL,
    name character varying,
    slug character varying,
    plan_uid character varying,
    created_at timestamp without time zone NOT NULL,
    updated_at timestamp without time zone NOT NULL
);


--
-- Name: accounts_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.accounts_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: accounts_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.accounts_id_seq OWNED BY public.accounts.id;


--
-- Name: acquired_media_releases; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.acquired_media_releases (
    id bigint NOT NULL,
    project_id bigint,
    contract_template_id bigint,
    locale character varying,
    tagging_status integer DEFAULT 0,
    name character varying,
    person_name_old character varying,
    person_address_street1 character varying,
    person_address_street2 character varying,
    person_address_city character varying,
    person_address_state character varying,
    person_address_zip character varying,
    person_address_country character varying,
    person_phone character varying,
    person_email character varying,
    person_title character varying,
    person_company character varying,
    created_at timestamp without time zone NOT NULL,
    updated_at timestamp without time zone NOT NULL,
    collection_uid character varying,
    territory_old character varying,
    term_old character varying,
    applicable_medium_id bigint,
    applicable_medium_text character varying,
    territory_id bigint,
    territory_text character varying,
    term_id bigint,
    term_text character varying,
    restriction_id bigint,
    restriction_text character varying,
    categories character varying[] DEFAULT '{}'::character varying[],
    person_fax character varying,
    description text,
    person_first_name character varying,
    person_last_name character varying,
    signed_at timestamp without time zone,
    approved_by_user_name text,
    approved_by_user_email text,
    approved_at timestamp without time zone
);


--
-- Name: acquired_media_releases_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.acquired_media_releases_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: acquired_media_releases_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.acquired_media_releases_id_seq OWNED BY public.acquired_media_releases.id;


--
-- Name: action_text_rich_texts; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.action_text_rich_texts (
    id bigint NOT NULL,
    name character varying NOT NULL,
    body text,
    record_type character varying NOT NULL,
    record_id bigint NOT NULL,
    created_at timestamp without time zone NOT NULL,
    updated_at timestamp without time zone NOT NULL
);


--
-- Name: action_text_rich_texts_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.action_text_rich_texts_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: action_text_rich_texts_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.action_text_rich_texts_id_seq OWNED BY public.action_text_rich_texts.id;


--
-- Name: active_storage_attachments; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.active_storage_attachments (
    id bigint NOT NULL,
    name character varying NOT NULL,
    record_type character varying NOT NULL,
    record_id bigint NOT NULL,
    blob_id bigint NOT NULL,
    created_at timestamp without time zone NOT NULL
);


--
-- Name: active_storage_attachments_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.active_storage_attachments_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: active_storage_attachments_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.active_storage_attachments_id_seq OWNED BY public.active_storage_attachments.id;


--
-- Name: active_storage_blobs; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.active_storage_blobs (
    id bigint NOT NULL,
    key character varying NOT NULL,
    filename character varying NOT NULL,
    content_type character varying,
    metadata text,
    byte_size bigint NOT NULL,
    checksum character varying NOT NULL,
    created_at timestamp without time zone NOT NULL
);


--
-- Name: active_storage_blobs_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.active_storage_blobs_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: active_storage_blobs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.active_storage_blobs_id_seq OWNED BY public.active_storage_blobs.id;


--
-- Name: appearance_releases; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.appearance_releases (
    id bigint NOT NULL,
    person_name_old character varying,
    person_address_street1 character varying,
    person_phone character varying,
    project_id bigint,
    created_at timestamp without time zone NOT NULL,
    updated_at timestamp without time zone NOT NULL,
    minor boolean DEFAULT false,
    guardian_address_street1 character varying,
    guardian_name_old character varying,
    guardian_phone character varying,
    person_email character varying,
    locale character varying,
    tagging_status integer DEFAULT 0,
    contract_template_id bigint,
    applicable_medium_id bigint,
    applicable_medium_text text DEFAULT ''::text NOT NULL,
    territory_id bigint,
    territory_text text DEFAULT ''::text NOT NULL,
    term_id bigint,
    term_text text DEFAULT ''::text NOT NULL,
    restriction_id bigint,
    restriction_text text DEFAULT ''::text NOT NULL,
    signed_at timestamp without time zone,
    person_date_of_birth date,
    person_first_name character varying,
    person_last_name character varying,
    guardian_first_name character varying,
    guardian_last_name character varying,
    identifier character varying,
    guardian_email character varying,
    person_address_street2 character varying,
    person_address_city character varying,
    person_address_state character varying,
    person_address_zip character varying,
    person_address_country character varying,
    guardian_address_street2 character varying,
    guardian_address_city character varying,
    guardian_address_state character varying,
    guardian_address_zip character varying,
    guardian_address_country character varying,
    guardian_2_first_name character varying,
    guardian_2_last_name character varying,
    guardian_2_email character varying,
    guardian_2_phone character varying,
    guardian_2_address_street1 character varying,
    guardian_2_address_street2 character varying,
    guardian_2_address_city character varying,
    guardian_2_address_state character varying,
    guardian_2_address_zip character varying,
    guardian_2_address_country character varying,
    approved_by_user_name text,
    approved_by_user_email text,
    approved_at timestamp without time zone
);


--
-- Name: appearance_releases_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.appearance_releases_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: appearance_releases_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.appearance_releases_id_seq OWNED BY public.appearance_releases.id;


--
-- Name: applicable_media; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.applicable_media (
    id bigint NOT NULL,
    label character varying NOT NULL
);


--
-- Name: applicable_media_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.applicable_media_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: applicable_media_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.applicable_media_id_seq OWNED BY public.applicable_media.id;


--
-- Name: ar_internal_metadata; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.ar_internal_metadata (
    key character varying NOT NULL,
    value character varying,
    created_at timestamp(6) without time zone NOT NULL,
    updated_at timestamp(6) without time zone NOT NULL
);


--
-- Name: audio_confirmations; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.audio_confirmations (
    id bigint NOT NULL,
    video_id bigint,
    channel character varying,
    timecode_in character varying,
    timecode_out character varying,
    duration character varying,
    source_file_name character varying,
    clip_name character varying,
    description character varying,
    time_elapsed character varying,
    music_type character varying,
    music_category character varying,
    composer_info character varying,
    publisher_info character varying,
    catalog character varying,
    title character varying,
    created_at timestamp without time zone NOT NULL,
    updated_at timestamp without time zone NOT NULL,
    confirmation_type character varying DEFAULT 'original_music'::character varying NOT NULL,
    edl_type character varying DEFAULT 'all_tracks'::character varying NOT NULL
);


--
-- Name: audio_confirmations_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.audio_confirmations_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: audio_confirmations_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.audio_confirmations_id_seq OWNED BY public.audio_confirmations.id;


--
-- Name: bookmarks; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.bookmarks (
    id bigint NOT NULL,
    video_id bigint,
    time_elapsed character varying,
    created_at timestamp without time zone NOT NULL,
    updated_at timestamp without time zone NOT NULL,
    notes text,
    category integer DEFAULT 0
);


--
-- Name: bookmarks_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.bookmarks_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: bookmarks_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.bookmarks_id_seq OWNED BY public.bookmarks.id;


--
-- Name: broadcast_recordings; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.broadcast_recordings (
    id bigint NOT NULL,
    broadcast_id bigint,
    asset_uid character varying NOT NULL,
    asset_playback_uid character varying NOT NULL,
    file_name character varying NOT NULL,
    created_at timestamp(6) without time zone NOT NULL,
    updated_at timestamp(6) without time zone NOT NULL,
    duration double precision
);


--
-- Name: broadcast_recordings_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.broadcast_recordings_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: broadcast_recordings_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.broadcast_recordings_id_seq OWNED BY public.broadcast_recordings.id;


--
-- Name: broadcasts; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.broadcasts (
    id bigint NOT NULL,
    project_id bigint,
    name character varying,
    status integer DEFAULT 0,
    created_at timestamp(6) without time zone NOT NULL,
    updated_at timestamp(6) without time zone NOT NULL,
    stream_uid character varying,
    stream_key character varying,
    stream_playback_uid character varying,
    token character varying,
    streamer_status integer DEFAULT 0,
    shoot_location_time_zone character varying DEFAULT 'UTC'::character varying,
    full_live_stream_playback_uid character varying
);


--
-- Name: broadcasts_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.broadcasts_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: broadcasts_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.broadcasts_id_seq OWNED BY public.broadcasts.id;


--
-- Name: composers; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.composers (
    id bigint NOT NULL,
    music_release_id bigint,
    name character varying NOT NULL,
    affiliation character varying NOT NULL,
    percentage double precision NOT NULL,
    created_at timestamp without time zone NOT NULL,
    updated_at timestamp without time zone NOT NULL,
    cae_number character varying
);


--
-- Name: composers_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.composers_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: composers_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.composers_id_seq OWNED BY public.composers.id;


--
-- Name: contract_templates; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.contract_templates (
    id bigint NOT NULL,
    project_id bigint,
    name character varying,
    body text,
    guardian_clause text,
    fee_cents bigint DEFAULT 0 NOT NULL,
    fee_currency character varying DEFAULT 'USD'::character varying NOT NULL,
    created_at timestamp without time zone NOT NULL,
    updated_at timestamp without time zone NOT NULL,
    release_type character varying,
    parent_id integer,
    applicable_medium_id bigint,
    applicable_medium_text character varying,
    territory_id bigint,
    territory_text character varying,
    term_id bigint,
    term_text character varying,
    restriction_id bigint,
    restriction_text character varying,
    archived_at timestamp without time zone,
    question_1_text text,
    question_2_text text,
    question_3_text text,
    question_4_text text,
    question_5_text text,
    question_6_text text,
    question_7_text text,
    question_8_text text,
    question_9_text text,
    question_10_text text,
    question_11_text text,
    question_12_text text,
    question_13_text text,
    question_14_text text,
    question_15_text text,
    accessibility integer DEFAULT 0
);


--
-- Name: contract_templates_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.contract_templates_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: contract_templates_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.contract_templates_id_seq OWNED BY public.contract_templates.id;


--
-- Name: directories; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.directories (
    id bigint NOT NULL,
    project_id bigint,
    user_id bigint,
    name character varying NOT NULL,
    category integer DEFAULT 0,
    created_at timestamp(6) without time zone NOT NULL,
    updated_at timestamp(6) without time zone NOT NULL,
    permissions integer DEFAULT 0
);


--
-- Name: directories_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.directories_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: directories_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.directories_id_seq OWNED BY public.directories.id;


--
-- Name: downloads; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.downloads (
    id bigint NOT NULL,
    project_id bigint,
    name character varying,
    release_type character varying,
    created_at timestamp(6) without time zone NOT NULL,
    updated_at timestamp(6) without time zone NOT NULL,
    status integer DEFAULT 0
);


--
-- Name: downloads_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.downloads_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: downloads_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.downloads_id_seq OWNED BY public.downloads.id;


--
-- Name: file_infos; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.file_infos (
    id bigint NOT NULL,
    releasable_id bigint,
    filename character varying NOT NULL,
    content_type character varying,
    byte_size bigint,
    created_at timestamp without time zone NOT NULL,
    updated_at timestamp without time zone NOT NULL,
    releasable_type character varying
);


--
-- Name: file_infos_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.file_infos_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: file_infos_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.file_infos_id_seq OWNED BY public.file_infos.id;


--
-- Name: graphics_elements; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.graphics_elements (
    id bigint NOT NULL,
    video_id bigint,
    text text,
    time_elapsed character varying,
    created_at timestamp without time zone NOT NULL,
    updated_at timestamp without time zone NOT NULL,
    timecode_in character varying,
    timecode_out character varying,
    duration character varying,
    source_file_name character varying,
    clip_name character varying,
    description character varying,
    edl_type character varying,
    channel character varying,
    graphic_type character varying
);


--
-- Name: graphics_elements_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.graphics_elements_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: graphics_elements_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.graphics_elements_id_seq OWNED BY public.graphics_elements.id;


--
-- Name: imports; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.imports (
    id bigint NOT NULL,
    project_id bigint,
    status integer DEFAULT 0,
    created_at timestamp without time zone NOT NULL,
    updated_at timestamp without time zone NOT NULL,
    releasable_type character varying,
    releasable_id bigint
);


--
-- Name: imports_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.imports_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: imports_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.imports_id_seq OWNED BY public.imports.id;


--
-- Name: location_releases; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.location_releases (
    id bigint NOT NULL,
    project_id bigint,
    name character varying,
    address_street1 character varying,
    address_street2 character varying,
    address_city character varying,
    address_state character varying,
    address_zip character varying,
    address_country character varying,
    person_name_old character varying,
    person_address_street1 character varying,
    person_address_street2 character varying,
    person_address_city character varying,
    person_address_state character varying,
    person_address_zip character varying,
    person_address_country character varying,
    person_phone character varying,
    person_email character varying,
    person_title character varying,
    person_company character varying,
    created_at timestamp without time zone NOT NULL,
    updated_at timestamp without time zone NOT NULL,
    tagging_status integer DEFAULT 0,
    locale character varying,
    contract_template_id bigint,
    applicable_medium_id bigint,
    applicable_medium_text character varying,
    territory_id bigint,
    territory_text character varying,
    term_id bigint,
    term_text character varying,
    restriction_id bigint,
    restriction_text character varying,
    signed_at timestamp without time zone,
    filming_started_on date,
    filming_ended_on date,
    person_first_name character varying,
    person_last_name character varying,
    filming_hours text,
    approved_by_user_name text,
    approved_by_user_email text,
    approved_at timestamp without time zone,
    amendment_signer_name character varying
);


--
-- Name: location_releases_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.location_releases_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: location_releases_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.location_releases_id_seq OWNED BY public.location_releases.id;


--
-- Name: matching_requests; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.matching_requests (
    id bigint NOT NULL,
    project_id bigint,
    created_at timestamp(6) without time zone NOT NULL,
    updated_at timestamp(6) without time zone NOT NULL
);


--
-- Name: matching_requests_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.matching_requests_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: matching_requests_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.matching_requests_id_seq OWNED BY public.matching_requests.id;


--
-- Name: material_releases; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.material_releases (
    id bigint NOT NULL,
    project_id bigint,
    name character varying,
    person_name_old character varying,
    person_address_street1 character varying,
    person_address_street2 character varying,
    person_address_city character varying,
    person_address_state character varying,
    person_address_zip character varying,
    person_address_country character varying,
    person_phone character varying,
    person_email character varying,
    person_title character varying,
    person_company character varying,
    created_at timestamp without time zone NOT NULL,
    updated_at timestamp without time zone NOT NULL,
    tagging_status integer DEFAULT 0,
    contract_template_id bigint,
    locale character varying,
    applicable_medium_id bigint,
    applicable_medium_text character varying,
    territory_id bigint,
    territory_text character varying,
    term_id bigint,
    term_text character varying,
    restriction_id bigint,
    restriction_text character varying,
    signed_at timestamp without time zone,
    description text,
    person_first_name character varying,
    person_last_name character varying,
    approved_by_user_name text,
    approved_by_user_email text,
    approved_at timestamp without time zone,
    minor boolean DEFAULT false,
    guardian_first_name character varying,
    guardian_last_name character varying,
    guardian_email character varying,
    guardian_phone character varying,
    guardian_address_street1 character varying,
    guardian_address_street2 character varying,
    guardian_address_city character varying,
    guardian_address_state character varying,
    guardian_address_zip character varying,
    guardian_address_country character varying,
    guardian_2_first_name character varying,
    guardian_2_last_name character varying,
    guardian_2_email character varying,
    guardian_2_phone character varying,
    guardian_2_address_street1 character varying,
    guardian_2_address_street2 character varying,
    guardian_2_address_city character varying,
    guardian_2_address_state character varying,
    guardian_2_address_zip character varying,
    guardian_2_address_country character varying
);


--
-- Name: material_releases_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.material_releases_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: material_releases_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.material_releases_id_seq OWNED BY public.material_releases.id;


--
-- Name: medical_releases; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.medical_releases (
    id bigint NOT NULL,
    project_id bigint,
    contract_template_id bigint,
    person_first_name character varying,
    person_last_name character varying,
    person_address_street1 character varying,
    person_address_street2 character varying,
    person_address_city character varying,
    person_address_state character varying,
    person_address_zip character varying,
    person_address_country character varying,
    person_phone character varying,
    person_email character varying,
    locale character varying,
    notes text,
    signed_at timestamp without time zone,
    created_at timestamp(6) without time zone NOT NULL,
    updated_at timestamp(6) without time zone NOT NULL,
    question_1_answer text,
    question_2_answer text,
    question_3_answer text,
    question_4_answer text,
    question_5_answer text,
    question_6_answer text,
    question_7_answer text,
    question_8_answer text,
    question_9_answer text,
    question_10_answer text,
    question_11_answer text,
    question_12_answer text,
    question_13_answer text,
    question_14_answer text,
    question_15_answer text,
    minor boolean DEFAULT false,
    guardian_first_name character varying,
    guardian_last_name character varying,
    guardian_email character varying,
    guardian_phone character varying,
    guardian_address_street1 character varying,
    guardian_address_street2 character varying,
    guardian_address_city character varying,
    guardian_address_state character varying,
    guardian_address_zip character varying,
    guardian_address_country character varying,
    guardian_2_first_name character varying,
    guardian_2_last_name character varying,
    guardian_2_email character varying,
    guardian_2_phone character varying,
    guardian_2_address_street1 character varying,
    guardian_2_address_street2 character varying,
    guardian_2_address_city character varying,
    guardian_2_address_state character varying,
    guardian_2_address_zip character varying,
    guardian_2_address_country character varying,
    approved_by_user_name text,
    approved_by_user_email text,
    approved_at timestamp without time zone
);


--
-- Name: medical_releases_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.medical_releases_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: medical_releases_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.medical_releases_id_seq OWNED BY public.medical_releases.id;


--
-- Name: misc_releases; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.misc_releases (
    id bigint NOT NULL,
    project_id bigint,
    contract_template_id bigint,
    person_first_name character varying,
    person_last_name character varying,
    person_address_street1 character varying,
    person_address_street2 character varying,
    person_address_city character varying,
    person_address_state character varying,
    person_address_zip character varying,
    person_address_country character varying,
    person_phone character varying,
    person_email character varying,
    guardian_first_name character varying,
    guardian_last_name character varying,
    guardian_address_street1 character varying,
    guardian_address_street2 character varying,
    guardian_address_city character varying,
    guardian_address_state character varying,
    guardian_address_zip character varying,
    guardian_address_country character varying,
    guardian_phone character varying,
    guardian_email character varying,
    locale character varying,
    notes text,
    signed_at timestamp without time zone,
    minor boolean DEFAULT false,
    created_at timestamp(6) without time zone NOT NULL,
    updated_at timestamp(6) without time zone NOT NULL,
    question_1_answer text,
    question_2_answer text,
    question_3_answer text,
    question_4_answer text,
    question_5_answer text,
    question_6_answer text,
    question_7_answer text,
    question_8_answer text,
    question_9_answer text,
    question_10_answer text,
    question_11_answer text,
    question_12_answer text,
    question_13_answer text,
    question_14_answer text,
    question_15_answer text,
    approved_by_user_name text,
    approved_by_user_email text,
    approved_at timestamp without time zone
);


--
-- Name: misc_releases_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.misc_releases_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: misc_releases_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.misc_releases_id_seq OWNED BY public.misc_releases.id;


--
-- Name: music_releases; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.music_releases (
    id bigint NOT NULL,
    project_id bigint,
    contract_template_id bigint,
    locale character varying,
    tagging_status integer DEFAULT 0,
    name character varying,
    person_name_old character varying,
    person_address_street1 character varying,
    person_address_street2 character varying,
    person_address_city character varying,
    person_address_state character varying,
    person_address_zip character varying,
    person_address_country character varying,
    person_phone character varying,
    person_email character varying,
    person_title character varying,
    person_company character varying,
    created_at timestamp without time zone NOT NULL,
    updated_at timestamp without time zone NOT NULL,
    applicable_medium_id bigint,
    applicable_medium_text character varying,
    territory_id bigint,
    territory_text character varying,
    term_id bigint,
    term_text character varying,
    restriction_id bigint,
    restriction_text character varying,
    person_first_name character varying,
    person_last_name character varying,
    approved_by_user_name text,
    approved_by_user_email text,
    approved_at timestamp without time zone
);


--
-- Name: music_releases_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.music_releases_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: music_releases_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.music_releases_id_seq OWNED BY public.music_releases.id;


--
-- Name: notes; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.notes (
    id bigint NOT NULL,
    user_id bigint NOT NULL,
    notable_type character varying NOT NULL,
    notable_id bigint NOT NULL,
    content text,
    created_at timestamp(6) without time zone NOT NULL,
    updated_at timestamp(6) without time zone NOT NULL,
    email character varying
);


--
-- Name: notes_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.notes_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: notes_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.notes_id_seq OWNED BY public.notes.id;


--
-- Name: project_memberships; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.project_memberships (
    id bigint NOT NULL,
    project_id bigint NOT NULL,
    user_id bigint NOT NULL,
    created_at timestamp(6) without time zone NOT NULL,
    updated_at timestamp(6) without time zone NOT NULL
);


--
-- Name: project_memberships_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.project_memberships_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: project_memberships_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.project_memberships_id_seq OWNED BY public.project_memberships.id;


--
-- Name: projects; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.projects (
    id bigint NOT NULL,
    name character varying NOT NULL,
    client_name character varying,
    producer_name character varying,
    producer_address character varying,
    description text,
    details text,
    created_at timestamp without time zone NOT NULL,
    updated_at timestamp without time zone NOT NULL,
    sample boolean DEFAULT false,
    headshot_collection_uid character varying,
    account_id bigint
);


--
-- Name: projects_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.projects_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: projects_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.projects_id_seq OWNED BY public.projects.id;


--
-- Name: publishers; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.publishers (
    id bigint NOT NULL,
    music_release_id bigint,
    name character varying NOT NULL,
    affiliation character varying NOT NULL,
    percentage double precision NOT NULL,
    created_at timestamp without time zone NOT NULL,
    updated_at timestamp without time zone NOT NULL
);


--
-- Name: publishers_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.publishers_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: publishers_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.publishers_id_seq OWNED BY public.publishers.id;


--
-- Name: restrictions; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.restrictions (
    id bigint NOT NULL,
    label character varying NOT NULL
);


--
-- Name: restrictions_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.restrictions_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: restrictions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.restrictions_id_seq OWNED BY public.restrictions.id;


--
-- Name: schema_migrations; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.schema_migrations (
    version character varying NOT NULL
);


--
-- Name: settings; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.settings (
    id integer NOT NULL,
    var character varying NOT NULL,
    value text,
    target_type character varying NOT NULL,
    target_id integer NOT NULL,
    created_at timestamp without time zone,
    updated_at timestamp without time zone
);


--
-- Name: settings_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.settings_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: settings_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.settings_id_seq OWNED BY public.settings.id;


--
-- Name: taggings; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.taggings (
    id integer NOT NULL,
    tag_id integer,
    taggable_type character varying,
    taggable_id integer,
    tagger_type character varying,
    tagger_id integer,
    context character varying(128),
    created_at timestamp without time zone
);


--
-- Name: taggings_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.taggings_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: taggings_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.taggings_id_seq OWNED BY public.taggings.id;


--
-- Name: tags; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.tags (
    id integer NOT NULL,
    name character varying,
    taggings_count integer DEFAULT 0
);


--
-- Name: tags_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.tags_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: tags_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.tags_id_seq OWNED BY public.tags.id;


--
-- Name: talent_releases; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.talent_releases (
    id bigint NOT NULL,
    project_id bigint,
    contract_template_id bigint,
    person_name_old character varying,
    person_address_street1 character varying,
    person_address_street2 character varying,
    person_address_city character varying,
    person_address_state character varying,
    person_address_zip character varying,
    person_address_country character varying,
    person_phone character varying,
    person_email character varying,
    guardian_name_old character varying,
    guardian_address_street1 character varying,
    guardian_address_street2 character varying,
    guardian_address_city character varying,
    guardian_address_state character varying,
    guardian_address_zip character varying,
    guardian_address_country character varying,
    guardian_phone character varying,
    guardian_email character varying,
    minor boolean DEFAULT false,
    locale character varying,
    created_at timestamp without time zone NOT NULL,
    updated_at timestamp without time zone NOT NULL,
    tagging_status integer DEFAULT 0,
    applicable_medium_id bigint,
    applicable_medium_text character varying,
    territory_id bigint,
    territory_text character varying,
    term_id bigint,
    term_text character varying,
    restriction_id bigint,
    restriction_text character varying,
    signed_at timestamp without time zone,
    person_first_name character varying,
    person_last_name character varying,
    guardian_first_name character varying,
    guardian_last_name character varying,
    guardian_2_first_name character varying,
    guardian_2_last_name character varying,
    guardian_2_email character varying,
    guardian_2_phone character varying,
    guardian_2_address_street1 character varying,
    guardian_2_address_street2 character varying,
    guardian_2_address_city character varying,
    guardian_2_address_state character varying,
    guardian_2_address_zip character varying,
    guardian_2_address_country character varying,
    approved_by_user_name text,
    approved_by_user_email text,
    approved_at timestamp without time zone
);


--
-- Name: talent_releases_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.talent_releases_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: talent_releases_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.talent_releases_id_seq OWNED BY public.talent_releases.id;


--
-- Name: task_requests; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.task_requests (
    id bigint NOT NULL,
    project_id bigint,
    description text,
    deadline timestamp without time zone,
    time_allowed character varying,
    additional_notes text,
    status integer DEFAULT 0,
    created_at timestamp(6) without time zone NOT NULL,
    updated_at timestamp(6) without time zone NOT NULL,
    deliverable_url character varying,
    user_email character varying
);


--
-- Name: task_requests_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.task_requests_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: task_requests_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.task_requests_id_seq OWNED BY public.task_requests.id;


--
-- Name: terms; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.terms (
    id bigint NOT NULL,
    label character varying NOT NULL
);


--
-- Name: terms_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.terms_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: terms_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.terms_id_seq OWNED BY public.terms.id;


--
-- Name: territories; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.territories (
    id bigint NOT NULL,
    label character varying NOT NULL
);


--
-- Name: territories_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.territories_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: territories_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.territories_id_seq OWNED BY public.territories.id;


--
-- Name: unreleased_appearances; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.unreleased_appearances (
    id bigint NOT NULL,
    video_id bigint,
    time_elapsed character varying,
    created_at timestamp without time zone NOT NULL,
    updated_at timestamp without time zone NOT NULL,
    notes text,
    timecode_in character varying,
    timecode_out character varying,
    duration character varying,
    source_file_name character varying,
    clip_name character varying,
    description character varying,
    channel character varying,
    note_category integer DEFAULT 0 NOT NULL
);


--
-- Name: unreleased_appearances_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.unreleased_appearances_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: unreleased_appearances_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.unreleased_appearances_id_seq OWNED BY public.unreleased_appearances.id;


--
-- Name: users; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.users (
    id bigint NOT NULL,
    email character varying NOT NULL,
    password_digest character varying NOT NULL,
    created_at timestamp without time zone NOT NULL,
    updated_at timestamp without time zone NOT NULL,
    admin boolean DEFAULT false,
    account_id_old bigint,
    password_reset_token character varying,
    role_old integer DEFAULT 0,
    remember_created_at timestamp without time zone,
    first_name character varying,
    last_name character varying,
    time_zone character varying DEFAULT 'UTC'::character varying NOT NULL
);


--
-- Name: users_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.users_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.users_id_seq OWNED BY public.users.id;


--
-- Name: video_release_confirmations; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.video_release_confirmations (
    id bigint NOT NULL,
    video_id bigint,
    releasable_id bigint,
    created_at timestamp without time zone NOT NULL,
    updated_at timestamp without time zone NOT NULL,
    time_elapsed character varying,
    releasable_type character varying,
    file_info_id bigint,
    timecode_in character varying,
    timecode_out character varying,
    duration character varying,
    source_file_name character varying,
    clip_name character varying,
    description character varying,
    channel character varying
);


--
-- Name: video_release_confirmations_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.video_release_confirmations_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: video_release_confirmations_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.video_release_confirmations_id_seq OWNED BY public.video_release_confirmations.id;


--
-- Name: videos; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.videos (
    id bigint NOT NULL,
    project_id bigint,
    created_at timestamp without time zone NOT NULL,
    updated_at timestamp without time zone NOT NULL,
    analysis_uid character varying,
    analysis_status integer DEFAULT 0,
    analysis_started_at timestamp without time zone,
    name character varying,
    number character varying,
    report_published_at timestamp without time zone,
    edl_timecode_start character varying,
    video_editing_system integer DEFAULT 0 NOT NULL,
    audio_analysis_started_at timestamp without time zone,
    audio_analysis_status integer DEFAULT 0,
    audio_analysis_uid character varying
);


--
-- Name: videos_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.videos_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: videos_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.videos_id_seq OWNED BY public.videos.id;


--
-- Name: zoom_meetings; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.zoom_meetings (
    id bigint NOT NULL,
    api_meeting_id character varying,
    created_at timestamp(6) without time zone NOT NULL,
    updated_at timestamp(6) without time zone NOT NULL,
    zoom_user_id bigint,
    project_id bigint,
    status integer DEFAULT 0
);


--
-- Name: zoom_meetings_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.zoom_meetings_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: zoom_meetings_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.zoom_meetings_id_seq OWNED BY public.zoom_meetings.id;


--
-- Name: zoom_users; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.zoom_users (
    id bigint NOT NULL,
    api_id character varying,
    created_at timestamp(6) without time zone NOT NULL,
    updated_at timestamp(6) without time zone NOT NULL,
    account_number character varying,
    tier integer DEFAULT 0
);


--
-- Name: zoom_users_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.zoom_users_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: zoom_users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.zoom_users_id_seq OWNED BY public.zoom_users.id;


--
-- Name: account_auths id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.account_auths ALTER COLUMN id SET DEFAULT nextval('public.account_auths_id_seq'::regclass);


--
-- Name: accounts id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.accounts ALTER COLUMN id SET DEFAULT nextval('public.accounts_id_seq'::regclass);


--
-- Name: acquired_media_releases id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.acquired_media_releases ALTER COLUMN id SET DEFAULT nextval('public.acquired_media_releases_id_seq'::regclass);


--
-- Name: action_text_rich_texts id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.action_text_rich_texts ALTER COLUMN id SET DEFAULT nextval('public.action_text_rich_texts_id_seq'::regclass);


--
-- Name: active_storage_attachments id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.active_storage_attachments ALTER COLUMN id SET DEFAULT nextval('public.active_storage_attachments_id_seq'::regclass);


--
-- Name: active_storage_blobs id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.active_storage_blobs ALTER COLUMN id SET DEFAULT nextval('public.active_storage_blobs_id_seq'::regclass);


--
-- Name: appearance_releases id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.appearance_releases ALTER COLUMN id SET DEFAULT nextval('public.appearance_releases_id_seq'::regclass);


--
-- Name: applicable_media id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.applicable_media ALTER COLUMN id SET DEFAULT nextval('public.applicable_media_id_seq'::regclass);


--
-- Name: audio_confirmations id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.audio_confirmations ALTER COLUMN id SET DEFAULT nextval('public.audio_confirmations_id_seq'::regclass);


--
-- Name: bookmarks id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.bookmarks ALTER COLUMN id SET DEFAULT nextval('public.bookmarks_id_seq'::regclass);


--
-- Name: broadcast_recordings id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.broadcast_recordings ALTER COLUMN id SET DEFAULT nextval('public.broadcast_recordings_id_seq'::regclass);


--
-- Name: broadcasts id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.broadcasts ALTER COLUMN id SET DEFAULT nextval('public.broadcasts_id_seq'::regclass);


--
-- Name: composers id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.composers ALTER COLUMN id SET DEFAULT nextval('public.composers_id_seq'::regclass);


--
-- Name: contract_templates id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.contract_templates ALTER COLUMN id SET DEFAULT nextval('public.contract_templates_id_seq'::regclass);


--
-- Name: directories id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.directories ALTER COLUMN id SET DEFAULT nextval('public.directories_id_seq'::regclass);


--
-- Name: downloads id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.downloads ALTER COLUMN id SET DEFAULT nextval('public.downloads_id_seq'::regclass);


--
-- Name: file_infos id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.file_infos ALTER COLUMN id SET DEFAULT nextval('public.file_infos_id_seq'::regclass);


--
-- Name: graphics_elements id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.graphics_elements ALTER COLUMN id SET DEFAULT nextval('public.graphics_elements_id_seq'::regclass);


--
-- Name: imports id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.imports ALTER COLUMN id SET DEFAULT nextval('public.imports_id_seq'::regclass);


--
-- Name: location_releases id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.location_releases ALTER COLUMN id SET DEFAULT nextval('public.location_releases_id_seq'::regclass);


--
-- Name: matching_requests id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.matching_requests ALTER COLUMN id SET DEFAULT nextval('public.matching_requests_id_seq'::regclass);


--
-- Name: material_releases id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.material_releases ALTER COLUMN id SET DEFAULT nextval('public.material_releases_id_seq'::regclass);


--
-- Name: medical_releases id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.medical_releases ALTER COLUMN id SET DEFAULT nextval('public.medical_releases_id_seq'::regclass);


--
-- Name: misc_releases id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.misc_releases ALTER COLUMN id SET DEFAULT nextval('public.misc_releases_id_seq'::regclass);


--
-- Name: music_releases id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.music_releases ALTER COLUMN id SET DEFAULT nextval('public.music_releases_id_seq'::regclass);


--
-- Name: notes id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.notes ALTER COLUMN id SET DEFAULT nextval('public.notes_id_seq'::regclass);


--
-- Name: project_memberships id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.project_memberships ALTER COLUMN id SET DEFAULT nextval('public.project_memberships_id_seq'::regclass);


--
-- Name: projects id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.projects ALTER COLUMN id SET DEFAULT nextval('public.projects_id_seq'::regclass);


--
-- Name: publishers id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.publishers ALTER COLUMN id SET DEFAULT nextval('public.publishers_id_seq'::regclass);


--
-- Name: restrictions id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.restrictions ALTER COLUMN id SET DEFAULT nextval('public.restrictions_id_seq'::regclass);


--
-- Name: settings id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.settings ALTER COLUMN id SET DEFAULT nextval('public.settings_id_seq'::regclass);


--
-- Name: taggings id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.taggings ALTER COLUMN id SET DEFAULT nextval('public.taggings_id_seq'::regclass);


--
-- Name: tags id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.tags ALTER COLUMN id SET DEFAULT nextval('public.tags_id_seq'::regclass);


--
-- Name: talent_releases id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.talent_releases ALTER COLUMN id SET DEFAULT nextval('public.talent_releases_id_seq'::regclass);


--
-- Name: task_requests id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.task_requests ALTER COLUMN id SET DEFAULT nextval('public.task_requests_id_seq'::regclass);


--
-- Name: terms id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.terms ALTER COLUMN id SET DEFAULT nextval('public.terms_id_seq'::regclass);


--
-- Name: territories id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.territories ALTER COLUMN id SET DEFAULT nextval('public.territories_id_seq'::regclass);


--
-- Name: unreleased_appearances id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.unreleased_appearances ALTER COLUMN id SET DEFAULT nextval('public.unreleased_appearances_id_seq'::regclass);


--
-- Name: users id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.users ALTER COLUMN id SET DEFAULT nextval('public.users_id_seq'::regclass);


--
-- Name: video_release_confirmations id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.video_release_confirmations ALTER COLUMN id SET DEFAULT nextval('public.video_release_confirmations_id_seq'::regclass);


--
-- Name: videos id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.videos ALTER COLUMN id SET DEFAULT nextval('public.videos_id_seq'::regclass);


--
-- Name: zoom_meetings id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.zoom_meetings ALTER COLUMN id SET DEFAULT nextval('public.zoom_meetings_id_seq'::regclass);


--
-- Name: zoom_users id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.zoom_users ALTER COLUMN id SET DEFAULT nextval('public.zoom_users_id_seq'::regclass);


--
-- Name: account_auths account_auths_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.account_auths
    ADD CONSTRAINT account_auths_pkey PRIMARY KEY (id);


--
-- Name: accounts accounts_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.accounts
    ADD CONSTRAINT accounts_pkey PRIMARY KEY (id);


--
-- Name: acquired_media_releases acquired_media_releases_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.acquired_media_releases
    ADD CONSTRAINT acquired_media_releases_pkey PRIMARY KEY (id);


--
-- Name: action_text_rich_texts action_text_rich_texts_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.action_text_rich_texts
    ADD CONSTRAINT action_text_rich_texts_pkey PRIMARY KEY (id);


--
-- Name: active_storage_attachments active_storage_attachments_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.active_storage_attachments
    ADD CONSTRAINT active_storage_attachments_pkey PRIMARY KEY (id);


--
-- Name: active_storage_blobs active_storage_blobs_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.active_storage_blobs
    ADD CONSTRAINT active_storage_blobs_pkey PRIMARY KEY (id);


--
-- Name: appearance_releases appearance_releases_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.appearance_releases
    ADD CONSTRAINT appearance_releases_pkey PRIMARY KEY (id);


--
-- Name: applicable_media applicable_media_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.applicable_media
    ADD CONSTRAINT applicable_media_pkey PRIMARY KEY (id);


--
-- Name: ar_internal_metadata ar_internal_metadata_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.ar_internal_metadata
    ADD CONSTRAINT ar_internal_metadata_pkey PRIMARY KEY (key);


--
-- Name: audio_confirmations audio_confirmations_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.audio_confirmations
    ADD CONSTRAINT audio_confirmations_pkey PRIMARY KEY (id);


--
-- Name: bookmarks bookmarks_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.bookmarks
    ADD CONSTRAINT bookmarks_pkey PRIMARY KEY (id);


--
-- Name: broadcast_recordings broadcast_recordings_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.broadcast_recordings
    ADD CONSTRAINT broadcast_recordings_pkey PRIMARY KEY (id);


--
-- Name: broadcasts broadcasts_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.broadcasts
    ADD CONSTRAINT broadcasts_pkey PRIMARY KEY (id);


--
-- Name: composers composers_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.composers
    ADD CONSTRAINT composers_pkey PRIMARY KEY (id);


--
-- Name: contract_templates contract_templates_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.contract_templates
    ADD CONSTRAINT contract_templates_pkey PRIMARY KEY (id);


--
-- Name: directories directories_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.directories
    ADD CONSTRAINT directories_pkey PRIMARY KEY (id);


--
-- Name: downloads downloads_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.downloads
    ADD CONSTRAINT downloads_pkey PRIMARY KEY (id);


--
-- Name: file_infos file_infos_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.file_infos
    ADD CONSTRAINT file_infos_pkey PRIMARY KEY (id);


--
-- Name: graphics_elements graphics_elements_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.graphics_elements
    ADD CONSTRAINT graphics_elements_pkey PRIMARY KEY (id);


--
-- Name: imports imports_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.imports
    ADD CONSTRAINT imports_pkey PRIMARY KEY (id);


--
-- Name: location_releases location_releases_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.location_releases
    ADD CONSTRAINT location_releases_pkey PRIMARY KEY (id);


--
-- Name: matching_requests matching_requests_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.matching_requests
    ADD CONSTRAINT matching_requests_pkey PRIMARY KEY (id);


--
-- Name: material_releases material_releases_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.material_releases
    ADD CONSTRAINT material_releases_pkey PRIMARY KEY (id);


--
-- Name: medical_releases medical_releases_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.medical_releases
    ADD CONSTRAINT medical_releases_pkey PRIMARY KEY (id);


--
-- Name: misc_releases misc_releases_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.misc_releases
    ADD CONSTRAINT misc_releases_pkey PRIMARY KEY (id);


--
-- Name: music_releases music_releases_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.music_releases
    ADD CONSTRAINT music_releases_pkey PRIMARY KEY (id);


--
-- Name: notes notes_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.notes
    ADD CONSTRAINT notes_pkey PRIMARY KEY (id);


--
-- Name: project_memberships project_memberships_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.project_memberships
    ADD CONSTRAINT project_memberships_pkey PRIMARY KEY (id);


--
-- Name: projects projects_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.projects
    ADD CONSTRAINT projects_pkey PRIMARY KEY (id);


--
-- Name: publishers publishers_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.publishers
    ADD CONSTRAINT publishers_pkey PRIMARY KEY (id);


--
-- Name: restrictions restrictions_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.restrictions
    ADD CONSTRAINT restrictions_pkey PRIMARY KEY (id);


--
-- Name: schema_migrations schema_migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.schema_migrations
    ADD CONSTRAINT schema_migrations_pkey PRIMARY KEY (version);


--
-- Name: settings settings_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.settings
    ADD CONSTRAINT settings_pkey PRIMARY KEY (id);


--
-- Name: taggings taggings_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.taggings
    ADD CONSTRAINT taggings_pkey PRIMARY KEY (id);


--
-- Name: tags tags_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.tags
    ADD CONSTRAINT tags_pkey PRIMARY KEY (id);


--
-- Name: talent_releases talent_releases_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.talent_releases
    ADD CONSTRAINT talent_releases_pkey PRIMARY KEY (id);


--
-- Name: task_requests task_requests_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.task_requests
    ADD CONSTRAINT task_requests_pkey PRIMARY KEY (id);


--
-- Name: terms terms_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.terms
    ADD CONSTRAINT terms_pkey PRIMARY KEY (id);


--
-- Name: territories territories_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.territories
    ADD CONSTRAINT territories_pkey PRIMARY KEY (id);


--
-- Name: unreleased_appearances unreleased_appearances_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.unreleased_appearances
    ADD CONSTRAINT unreleased_appearances_pkey PRIMARY KEY (id);


--
-- Name: users users_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.users
    ADD CONSTRAINT users_pkey PRIMARY KEY (id);


--
-- Name: video_release_confirmations video_release_confirmations_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.video_release_confirmations
    ADD CONSTRAINT video_release_confirmations_pkey PRIMARY KEY (id);


--
-- Name: videos videos_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.videos
    ADD CONSTRAINT videos_pkey PRIMARY KEY (id);


--
-- Name: zoom_meetings zoom_meetings_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.zoom_meetings
    ADD CONSTRAINT zoom_meetings_pkey PRIMARY KEY (id);


--
-- Name: zoom_users zoom_users_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.zoom_users
    ADD CONSTRAINT zoom_users_pkey PRIMARY KEY (id);


--
-- Name: index_accounts_on_slug; Type: INDEX; Schema: public; Owner: -
--

CREATE UNIQUE INDEX index_accounts_on_slug ON public.accounts USING btree (slug);


--
-- Name: index_acquired_media_releases_on_applicable_medium_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_acquired_media_releases_on_applicable_medium_id ON public.acquired_media_releases USING btree (applicable_medium_id);


--
-- Name: index_acquired_media_releases_on_contract_template_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_acquired_media_releases_on_contract_template_id ON public.acquired_media_releases USING btree (contract_template_id);


--
-- Name: index_acquired_media_releases_on_project_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_acquired_media_releases_on_project_id ON public.acquired_media_releases USING btree (project_id);


--
-- Name: index_acquired_media_releases_on_restriction_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_acquired_media_releases_on_restriction_id ON public.acquired_media_releases USING btree (restriction_id);


--
-- Name: index_acquired_media_releases_on_term_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_acquired_media_releases_on_term_id ON public.acquired_media_releases USING btree (term_id);


--
-- Name: index_acquired_media_releases_on_territory_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_acquired_media_releases_on_territory_id ON public.acquired_media_releases USING btree (territory_id);


--
-- Name: index_action_text_rich_texts_uniqueness; Type: INDEX; Schema: public; Owner: -
--

CREATE UNIQUE INDEX index_action_text_rich_texts_uniqueness ON public.action_text_rich_texts USING btree (record_type, record_id, name);


--
-- Name: index_active_storage_attachments_on_blob_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_active_storage_attachments_on_blob_id ON public.active_storage_attachments USING btree (blob_id);


--
-- Name: index_active_storage_attachments_uniqueness; Type: INDEX; Schema: public; Owner: -
--

CREATE UNIQUE INDEX index_active_storage_attachments_uniqueness ON public.active_storage_attachments USING btree (record_type, record_id, name, blob_id);


--
-- Name: index_active_storage_blobs_on_key; Type: INDEX; Schema: public; Owner: -
--

CREATE UNIQUE INDEX index_active_storage_blobs_on_key ON public.active_storage_blobs USING btree (key);


--
-- Name: index_appearance_releases_on_applicable_medium_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_appearance_releases_on_applicable_medium_id ON public.appearance_releases USING btree (applicable_medium_id);


--
-- Name: index_appearance_releases_on_contract_template_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_appearance_releases_on_contract_template_id ON public.appearance_releases USING btree (contract_template_id);


--
-- Name: index_appearance_releases_on_project_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_appearance_releases_on_project_id ON public.appearance_releases USING btree (project_id);


--
-- Name: index_appearance_releases_on_restriction_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_appearance_releases_on_restriction_id ON public.appearance_releases USING btree (restriction_id);


--
-- Name: index_appearance_releases_on_term_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_appearance_releases_on_term_id ON public.appearance_releases USING btree (term_id);


--
-- Name: index_appearance_releases_on_territory_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_appearance_releases_on_territory_id ON public.appearance_releases USING btree (territory_id);


--
-- Name: index_audio_confirmations_on_video_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_audio_confirmations_on_video_id ON public.audio_confirmations USING btree (video_id);


--
-- Name: index_bookmarks_on_video_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_bookmarks_on_video_id ON public.bookmarks USING btree (video_id);


--
-- Name: index_broadcast_recordings_on_asset_uid; Type: INDEX; Schema: public; Owner: -
--

CREATE UNIQUE INDEX index_broadcast_recordings_on_asset_uid ON public.broadcast_recordings USING btree (asset_uid);


--
-- Name: index_broadcast_recordings_on_broadcast_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_broadcast_recordings_on_broadcast_id ON public.broadcast_recordings USING btree (broadcast_id);


--
-- Name: index_broadcasts_on_project_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_broadcasts_on_project_id ON public.broadcasts USING btree (project_id);


--
-- Name: index_broadcasts_on_token; Type: INDEX; Schema: public; Owner: -
--

CREATE UNIQUE INDEX index_broadcasts_on_token ON public.broadcasts USING btree (token);


--
-- Name: index_composers_on_music_release_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_composers_on_music_release_id ON public.composers USING btree (music_release_id);


--
-- Name: index_contract_templates_on_applicable_medium_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_contract_templates_on_applicable_medium_id ON public.contract_templates USING btree (applicable_medium_id);


--
-- Name: index_contract_templates_on_project_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_contract_templates_on_project_id ON public.contract_templates USING btree (project_id);


--
-- Name: index_contract_templates_on_restriction_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_contract_templates_on_restriction_id ON public.contract_templates USING btree (restriction_id);


--
-- Name: index_contract_templates_on_term_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_contract_templates_on_term_id ON public.contract_templates USING btree (term_id);


--
-- Name: index_contract_templates_on_territory_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_contract_templates_on_territory_id ON public.contract_templates USING btree (territory_id);


--
-- Name: index_directories_on_project_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_directories_on_project_id ON public.directories USING btree (project_id);


--
-- Name: index_directories_on_user_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_directories_on_user_id ON public.directories USING btree (user_id);


--
-- Name: index_downloads_on_project_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_downloads_on_project_id ON public.downloads USING btree (project_id);


--
-- Name: index_file_infos_on_releasable_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_file_infos_on_releasable_id ON public.file_infos USING btree (releasable_id);


--
-- Name: index_file_infos_on_releasable_id_and_type; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_file_infos_on_releasable_id_and_type ON public.file_infos USING btree (releasable_id, releasable_type);


--
-- Name: index_graphics_elements_on_video_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_graphics_elements_on_video_id ON public.graphics_elements USING btree (video_id);


--
-- Name: index_imports_on_project_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_imports_on_project_id ON public.imports USING btree (project_id);


--
-- Name: index_imports_on_releasable_type_and_releasable_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_imports_on_releasable_type_and_releasable_id ON public.imports USING btree (releasable_type, releasable_id);


--
-- Name: index_location_releases_on_applicable_medium_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_location_releases_on_applicable_medium_id ON public.location_releases USING btree (applicable_medium_id);


--
-- Name: index_location_releases_on_contract_template_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_location_releases_on_contract_template_id ON public.location_releases USING btree (contract_template_id);


--
-- Name: index_location_releases_on_project_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_location_releases_on_project_id ON public.location_releases USING btree (project_id);


--
-- Name: index_location_releases_on_restriction_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_location_releases_on_restriction_id ON public.location_releases USING btree (restriction_id);


--
-- Name: index_location_releases_on_term_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_location_releases_on_term_id ON public.location_releases USING btree (term_id);


--
-- Name: index_location_releases_on_territory_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_location_releases_on_territory_id ON public.location_releases USING btree (territory_id);


--
-- Name: index_matching_requests_on_project_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_matching_requests_on_project_id ON public.matching_requests USING btree (project_id);


--
-- Name: index_material_releases_on_applicable_medium_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_material_releases_on_applicable_medium_id ON public.material_releases USING btree (applicable_medium_id);


--
-- Name: index_material_releases_on_contract_template_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_material_releases_on_contract_template_id ON public.material_releases USING btree (contract_template_id);


--
-- Name: index_material_releases_on_project_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_material_releases_on_project_id ON public.material_releases USING btree (project_id);


--
-- Name: index_material_releases_on_restriction_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_material_releases_on_restriction_id ON public.material_releases USING btree (restriction_id);


--
-- Name: index_material_releases_on_term_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_material_releases_on_term_id ON public.material_releases USING btree (term_id);


--
-- Name: index_material_releases_on_territory_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_material_releases_on_territory_id ON public.material_releases USING btree (territory_id);


--
-- Name: index_medical_releases_on_contract_template_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_medical_releases_on_contract_template_id ON public.medical_releases USING btree (contract_template_id);


--
-- Name: index_medical_releases_on_project_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_medical_releases_on_project_id ON public.medical_releases USING btree (project_id);


--
-- Name: index_misc_releases_on_contract_template_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_misc_releases_on_contract_template_id ON public.misc_releases USING btree (contract_template_id);


--
-- Name: index_misc_releases_on_project_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_misc_releases_on_project_id ON public.misc_releases USING btree (project_id);


--
-- Name: index_music_releases_on_applicable_medium_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_music_releases_on_applicable_medium_id ON public.music_releases USING btree (applicable_medium_id);


--
-- Name: index_music_releases_on_contract_template_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_music_releases_on_contract_template_id ON public.music_releases USING btree (contract_template_id);


--
-- Name: index_music_releases_on_project_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_music_releases_on_project_id ON public.music_releases USING btree (project_id);


--
-- Name: index_music_releases_on_restriction_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_music_releases_on_restriction_id ON public.music_releases USING btree (restriction_id);


--
-- Name: index_music_releases_on_term_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_music_releases_on_term_id ON public.music_releases USING btree (term_id);


--
-- Name: index_music_releases_on_territory_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_music_releases_on_territory_id ON public.music_releases USING btree (territory_id);


--
-- Name: index_notes_on_notable_type_and_notable_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_notes_on_notable_type_and_notable_id ON public.notes USING btree (notable_type, notable_id);


--
-- Name: index_notes_on_user_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_notes_on_user_id ON public.notes USING btree (user_id);


--
-- Name: index_project_memberships_on_project_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_project_memberships_on_project_id ON public.project_memberships USING btree (project_id);


--
-- Name: index_project_memberships_on_user_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_project_memberships_on_user_id ON public.project_memberships USING btree (user_id);


--
-- Name: index_projects_on_account_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_projects_on_account_id ON public.projects USING btree (account_id);


--
-- Name: index_publishers_on_music_release_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_publishers_on_music_release_id ON public.publishers USING btree (music_release_id);


--
-- Name: index_settings_on_target_type_and_target_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_settings_on_target_type_and_target_id ON public.settings USING btree (target_type, target_id);


--
-- Name: index_settings_on_target_type_and_target_id_and_var; Type: INDEX; Schema: public; Owner: -
--

CREATE UNIQUE INDEX index_settings_on_target_type_and_target_id_and_var ON public.settings USING btree (target_type, target_id, var);


--
-- Name: index_taggings_on_context; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_taggings_on_context ON public.taggings USING btree (context);


--
-- Name: index_taggings_on_tag_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_taggings_on_tag_id ON public.taggings USING btree (tag_id);


--
-- Name: index_taggings_on_taggable_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_taggings_on_taggable_id ON public.taggings USING btree (taggable_id);


--
-- Name: index_taggings_on_taggable_id_and_taggable_type_and_context; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_taggings_on_taggable_id_and_taggable_type_and_context ON public.taggings USING btree (taggable_id, taggable_type, context);


--
-- Name: index_taggings_on_taggable_type; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_taggings_on_taggable_type ON public.taggings USING btree (taggable_type);


--
-- Name: index_taggings_on_tagger_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_taggings_on_tagger_id ON public.taggings USING btree (tagger_id);


--
-- Name: index_taggings_on_tagger_id_and_tagger_type; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_taggings_on_tagger_id_and_tagger_type ON public.taggings USING btree (tagger_id, tagger_type);


--
-- Name: index_tags_on_name; Type: INDEX; Schema: public; Owner: -
--

CREATE UNIQUE INDEX index_tags_on_name ON public.tags USING btree (name);


--
-- Name: index_talent_releases_on_applicable_medium_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_talent_releases_on_applicable_medium_id ON public.talent_releases USING btree (applicable_medium_id);


--
-- Name: index_talent_releases_on_contract_template_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_talent_releases_on_contract_template_id ON public.talent_releases USING btree (contract_template_id);


--
-- Name: index_talent_releases_on_project_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_talent_releases_on_project_id ON public.talent_releases USING btree (project_id);


--
-- Name: index_talent_releases_on_restriction_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_talent_releases_on_restriction_id ON public.talent_releases USING btree (restriction_id);


--
-- Name: index_talent_releases_on_term_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_talent_releases_on_term_id ON public.talent_releases USING btree (term_id);


--
-- Name: index_talent_releases_on_territory_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_talent_releases_on_territory_id ON public.talent_releases USING btree (territory_id);


--
-- Name: index_task_requests_on_project_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_task_requests_on_project_id ON public.task_requests USING btree (project_id);


--
-- Name: index_unreleased_appearances_on_video_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_unreleased_appearances_on_video_id ON public.unreleased_appearances USING btree (video_id);


--
-- Name: index_users_on_account_id_old; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_users_on_account_id_old ON public.users USING btree (account_id_old);


--
-- Name: index_users_on_email; Type: INDEX; Schema: public; Owner: -
--

CREATE UNIQUE INDEX index_users_on_email ON public.users USING btree (email);


--
-- Name: index_users_on_password_reset_token; Type: INDEX; Schema: public; Owner: -
--

CREATE UNIQUE INDEX index_users_on_password_reset_token ON public.users USING btree (password_reset_token);


--
-- Name: index_video_release_confirmations_on_file_info_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_video_release_confirmations_on_file_info_id ON public.video_release_confirmations USING btree (file_info_id);


--
-- Name: index_video_release_confirmations_on_releasable_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_video_release_confirmations_on_releasable_id ON public.video_release_confirmations USING btree (releasable_id);


--
-- Name: index_video_release_confirmations_on_releasable_id_and_type; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_video_release_confirmations_on_releasable_id_and_type ON public.video_release_confirmations USING btree (releasable_id, releasable_type);


--
-- Name: index_video_release_confirmations_on_video_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_video_release_confirmations_on_video_id ON public.video_release_confirmations USING btree (video_id);


--
-- Name: index_videos_on_analysis_uid; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_videos_on_analysis_uid ON public.videos USING btree (analysis_uid);


--
-- Name: index_videos_on_audio_analysis_uid; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_videos_on_audio_analysis_uid ON public.videos USING btree (audio_analysis_uid);


--
-- Name: index_videos_on_project_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_videos_on_project_id ON public.videos USING btree (project_id);


--
-- Name: index_zoom_meetings_on_project_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_zoom_meetings_on_project_id ON public.zoom_meetings USING btree (project_id);


--
-- Name: index_zoom_meetings_on_zoom_user_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX index_zoom_meetings_on_zoom_user_id ON public.zoom_meetings USING btree (zoom_user_id);


--
-- Name: taggings_idx; Type: INDEX; Schema: public; Owner: -
--

CREATE UNIQUE INDEX taggings_idx ON public.taggings USING btree (tag_id, taggable_id, taggable_type, context, tagger_id, tagger_type);


--
-- Name: taggings_idy; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX taggings_idy ON public.taggings USING btree (taggable_id, taggable_type, tagger_id, context);


--
-- Name: misc_releases fk_rails_0222652fcd; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.misc_releases
    ADD CONSTRAINT fk_rails_0222652fcd FOREIGN KEY (project_id) REFERENCES public.projects(id);


--
-- Name: unreleased_appearances fk_rails_0393a349dd; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.unreleased_appearances
    ADD CONSTRAINT fk_rails_0393a349dd FOREIGN KEY (video_id) REFERENCES public.videos(id);


--
-- Name: material_releases fk_rails_06d19ea851; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.material_releases
    ADD CONSTRAINT fk_rails_06d19ea851 FOREIGN KEY (project_id) REFERENCES public.projects(id);


--
-- Name: location_releases fk_rails_09f439b8f2; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.location_releases
    ADD CONSTRAINT fk_rails_09f439b8f2 FOREIGN KEY (territory_id) REFERENCES public.territories(id);


--
-- Name: material_releases fk_rails_0c0f3a10fc; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.material_releases
    ADD CONSTRAINT fk_rails_0c0f3a10fc FOREIGN KEY (territory_id) REFERENCES public.territories(id);


--
-- Name: material_releases fk_rails_0ca4698349; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.material_releases
    ADD CONSTRAINT fk_rails_0ca4698349 FOREIGN KEY (term_id) REFERENCES public.terms(id);


--
-- Name: acquired_media_releases fk_rails_0eae3b5083; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.acquired_media_releases
    ADD CONSTRAINT fk_rails_0eae3b5083 FOREIGN KEY (project_id) REFERENCES public.projects(id);


--
-- Name: zoom_meetings fk_rails_1190f0e0fa; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.zoom_meetings
    ADD CONSTRAINT fk_rails_1190f0e0fa FOREIGN KEY (project_id) REFERENCES public.projects(id);


--
-- Name: bookmarks fk_rails_15735b7db8; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.bookmarks
    ADD CONSTRAINT fk_rails_15735b7db8 FOREIGN KEY (video_id) REFERENCES public.videos(id);


--
-- Name: acquired_media_releases fk_rails_15b450b040; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.acquired_media_releases
    ADD CONSTRAINT fk_rails_15b450b040 FOREIGN KEY (restriction_id) REFERENCES public.restrictions(id);


--
-- Name: acquired_media_releases fk_rails_16ec0c6f1f; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.acquired_media_releases
    ADD CONSTRAINT fk_rails_16ec0c6f1f FOREIGN KEY (territory_id) REFERENCES public.territories(id);


--
-- Name: material_releases fk_rails_17ae91ce4d; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.material_releases
    ADD CONSTRAINT fk_rails_17ae91ce4d FOREIGN KEY (applicable_medium_id) REFERENCES public.applicable_media(id);


--
-- Name: project_memberships fk_rails_18b611e244; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.project_memberships
    ADD CONSTRAINT fk_rails_18b611e244 FOREIGN KEY (project_id) REFERENCES public.projects(id);


--
-- Name: acquired_media_releases fk_rails_191924bd8d; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.acquired_media_releases
    ADD CONSTRAINT fk_rails_191924bd8d FOREIGN KEY (applicable_medium_id) REFERENCES public.applicable_media(id);


--
-- Name: composers fk_rails_1b1c389ee5; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.composers
    ADD CONSTRAINT fk_rails_1b1c389ee5 FOREIGN KEY (music_release_id) REFERENCES public.music_releases(id);


--
-- Name: contract_templates fk_rails_21d503cdcd; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.contract_templates
    ADD CONSTRAINT fk_rails_21d503cdcd FOREIGN KEY (project_id) REFERENCES public.projects(id);


--
-- Name: video_release_confirmations fk_rails_2787252ceb; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.video_release_confirmations
    ADD CONSTRAINT fk_rails_2787252ceb FOREIGN KEY (file_info_id) REFERENCES public.file_infos(id);


--
-- Name: medical_releases fk_rails_325442c794; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.medical_releases
    ADD CONSTRAINT fk_rails_325442c794 FOREIGN KEY (contract_template_id) REFERENCES public.contract_templates(id);


--
-- Name: music_releases fk_rails_3a2b4033ad; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.music_releases
    ADD CONSTRAINT fk_rails_3a2b4033ad FOREIGN KEY (contract_template_id) REFERENCES public.contract_templates(id);


--
-- Name: acquired_media_releases fk_rails_3caf7e5fea; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.acquired_media_releases
    ADD CONSTRAINT fk_rails_3caf7e5fea FOREIGN KEY (term_id) REFERENCES public.terms(id);


--
-- Name: music_releases fk_rails_3d26b13df8; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.music_releases
    ADD CONSTRAINT fk_rails_3d26b13df8 FOREIGN KEY (project_id) REFERENCES public.projects(id);


--
-- Name: location_releases fk_rails_3fe03cc59d; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.location_releases
    ADD CONSTRAINT fk_rails_3fe03cc59d FOREIGN KEY (applicable_medium_id) REFERENCES public.applicable_media(id);


--
-- Name: contract_templates fk_rails_4500d10f4b; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.contract_templates
    ADD CONSTRAINT fk_rails_4500d10f4b FOREIGN KEY (restriction_id) REFERENCES public.restrictions(id);


--
-- Name: material_releases fk_rails_4a2a7c86d1; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.material_releases
    ADD CONSTRAINT fk_rails_4a2a7c86d1 FOREIGN KEY (restriction_id) REFERENCES public.restrictions(id);


--
-- Name: zoom_meetings fk_rails_4d9376d137; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.zoom_meetings
    ADD CONSTRAINT fk_rails_4d9376d137 FOREIGN KEY (zoom_user_id) REFERENCES public.zoom_users(id);


--
-- Name: talent_releases fk_rails_4eaff8ed26; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.talent_releases
    ADD CONSTRAINT fk_rails_4eaff8ed26 FOREIGN KEY (restriction_id) REFERENCES public.restrictions(id);


--
-- Name: appearance_releases fk_rails_507a94fd4b; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.appearance_releases
    ADD CONSTRAINT fk_rails_507a94fd4b FOREIGN KEY (restriction_id) REFERENCES public.restrictions(id);


--
-- Name: talent_releases fk_rails_52acc79e0e; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.talent_releases
    ADD CONSTRAINT fk_rails_52acc79e0e FOREIGN KEY (territory_id) REFERENCES public.territories(id);


--
-- Name: video_release_confirmations fk_rails_53bf2ab39d; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.video_release_confirmations
    ADD CONSTRAINT fk_rails_53bf2ab39d FOREIGN KEY (video_id) REFERENCES public.videos(id);


--
-- Name: location_releases fk_rails_5a82e49de3; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.location_releases
    ADD CONSTRAINT fk_rails_5a82e49de3 FOREIGN KEY (restriction_id) REFERENCES public.restrictions(id);


--
-- Name: location_releases fk_rails_5d7b9e3937; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.location_releases
    ADD CONSTRAINT fk_rails_5d7b9e3937 FOREIGN KEY (term_id) REFERENCES public.terms(id);


--
-- Name: graphics_elements fk_rails_5e0d384ad7; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.graphics_elements
    ADD CONSTRAINT fk_rails_5e0d384ad7 FOREIGN KEY (video_id) REFERENCES public.videos(id);


--
-- Name: users fk_rails_61ac11da2b; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.users
    ADD CONSTRAINT fk_rails_61ac11da2b FOREIGN KEY (account_id_old) REFERENCES public.accounts(id);


--
-- Name: music_releases fk_rails_62ea419108; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.music_releases
    ADD CONSTRAINT fk_rails_62ea419108 FOREIGN KEY (term_id) REFERENCES public.terms(id);


--
-- Name: imports fk_rails_633cd693b9; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.imports
    ADD CONSTRAINT fk_rails_633cd693b9 FOREIGN KEY (project_id) REFERENCES public.projects(id);


--
-- Name: material_releases fk_rails_6b945b36b9; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.material_releases
    ADD CONSTRAINT fk_rails_6b945b36b9 FOREIGN KEY (contract_template_id) REFERENCES public.contract_templates(id);


--
-- Name: matching_requests fk_rails_71d16e64c8; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.matching_requests
    ADD CONSTRAINT fk_rails_71d16e64c8 FOREIGN KEY (project_id) REFERENCES public.projects(id);


--
-- Name: appearance_releases fk_rails_7a58302526; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.appearance_releases
    ADD CONSTRAINT fk_rails_7a58302526 FOREIGN KEY (applicable_medium_id) REFERENCES public.applicable_media(id);


--
-- Name: music_releases fk_rails_83201818cb; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.music_releases
    ADD CONSTRAINT fk_rails_83201818cb FOREIGN KEY (applicable_medium_id) REFERENCES public.applicable_media(id);


--
-- Name: project_memberships fk_rails_86b046ec96; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.project_memberships
    ADD CONSTRAINT fk_rails_86b046ec96 FOREIGN KEY (user_id) REFERENCES public.users(id);


--
-- Name: music_releases fk_rails_890d967673; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.music_releases
    ADD CONSTRAINT fk_rails_890d967673 FOREIGN KEY (territory_id) REFERENCES public.territories(id);


--
-- Name: medical_releases fk_rails_98aa92daa9; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.medical_releases
    ADD CONSTRAINT fk_rails_98aa92daa9 FOREIGN KEY (project_id) REFERENCES public.projects(id);


--
-- Name: contract_templates fk_rails_9b4d9d0e5a; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.contract_templates
    ADD CONSTRAINT fk_rails_9b4d9d0e5a FOREIGN KEY (applicable_medium_id) REFERENCES public.applicable_media(id);


--
-- Name: appearance_releases fk_rails_9bafd6638c; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.appearance_releases
    ADD CONSTRAINT fk_rails_9bafd6638c FOREIGN KEY (contract_template_id) REFERENCES public.contract_templates(id);


--
-- Name: talent_releases fk_rails_a15162b7f5; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.talent_releases
    ADD CONSTRAINT fk_rails_a15162b7f5 FOREIGN KEY (project_id) REFERENCES public.projects(id);


--
-- Name: projects fk_rails_b4884d7210; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.projects
    ADD CONSTRAINT fk_rails_b4884d7210 FOREIGN KEY (account_id) REFERENCES public.accounts(id);


--
-- Name: acquired_media_releases fk_rails_b61f0d00a0; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.acquired_media_releases
    ADD CONSTRAINT fk_rails_b61f0d00a0 FOREIGN KEY (contract_template_id) REFERENCES public.contract_templates(id);


--
-- Name: appearance_releases fk_rails_b6b5d35202; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.appearance_releases
    ADD CONSTRAINT fk_rails_b6b5d35202 FOREIGN KEY (territory_id) REFERENCES public.territories(id);


--
-- Name: talent_releases fk_rails_bcdc48f80f; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.talent_releases
    ADD CONSTRAINT fk_rails_bcdc48f80f FOREIGN KEY (contract_template_id) REFERENCES public.contract_templates(id);


--
-- Name: appearance_releases fk_rails_c009c323b4; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.appearance_releases
    ADD CONSTRAINT fk_rails_c009c323b4 FOREIGN KEY (project_id) REFERENCES public.projects(id);


--
-- Name: publishers fk_rails_c2bb50e67b; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.publishers
    ADD CONSTRAINT fk_rails_c2bb50e67b FOREIGN KEY (music_release_id) REFERENCES public.music_releases(id);


--
-- Name: active_storage_attachments fk_rails_c3b3935057; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.active_storage_attachments
    ADD CONSTRAINT fk_rails_c3b3935057 FOREIGN KEY (blob_id) REFERENCES public.active_storage_blobs(id);


--
-- Name: misc_releases fk_rails_c664291b9b; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.misc_releases
    ADD CONSTRAINT fk_rails_c664291b9b FOREIGN KEY (contract_template_id) REFERENCES public.contract_templates(id);


--
-- Name: location_releases fk_rails_c7458d662e; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.location_releases
    ADD CONSTRAINT fk_rails_c7458d662e FOREIGN KEY (contract_template_id) REFERENCES public.contract_templates(id);


--
-- Name: talent_releases fk_rails_d913f5d891; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.talent_releases
    ADD CONSTRAINT fk_rails_d913f5d891 FOREIGN KEY (applicable_medium_id) REFERENCES public.applicable_media(id);


--
-- Name: contract_templates fk_rails_dbcb42b50c; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.contract_templates
    ADD CONSTRAINT fk_rails_dbcb42b50c FOREIGN KEY (term_id) REFERENCES public.terms(id);


--
-- Name: music_releases fk_rails_dff1dce9d5; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.music_releases
    ADD CONSTRAINT fk_rails_dff1dce9d5 FOREIGN KEY (restriction_id) REFERENCES public.restrictions(id);


--
-- Name: appearance_releases fk_rails_e0bcdcb3dc; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.appearance_releases
    ADD CONSTRAINT fk_rails_e0bcdcb3dc FOREIGN KEY (term_id) REFERENCES public.terms(id);


--
-- Name: location_releases fk_rails_e4fd2f9f1e; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.location_releases
    ADD CONSTRAINT fk_rails_e4fd2f9f1e FOREIGN KEY (project_id) REFERENCES public.projects(id);


--
-- Name: audio_confirmations fk_rails_e6b7684f9f; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.audio_confirmations
    ADD CONSTRAINT fk_rails_e6b7684f9f FOREIGN KEY (video_id) REFERENCES public.videos(id);


--
-- Name: videos fk_rails_f3cee18430; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.videos
    ADD CONSTRAINT fk_rails_f3cee18430 FOREIGN KEY (project_id) REFERENCES public.projects(id);


--
-- Name: contract_templates fk_rails_f932cce5a8; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.contract_templates
    ADD CONSTRAINT fk_rails_f932cce5a8 FOREIGN KEY (territory_id) REFERENCES public.territories(id);


--
-- Name: talent_releases fk_rails_fe66547f55; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.talent_releases
    ADD CONSTRAINT fk_rails_fe66547f55 FOREIGN KEY (term_id) REFERENCES public.terms(id);


--
-- PostgreSQL database dump complete
--

SET search_path TO "$user", public;

INSERT INTO "schema_migrations" (version) VALUES
('20171206201733'),
('20171226201818'),
('20171231154902'),
('20180103145108'),
('20180103154125'),
('20180110185920'),
('20180118222351'),
('20180126234124'),
('20180207174905'),
('20180207175033'),
('20180213203308'),
('20180326025014'),
('20180418183903'),
('20180517183044'),
('20180531175610'),
('20180531202216'),
('20180609203232'),
('20180723225854'),
('20180723225855'),
('20180723225856'),
('20180723225857'),
('20180723225858'),
('20180723225859'),
('20180803012621'),
('20180803012622'),
('20180808193510'),
('20181022134900'),
('20181026003825'),
('20181030213548'),
('20181101184834'),
('20181107191123'),
('20181107191220'),
('20181113200008'),
('20181114182730'),
('20181121211703'),
('20181123034352'),
('20181123060610'),
('20181123061024'),
('20181123211217'),
('20181123211221'),
('20181129215157'),
('20181205193134'),
('20181208001821'),
('20181210183047'),
('20181214193036'),
('20181219160538'),
('20181219160621'),
('20181220151559'),
('20190111053427'),
('20190111053759'),
('20190111211317'),
('20190111211406'),
('20190125012705'),
('20190129192226'),
('20190204054833'),
('20190204060502'),
('20190204063948'),
('20190213234119'),
('20190509201711'),
('20190513175340'),
('20190513212952'),
('20190515233909'),
('20190517224239'),
('20190524220130'),
('20190529223953'),
('20190606220156'),
('20190610192026'),
('20190610231302'),
('20190613155257'),
('20190614145141'),
('20190702221718'),
('20190708165139'),
('20190710162403'),
('20190712132406'),
('20190716170929'),
('20190716183332'),
('20190717210004'),
('20190719210405'),
('20190729215334'),
('20190731171011'),
('20190731192015'),
('20190807234639'),
('20190808191051'),
('20190809133049'),
('20190809133100'),
('20190813204822'),
('20190820211808'),
('20190821231050'),
('20190822132426'),
('20190823155000'),
('20190823164829'),
('20190823214942'),
('20190905212706'),
('20190911174324'),
('20190912195438'),
('20190914142320'),
('20190916215209'),
('20190927164725'),
('20191007145140'),
('20191007155625'),
('20191011094300'),
('20191011094400'),
('20191011222149'),
('20191011230849'),
('20191014162947'),
('20191015140222'),
('20191016141651'),
('20191017163920'),
('20191022195447'),
('20191022195448'),
('20191126155350'),
('20191206181600'),
('20191223123415'),
('20191230115419'),
('20200106111835'),
('20200107192032'),
('20200127180819'),
('20200210164619'),
('20200210210223'),
('20200211172631'),
('20200213065453'),
('20200217132429'),
('20200219163255'),
('20200228144628'),
('20200228154850'),
('20200303232746'),
('20200304191424'),
('20200308181050'),
('20200309164624'),
('20200317142545'),
('20200318143154'),
('20200323195446'),
('20200326111351'),
('20200326115546'),
('20200326172542'),
('20200327122450'),
('20200330102704'),
('20200330145401'),
('20200402190734'),
('20200413124619'),
('20200424142736'),
('20200424161117'),
('20200427073429'),
('20200428091105'),
('20200430151828'),
('20200430190412'),
('20200507110804'),
('20200512161738'),
('20200518200245'),
('20200519191908'),
('20200526113516'),
('20200603090419'),
('20200606044747'),
('20200610085411'),
('20200610140459'),
('20200610143327'),
('20200612121539'),
('20200615131722'),
('20200615133602'),
('20200616124214'),
('20200619081446'),
('20200619085823'),
('20200619134853'),
('20200622180507'),
('20200625144713'),
('20200702152130'),
('20200707155717'),
('20200709120630'),
('20200712181139'),
('20200715084927'),
('20200716055453'),
('20200716075851'),
('20200716083706'),
('20200716094927'),
('20200716103525'),
('20200716105723'),
('20200720051634'),
('20200720131309'),
('20200721140821'),
('20200727143209');


