--
-- PostgreSQL database dump
--

-- Dumped from database version 9.5.2
-- Dumped by pg_dump version 9.5.2

SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET row_security = off;

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

CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;


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

COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';


SET search_path = public, pg_catalog;

SET default_tablespace = '';

SET default_with_oids = false;

--
-- Name: accounts_avatar; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE accounts_avatar (
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    id character varying(36) NOT NULL,
    img character varying(100) NOT NULL,
    hash character varying(36) NOT NULL,
    date timestamp with time zone NOT NULL,
    first_update_id character varying(36),
    last_update_id character varying(36)
);


ALTER TABLE accounts_avatar OWNER TO magency;

--
-- Name: accounts_group; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE accounts_group (
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    id character varying(36) NOT NULL,
    name character varying(100) NOT NULL,
    color character varying(30) NOT NULL,
    first_update_id character varying(36),
    last_update_id character varying(36),
    type_id character varying(36),
    parent_id character varying(36)
);


ALTER TABLE accounts_group OWNER TO magency;

--
-- Name: accounts_grouprole; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE accounts_grouprole (
    id character varying(36) NOT NULL,
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    role character varying(2) NOT NULL,
    first_update_id character varying(36),
    group_id character varying(36) NOT NULL,
    last_update_id character varying(36),
    user_id character varying(36) NOT NULL
);


ALTER TABLE accounts_grouprole OWNER TO magency;

--
-- Name: accounts_groupset; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE accounts_groupset (
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    id character varying(36) NOT NULL,
    name character varying(200) NOT NULL,
    first_update_id character varying(36),
    last_update_id character varying(36)
);


ALTER TABLE accounts_groupset OWNER TO magency;

--
-- Name: accounts_groupset_mgroups; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE accounts_groupset_mgroups (
    id integer NOT NULL,
    groupset_id character varying(36) NOT NULL,
    group_id character varying(36) NOT NULL
);


ALTER TABLE accounts_groupset_mgroups OWNER TO magency;

--
-- Name: accounts_groupset_mgroups_id_seq; Type: SEQUENCE; Schema: public; Owner: magency
--

CREATE SEQUENCE accounts_groupset_mgroups_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE accounts_groupset_mgroups_id_seq OWNER TO magency;

--
-- Name: accounts_groupset_mgroups_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: magency
--

ALTER SEQUENCE accounts_groupset_mgroups_id_seq OWNED BY accounts_groupset_mgroups.id;


--
-- Name: accounts_grouptype; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE accounts_grouptype (
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    id character varying(36) NOT NULL,
    name character varying(255) NOT NULL,
    description text NOT NULL,
    is_stats_filter boolean NOT NULL,
    first_update_id character varying(36),
    last_update_id character varying(36),
    is_training_filter boolean NOT NULL
);


ALTER TABLE accounts_grouptype OWNER TO magency;

--
-- Name: accounts_mtpuser; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE accounts_mtpuser (
    password character varying(128) NOT NULL,
    last_login timestamp with time zone,
    is_superuser boolean NOT NULL,
    username character varying(50) NOT NULL,
    first_name character varying(50) NOT NULL,
    last_name character varying(50) NOT NULL,
    email character varying(254) NOT NULL,
    is_staff boolean NOT NULL,
    is_active boolean NOT NULL,
    date_joined timestamp with time zone NOT NULL,
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    id character varying(36) NOT NULL,
    natural_language character varying(5) NOT NULL,
    business character varying(255) NOT NULL,
    dr character varying(255) NOT NULL,
    first_update_id character varying(36),
    last_update_id character varying(36),
    photo_id character varying(36),
    last_changed_password timestamp with time zone NOT NULL,
    external_id character varying(255) NOT NULL,
    old_username character varying(50) NOT NULL
);


ALTER TABLE accounts_mtpuser OWNER TO magency;

--
-- Name: accounts_mtpuser_groups; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE accounts_mtpuser_groups (
    id integer NOT NULL,
    mtpuser_id character varying(36) NOT NULL,
    group_id integer NOT NULL
);


ALTER TABLE accounts_mtpuser_groups OWNER TO magency;

--
-- Name: accounts_mtpuser_groups_id_seq; Type: SEQUENCE; Schema: public; Owner: magency
--

CREATE SEQUENCE accounts_mtpuser_groups_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE accounts_mtpuser_groups_id_seq OWNER TO magency;

--
-- Name: accounts_mtpuser_groups_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: magency
--

ALTER SEQUENCE accounts_mtpuser_groups_id_seq OWNED BY accounts_mtpuser_groups.id;


--
-- Name: accounts_mtpuser_photos; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE accounts_mtpuser_photos (
    id integer NOT NULL,
    mtpuser_id character varying(36) NOT NULL,
    avatar_id character varying(36) NOT NULL
);


ALTER TABLE accounts_mtpuser_photos OWNER TO magency;

--
-- Name: accounts_mtpuser_photos_id_seq; Type: SEQUENCE; Schema: public; Owner: magency
--

CREATE SEQUENCE accounts_mtpuser_photos_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE accounts_mtpuser_photos_id_seq OWNER TO magency;

--
-- Name: accounts_mtpuser_photos_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: magency
--

ALTER SEQUENCE accounts_mtpuser_photos_id_seq OWNED BY accounts_mtpuser_photos.id;


--
-- Name: accounts_mtpuser_user_permissions; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE accounts_mtpuser_user_permissions (
    id integer NOT NULL,
    mtpuser_id character varying(36) NOT NULL,
    permission_id integer NOT NULL
);


ALTER TABLE accounts_mtpuser_user_permissions OWNER TO magency;

--
-- Name: accounts_mtpuser_user_permissions_id_seq; Type: SEQUENCE; Schema: public; Owner: magency
--

CREATE SEQUENCE accounts_mtpuser_user_permissions_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE accounts_mtpuser_user_permissions_id_seq OWNER TO magency;

--
-- Name: accounts_mtpuser_user_permissions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: magency
--

ALTER SEQUENCE accounts_mtpuser_user_permissions_id_seq OWNED BY accounts_mtpuser_user_permissions.id;


--
-- Name: assessments_assessableactivitypartuserscore; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE assessments_assessableactivitypartuserscore (
    id character varying(36) NOT NULL,
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    score integer NOT NULL,
    activity_part_id character varying(36) NOT NULL,
    points integer,
    activity_part_type_id integer NOT NULL,
    first_update_id character varying(36),
    last_update_id character varying(36),
    session_id character varying(36) NOT NULL,
    user_id character varying(36) NOT NULL
);


ALTER TABLE assessments_assessableactivitypartuserscore OWNER TO magency;

--
-- Name: assessments_assessableactivityuserscore; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE assessments_assessableactivityuserscore (
    id character varying(36) NOT NULL,
    score integer NOT NULL,
    activity_id character varying(36) NOT NULL,
    points integer,
    activity_type_id integer NOT NULL,
    session_id character varying(36) NOT NULL,
    user_id character varying(36) NOT NULL,
    activity_order integer,
    CONSTRAINT assessments_assessableactivityuserscore_activity_order_check CHECK ((activity_order >= 0))
);


ALTER TABLE assessments_assessableactivityuserscore OWNER TO magency;

--
-- Name: assessments_certificationcompetencythreshold; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE assessments_certificationcompetencythreshold (
    id character varying(36) NOT NULL,
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    threshold integer NOT NULL,
    competency_id character varying(36) NOT NULL,
    first_update_id character varying(36),
    last_update_id character varying(36),
    status_id character varying(36) NOT NULL,
    CONSTRAINT assessments_certificationcompetencythreshold_threshold_check CHECK ((threshold >= 0))
);


ALTER TABLE assessments_certificationcompetencythreshold OWNER TO magency;

--
-- Name: assessments_certificationprogram; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE assessments_certificationprogram (
    id character varying(36) NOT NULL,
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    name character varying(255) NOT NULL,
    first_update_id character varying(36),
    last_update_id character varying(36),
    tree_id character varying(36) NOT NULL
);


ALTER TABLE assessments_certificationprogram OWNER TO magency;

--
-- Name: assessments_certificationprogramuserstatus; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE assessments_certificationprogramuserstatus (
    id character varying(36) NOT NULL,
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    first_update_id character varying(36),
    last_update_id character varying(36),
    program_id character varying(36),
    status_id character varying(36),
    user_id character varying(36) NOT NULL,
    date_reached timestamp with time zone NOT NULL,
    is_validated boolean NOT NULL,
    score integer NOT NULL,
    session_id character varying(36),
    is_forced boolean NOT NULL,
    CONSTRAINT assessments_certificationprogramuserstatus_score_check CHECK ((score >= 0))
);


ALTER TABLE assessments_certificationprogramuserstatus OWNER TO magency;

--
-- Name: assessments_certificationstatus; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE assessments_certificationstatus (
    id character varying(36) NOT NULL,
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    name character varying(255) NOT NULL,
    first_update_id character varying(36),
    last_update_id character varying(36),
    program_id character varying(36) NOT NULL,
    global_threshold integer NOT NULL,
    is_reference boolean NOT NULL,
    CONSTRAINT assessments_certificationstatus_global_threshold_check CHECK ((global_threshold >= 0))
);


ALTER TABLE assessments_certificationstatus OWNER TO magency;

--
-- Name: assessments_competency; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE assessments_competency (
    sort_order integer NOT NULL,
    id character varying(36) NOT NULL,
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    name character varying(255) NOT NULL,
    code character varying(255) NOT NULL,
    description text NOT NULL,
    is_ghost boolean NOT NULL,
    first_update_id character varying(36),
    last_update_id character varying(36),
    tree_id character varying(36) NOT NULL,
    original_version_id character varying(36),
    parent_version_id character varying(36)
);


ALTER TABLE assessments_competency OWNER TO magency;

--
-- Name: assessments_competencytree; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE assessments_competencytree (
    id character varying(36) NOT NULL,
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    name character varying(255) NOT NULL,
    first_update_id character varying(36),
    job_profile_id character varying(36),
    last_update_id character varying(36),
    created_at timestamp with time zone NOT NULL,
    original_version_id character varying(36),
    parent_version_id character varying(36),
    version_state character varying(1) NOT NULL,
    group_id character varying(36)
);


ALTER TABLE assessments_competencytree OWNER TO magency;

--
-- Name: assessments_competencytreeuserscore; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE assessments_competencytreeuserscore (
    id character varying(36) NOT NULL,
    score integer NOT NULL,
    session_id character varying(36) NOT NULL,
    tree_id character varying(36) NOT NULL,
    user_id character varying(36) NOT NULL
);


ALTER TABLE assessments_competencytreeuserscore OWNER TO magency;

--
-- Name: assessments_competencyuserscore; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE assessments_competencyuserscore (
    id character varying(36) NOT NULL,
    score integer NOT NULL,
    competency_id character varying(36) NOT NULL,
    session_id character varying(36) NOT NULL,
    user_id character varying(36) NOT NULL
);


ALTER TABLE assessments_competencyuserscore OWNER TO magency;

--
-- Name: assessments_curriculum; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE assessments_curriculum (
    id character varying(36) NOT NULL,
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    name character varying(255) NOT NULL,
    description text NOT NULL,
    first_update_id character varying(36),
    job_profile_id character varying(36),
    last_update_id character varying(36),
    business_unit_id character varying(36)
);


ALTER TABLE assessments_curriculum OWNER TO magency;

--
-- Name: assessments_curriculum_active_recommendation_levels; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE assessments_curriculum_active_recommendation_levels (
    id integer NOT NULL,
    curriculum_id character varying(36) NOT NULL,
    recommendationlevel_id character varying(36) NOT NULL
);


ALTER TABLE assessments_curriculum_active_recommendation_levels OWNER TO magency;

--
-- Name: assessments_curriculum_active_recommendation_levels_id_seq; Type: SEQUENCE; Schema: public; Owner: magency
--

CREATE SEQUENCE assessments_curriculum_active_recommendation_levels_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE assessments_curriculum_active_recommendation_levels_id_seq OWNER TO magency;

--
-- Name: assessments_curriculum_active_recommendation_levels_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: magency
--

ALTER SEQUENCE assessments_curriculum_active_recommendation_levels_id_seq OWNED BY assessments_curriculum_active_recommendation_levels.id;


--
-- Name: assessments_curriculum_mgroups; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE assessments_curriculum_mgroups (
    id integer NOT NULL,
    curriculum_id character varying(36) NOT NULL,
    group_id character varying(36) NOT NULL
);


ALTER TABLE assessments_curriculum_mgroups OWNER TO magency;

--
-- Name: assessments_curriculum_mgroups_id_seq; Type: SEQUENCE; Schema: public; Owner: magency
--

CREATE SEQUENCE assessments_curriculum_mgroups_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE assessments_curriculum_mgroups_id_seq OWNER TO magency;

--
-- Name: assessments_curriculum_mgroups_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: magency
--

ALTER SEQUENCE assessments_curriculum_mgroups_id_seq OWNED BY assessments_curriculum_mgroups.id;


--
-- Name: assessments_dimension; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE assessments_dimension (
    sort_order integer NOT NULL,
    id character varying(36) NOT NULL,
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    name character varying(255) NOT NULL,
    code character varying(255) NOT NULL,
    description text NOT NULL,
    default_weight integer NOT NULL,
    competency_id character varying(36) NOT NULL,
    first_update_id character varying(36),
    last_update_id character varying(36),
    original_version_id character varying(36),
    parent_version_id character varying(36),
    CONSTRAINT assessments_dimension_default_weight_check CHECK ((default_weight >= 0))
);


ALTER TABLE assessments_dimension OWNER TO magency;

--
-- Name: assessments_dimensiontrainingweight; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE assessments_dimensiontrainingweight (
    id character varying(36) NOT NULL,
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    weight integer,
    dimension_id character varying(36) NOT NULL,
    first_update_id character varying(36),
    last_update_id character varying(36),
    training_id character varying(36) NOT NULL,
    CONSTRAINT assessments_dimensiontrainingweight_weight_check CHECK ((weight >= 0))
);


ALTER TABLE assessments_dimensiontrainingweight OWNER TO magency;

--
-- Name: assessments_dimensionuserscore; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE assessments_dimensionuserscore (
    id character varying(36) NOT NULL,
    score integer NOT NULL,
    dimension_id character varying(36) NOT NULL,
    session_id character varying(36) NOT NULL,
    user_id character varying(36) NOT NULL
);


ALTER TABLE assessments_dimensionuserscore OWNER TO magency;

--
-- Name: assessments_lesson; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE assessments_lesson (
    sort_order integer NOT NULL,
    id character varying(36) NOT NULL,
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    name character varying(255) NOT NULL,
    type character varying(2) NOT NULL,
    description text NOT NULL,
    is_active boolean NOT NULL,
    curriculum_id character varying(36) NOT NULL,
    first_update_id character varying(36),
    last_update_id character varying(36),
    topic_id character varying(36),
    reference_id character varying(36),
    duration character varying(100) NOT NULL
);


ALTER TABLE assessments_lesson OWNER TO magency;

--
-- Name: assessments_lessondimensionweight; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE assessments_lessondimensionweight (
    id character varying(36) NOT NULL,
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    weight integer NOT NULL,
    dimension_id character varying(36) NOT NULL,
    first_update_id character varying(36),
    last_update_id character varying(36),
    lesson_id character varying(36) NOT NULL,
    CONSTRAINT assessments_lessondimensionweight_weight_check CHECK ((weight >= 0))
);


ALTER TABLE assessments_lessondimensionweight OWNER TO magency;

--
-- Name: assessments_lessonrecommendationthreshold; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE assessments_lessonrecommendationthreshold (
    id character varying(36) NOT NULL,
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    threshold integer NOT NULL,
    first_update_id character varying(36),
    last_update_id character varying(36),
    lesson_id character varying(36) NOT NULL,
    level_id character varying(36) NOT NULL,
    CONSTRAINT assessments_lessonrecommendationthreshold_threshold_check CHECK ((threshold >= 0))
);


ALTER TABLE assessments_lessonrecommendationthreshold OWNER TO magency;

--
-- Name: assessments_lessonreference; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE assessments_lessonreference (
    id character varying(36) NOT NULL,
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    external_id character varying(255) NOT NULL,
    external_name character varying(255) NOT NULL,
    first_update_id character varying(36),
    last_update_id character varying(36)
);


ALTER TABLE assessments_lessonreference OWNER TO magency;

--
-- Name: assessments_recommendationlevel; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE assessments_recommendationlevel (
    sort_order integer NOT NULL,
    id character varying(36) NOT NULL,
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    name character varying(255) NOT NULL,
    description text NOT NULL,
    first_update_id character varying(36),
    last_update_id character varying(36),
    is_reference boolean NOT NULL
);


ALTER TABLE assessments_recommendationlevel OWNER TO magency;

--
-- Name: assessments_topic; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE assessments_topic (
    sort_order integer NOT NULL,
    id character varying(36) NOT NULL,
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    name character varying(255) NOT NULL,
    description text NOT NULL,
    first_update_id character varying(36),
    last_update_id character varying(36),
    curriculum_id character varying(36) NOT NULL
);


ALTER TABLE assessments_topic OWNER TO magency;

--
-- Name: assessments_userlessonrecommendation; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE assessments_userlessonrecommendation (
    id character varying(36) NOT NULL,
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    first_update_id character varying(36),
    last_update_id character varying(36),
    lesson_id character varying(36) NOT NULL,
    level_id character varying(36) NOT NULL,
    score integer NOT NULL,
    certification_id character varying(36),
    CONSTRAINT assessments_userlessonrecommendation_score_check CHECK ((score >= 0))
);


ALTER TABLE assessments_userlessonrecommendation OWNER TO magency;

--
-- Name: auth_group; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE auth_group (
    id integer NOT NULL,
    name character varying(80) NOT NULL
);


ALTER TABLE auth_group OWNER TO magency;

--
-- Name: auth_group_id_seq; Type: SEQUENCE; Schema: public; Owner: magency
--

CREATE SEQUENCE auth_group_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE auth_group_id_seq OWNER TO magency;

--
-- Name: auth_group_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: magency
--

ALTER SEQUENCE auth_group_id_seq OWNED BY auth_group.id;


--
-- Name: auth_group_permissions; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE auth_group_permissions (
    id integer NOT NULL,
    group_id integer NOT NULL,
    permission_id integer NOT NULL
);


ALTER TABLE auth_group_permissions OWNER TO magency;

--
-- Name: auth_group_permissions_id_seq; Type: SEQUENCE; Schema: public; Owner: magency
--

CREATE SEQUENCE auth_group_permissions_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE auth_group_permissions_id_seq OWNER TO magency;

--
-- Name: auth_group_permissions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: magency
--

ALTER SEQUENCE auth_group_permissions_id_seq OWNED BY auth_group_permissions.id;


--
-- Name: auth_permission; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE auth_permission (
    id integer NOT NULL,
    name character varying(255) NOT NULL,
    content_type_id integer NOT NULL,
    codename character varying(100) NOT NULL
);


ALTER TABLE auth_permission OWNER TO magency;

--
-- Name: auth_permission_id_seq; Type: SEQUENCE; Schema: public; Owner: magency
--

CREATE SEQUENCE auth_permission_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE auth_permission_id_seq OWNER TO magency;

--
-- Name: auth_permission_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: magency
--

ALTER SEQUENCE auth_permission_id_seq OWNED BY auth_permission.id;


--
-- Name: brainstormers_brainstormer; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE brainstormers_brainstormer (
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    id character varying(36) NOT NULL,
    first_update_id character varying(36),
    last_update_id character varying(36),
    session_id character varying(36) NOT NULL,
    activity_id character varying(36),
    name character varying(100) NOT NULL,
    sort_order integer NOT NULL
);


ALTER TABLE brainstormers_brainstormer OWNER TO magency;

--
-- Name: brainstormers_brainstormeractivity; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE brainstormers_brainstormeractivity (
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    id character varying(36) NOT NULL,
    name character varying(100) NOT NULL,
    preview character varying(100) NOT NULL,
    hash_preview character varying(36) NOT NULL,
    image character varying(100),
    hash_image character varying(36) NOT NULL,
    first_update_id character varying(36),
    last_update_id character varying(36)
);


ALTER TABLE brainstormers_brainstormeractivity OWNER TO magency;

--
-- Name: brainstormers_brainstormeractivity_trainings; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE brainstormers_brainstormeractivity_trainings (
    id integer NOT NULL,
    brainstormeractivity_id character varying(36) NOT NULL,
    training_id character varying(36) NOT NULL
);


ALTER TABLE brainstormers_brainstormeractivity_trainings OWNER TO magency;

--
-- Name: brainstormers_brainstormeractivity_trainings_id_seq; Type: SEQUENCE; Schema: public; Owner: magency
--

CREATE SEQUENCE brainstormers_brainstormeractivity_trainings_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE brainstormers_brainstormeractivity_trainings_id_seq OWNER TO magency;

--
-- Name: brainstormers_brainstormeractivity_trainings_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: magency
--

ALTER SEQUENCE brainstormers_brainstormeractivity_trainings_id_seq OWNED BY brainstormers_brainstormeractivity_trainings.id;


--
-- Name: brainstormers_brainstormerproposition; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE brainstormers_brainstormerproposition (
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    id character varying(36) NOT NULL,
    text character varying(100) NOT NULL,
    first_update_id character varying(36),
    group_id character varying(36) NOT NULL,
    last_update_id character varying(36),
    user_id character varying(36) NOT NULL,
    sort_order integer NOT NULL
);


ALTER TABLE brainstormers_brainstormerproposition OWNER TO magency;

--
-- Name: brainstormers_brainstormerpropositiongroup; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE brainstormers_brainstormerpropositiongroup (
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    id character varying(36) NOT NULL,
    name character varying(50) NOT NULL,
    color character varying(30) NOT NULL,
    coord_x numeric(6,2) NOT NULL,
    coord_y numeric(6,2) NOT NULL,
    brainstormer_id character varying(36) NOT NULL,
    first_update_id character varying(36),
    last_update_id character varying(36),
    sort_order integer NOT NULL
);


ALTER TABLE brainstormers_brainstormerpropositiongroup OWNER TO magency;

--
-- Name: brainstormers_brainstormertemplate; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE brainstormers_brainstormertemplate (
    activity_id character varying(36),
    trainingactivity_ptr_id character varying(36) NOT NULL
);


ALTER TABLE brainstormers_brainstormertemplate OWNER TO magency;

--
-- Name: django_admin_log; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE django_admin_log (
    id integer NOT NULL,
    action_time timestamp with time zone NOT NULL,
    object_id text,
    object_repr character varying(200) NOT NULL,
    action_flag smallint NOT NULL,
    change_message text NOT NULL,
    content_type_id integer,
    user_id character varying(36) NOT NULL,
    CONSTRAINT django_admin_log_action_flag_check CHECK ((action_flag >= 0))
);


ALTER TABLE django_admin_log OWNER TO magency;

--
-- Name: django_admin_log_id_seq; Type: SEQUENCE; Schema: public; Owner: magency
--

CREATE SEQUENCE django_admin_log_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE django_admin_log_id_seq OWNER TO magency;

--
-- Name: django_admin_log_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: magency
--

ALTER SEQUENCE django_admin_log_id_seq OWNED BY django_admin_log.id;


--
-- Name: django_content_type; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE django_content_type (
    id integer NOT NULL,
    app_label character varying(100) NOT NULL,
    model character varying(100) NOT NULL
);


ALTER TABLE django_content_type OWNER TO magency;

--
-- Name: django_content_type_id_seq; Type: SEQUENCE; Schema: public; Owner: magency
--

CREATE SEQUENCE django_content_type_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE django_content_type_id_seq OWNER TO magency;

--
-- Name: django_content_type_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: magency
--

ALTER SEQUENCE django_content_type_id_seq OWNED BY django_content_type.id;


--
-- Name: django_migrations; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE django_migrations (
    id integer NOT NULL,
    app character varying(255) NOT NULL,
    name character varying(255) NOT NULL,
    applied timestamp with time zone NOT NULL
);


ALTER TABLE django_migrations OWNER TO magency;

--
-- Name: django_migrations_id_seq; Type: SEQUENCE; Schema: public; Owner: magency
--

CREATE SEQUENCE django_migrations_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE django_migrations_id_seq OWNER TO magency;

--
-- Name: django_migrations_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: magency
--

ALTER SEQUENCE django_migrations_id_seq OWNED BY django_migrations.id;


--
-- Name: django_session; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE django_session (
    session_key character varying(40) NOT NULL,
    session_data text NOT NULL,
    expire_date timestamp with time zone NOT NULL
);


ALTER TABLE django_session OWNER TO magency;

--
-- Name: django_site; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE django_site (
    id integer NOT NULL,
    domain character varying(100) NOT NULL,
    name character varying(50) NOT NULL
);


ALTER TABLE django_site OWNER TO magency;

--
-- Name: django_site_id_seq; Type: SEQUENCE; Schema: public; Owner: magency
--

CREATE SEQUENCE django_site_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE django_site_id_seq OWNER TO magency;

--
-- Name: django_site_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: magency
--

ALTER SEQUENCE django_site_id_seq OWNED BY django_site.id;


--
-- Name: documents_backgroundexecution; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE documents_backgroundexecution (
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    id character varying(36) NOT NULL,
    begin_date time without time zone NOT NULL,
    end_date time without time zone NOT NULL,
    action character varying(20) NOT NULL,
    title character varying(50) NOT NULL,
    description character varying(250) NOT NULL,
    locked boolean NOT NULL,
    document_id character varying(36),
    first_update_id character varying(36),
    last_update_id character varying(36)
);


ALTER TABLE documents_backgroundexecution OWNER TO magency;

--
-- Name: documents_backgroundexecution_auto_mgroups; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE documents_backgroundexecution_auto_mgroups (
    id integer NOT NULL,
    backgroundexecution_id character varying(36) NOT NULL,
    group_id character varying(36) NOT NULL
);


ALTER TABLE documents_backgroundexecution_auto_mgroups OWNER TO magency;

--
-- Name: documents_backgroundexecution_auto_mgroups_id_seq; Type: SEQUENCE; Schema: public; Owner: magency
--

CREATE SEQUENCE documents_backgroundexecution_auto_mgroups_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE documents_backgroundexecution_auto_mgroups_id_seq OWNER TO magency;

--
-- Name: documents_backgroundexecution_auto_mgroups_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: magency
--

ALTER SEQUENCE documents_backgroundexecution_auto_mgroups_id_seq OWNED BY documents_backgroundexecution_auto_mgroups.id;


--
-- Name: documents_backgroundexecution_mgroups; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE documents_backgroundexecution_mgroups (
    id integer NOT NULL,
    backgroundexecution_id character varying(36) NOT NULL,
    group_id character varying(36) NOT NULL
);


ALTER TABLE documents_backgroundexecution_mgroups OWNER TO magency;

--
-- Name: documents_backgroundexecution_mgroups_id_seq; Type: SEQUENCE; Schema: public; Owner: magency
--

CREATE SEQUENCE documents_backgroundexecution_mgroups_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE documents_backgroundexecution_mgroups_id_seq OWNER TO magency;

--
-- Name: documents_backgroundexecution_mgroups_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: magency
--

ALTER SEQUENCE documents_backgroundexecution_mgroups_id_seq OWNED BY documents_backgroundexecution_mgroups.id;


--
-- Name: documents_document; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE documents_document (
    trainee_document_file character varying(100) NOT NULL,
    trainee_document_file_hash character varying(36) NOT NULL,
    trainer_document_file character varying(100) NOT NULL,
    trainer_document_file_hash character varying(36) NOT NULL,
    trainer_only boolean NOT NULL,
    trainingactivity_ptr_id character varying(36) NOT NULL
);


ALTER TABLE documents_document OWNER TO magency;

--
-- Name: documents_note; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE documents_note (
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    id character varying(36) NOT NULL,
    page integer NOT NULL,
    coord_x double precision NOT NULL,
    coord_y double precision NOT NULL,
    width double precision NOT NULL,
    height double precision NOT NULL,
    text text NOT NULL,
    note_type character varying(100) NOT NULL,
    document_id character varying(36),
    first_update_id character varying(36),
    last_update_id character varying(36),
    user_id character varying(36) NOT NULL,
    session_id character varying(36) NOT NULL,
    CONSTRAINT documents_note_page_check CHECK ((page >= 0))
);


ALTER TABLE documents_note OWNER TO magency;

--
-- Name: evaluations_criterion; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE evaluations_criterion (
    sort_order integer NOT NULL,
    id character varying(36) NOT NULL,
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    description text NOT NULL,
    criterion_type character varying(2) NOT NULL,
    exercise_id character varying(36) NOT NULL,
    first_update_id character varying(36),
    last_update_id character varying(36),
    original_version_id character varying(36),
    parent_version_id character varying(36)
);


ALTER TABLE evaluations_criterion OWNER TO magency;

--
-- Name: evaluations_evaluation; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE evaluations_evaluation (
    trainingactivity_ptr_id character varying(36) NOT NULL,
    hidden boolean NOT NULL,
    evaluation_type character varying(32) NOT NULL
);


ALTER TABLE evaluations_evaluation OWNER TO magency;

--
-- Name: evaluations_evaluationgrouppermission; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE evaluations_evaluationgrouppermission (
    id character varying(36) NOT NULL,
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    permission character varying(32) NOT NULL,
    evaluation_id character varying(36) NOT NULL,
    first_update_id character varying(36),
    group_id character varying(36) NOT NULL,
    last_update_id character varying(36)
);


ALTER TABLE evaluations_evaluationgrouppermission OWNER TO magency;

--
-- Name: evaluations_exercise; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE evaluations_exercise (
    sort_order integer NOT NULL,
    id character varying(36) NOT NULL,
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    name character varying(50) NOT NULL,
    description text NOT NULL,
    start_range integer NOT NULL,
    end_range integer NOT NULL,
    step integer NOT NULL,
    preview character varying(100),
    evaluation_id character varying(36) NOT NULL,
    first_update_id character varying(36),
    last_update_id character varying(36),
    original_version_id character varying(36),
    parent_version_id character varying(36),
    CONSTRAINT evaluations_exercise_end_range_check CHECK ((end_range >= 0)),
    CONSTRAINT evaluations_exercise_start_range_check CHECK ((start_range >= 0)),
    CONSTRAINT evaluations_exercise_step_check CHECK ((step >= 0))
);


ALTER TABLE evaluations_exercise OWNER TO magency;

--
-- Name: evaluations_rating; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE evaluations_rating (
    id character varying(36) NOT NULL,
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    text text NOT NULL,
    score integer,
    criterion_id character varying(36) NOT NULL,
    first_update_id character varying(36),
    judge_id character varying(36) NOT NULL,
    last_update_id character varying(36),
    session_id character varying(36),
    trainee_id character varying(36) NOT NULL,
    CONSTRAINT evaluations_rating_score_check CHECK ((score >= 0))
);


ALTER TABLE evaluations_rating OWNER TO magency;

--
-- Name: eventlog_eventlog; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE eventlog_eventlog (
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    id character varying(36) NOT NULL,
    created_at timestamp with time zone NOT NULL,
    action character varying(64) NOT NULL,
    subject_pk character varying(36) NOT NULL,
    source_pk character varying(36),
    target_pk character varying(36),
    extra text NOT NULL,
    first_update_id character varying(36),
    last_update_id character varying(36),
    source_type_id integer,
    subject_type_id integer NOT NULL,
    target_type_id integer
);


ALTER TABLE eventlog_eventlog OWNER TO magency;

--
-- Name: likes_like; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE likes_like (
    id character varying(36) NOT NULL,
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    weight smallint NOT NULL,
    date_time timestamp with time zone NOT NULL,
    object_uuid uuid NOT NULL,
    author_id character varying(36) NOT NULL,
    content_type_id integer NOT NULL,
    first_update_id character varying(36),
    last_update_id character varying(36)
);


ALTER TABLE likes_like OWNER TO magency;

--
-- Name: metaplans_metaplan; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE metaplans_metaplan (
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    id character varying(36) NOT NULL,
    first_update_id character varying(36),
    last_update_id character varying(36),
    session_id character varying(36) NOT NULL,
    name character varying(100) NOT NULL,
    sort_order integer NOT NULL
);


ALTER TABLE metaplans_metaplan OWNER TO magency;

--
-- Name: metaplans_metaplanproposition; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE metaplans_metaplanproposition (
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    id character varying(36) NOT NULL,
    text character varying(100) NOT NULL,
    "group" integer NOT NULL,
    first_update_id character varying(36),
    last_update_id character varying(36),
    user_id character varying(36) NOT NULL,
    metaplan_id character varying(36) NOT NULL,
    CONSTRAINT metaplans_metaplanproposition_group_55735b5987e8e6b2_check CHECK (("group" >= 0))
);


ALTER TABLE metaplans_metaplanproposition OWNER TO magency;

--
-- Name: metaplans_metaplantemplate; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE metaplans_metaplantemplate (
    trainingactivity_ptr_id character varying(36) NOT NULL
);


ALTER TABLE metaplans_metaplantemplate OWNER TO magency;

--
-- Name: notifications_noticequeuebatch; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE notifications_noticequeuebatch (
    id integer NOT NULL,
    pickled_data text NOT NULL
);


ALTER TABLE notifications_noticequeuebatch OWNER TO magency;

--
-- Name: notifications_noticequeuebatch_id_seq; Type: SEQUENCE; Schema: public; Owner: magency
--

CREATE SEQUENCE notifications_noticequeuebatch_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE notifications_noticequeuebatch_id_seq OWNER TO magency;

--
-- Name: notifications_noticequeuebatch_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: magency
--

ALTER SEQUENCE notifications_noticequeuebatch_id_seq OWNED BY notifications_noticequeuebatch.id;


--
-- Name: notifications_noticesetting; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE notifications_noticesetting (
    id integer NOT NULL,
    medium character varying(1) NOT NULL,
    send boolean NOT NULL,
    scoping_object_id integer,
    notice_type_id integer NOT NULL,
    scoping_content_type_id integer,
    user_id character varying(36) NOT NULL,
    CONSTRAINT notifications_noticesetting_scoping_object_id_check CHECK ((scoping_object_id >= 0))
);


ALTER TABLE notifications_noticesetting OWNER TO magency;

--
-- Name: notifications_noticesetting_id_seq; Type: SEQUENCE; Schema: public; Owner: magency
--

CREATE SEQUENCE notifications_noticesetting_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE notifications_noticesetting_id_seq OWNER TO magency;

--
-- Name: notifications_noticesetting_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: magency
--

ALTER SEQUENCE notifications_noticesetting_id_seq OWNED BY notifications_noticesetting.id;


--
-- Name: notifications_noticetype; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE notifications_noticetype (
    id integer NOT NULL,
    label character varying(40) NOT NULL,
    display character varying(50) NOT NULL,
    description character varying(100) NOT NULL,
    "default" integer NOT NULL
);


ALTER TABLE notifications_noticetype OWNER TO magency;

--
-- Name: notifications_noticetype_id_seq; Type: SEQUENCE; Schema: public; Owner: magency
--

CREATE SEQUENCE notifications_noticetype_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE notifications_noticetype_id_seq OWNER TO magency;

--
-- Name: notifications_noticetype_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: magency
--

ALTER SEQUENCE notifications_noticetype_id_seq OWNED BY notifications_noticetype.id;


--
-- Name: oauth2_provider_accesstoken; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE oauth2_provider_accesstoken (
    id integer NOT NULL,
    token character varying(255) NOT NULL,
    expires timestamp with time zone NOT NULL,
    scope text NOT NULL,
    application_id integer NOT NULL,
    user_id character varying(36)
);


ALTER TABLE oauth2_provider_accesstoken OWNER TO magency;

--
-- Name: oauth2_provider_accesstoken_id_seq; Type: SEQUENCE; Schema: public; Owner: magency
--

CREATE SEQUENCE oauth2_provider_accesstoken_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE oauth2_provider_accesstoken_id_seq OWNER TO magency;

--
-- Name: oauth2_provider_accesstoken_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: magency
--

ALTER SEQUENCE oauth2_provider_accesstoken_id_seq OWNED BY oauth2_provider_accesstoken.id;


--
-- Name: oauth2_provider_application; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE oauth2_provider_application (
    id integer NOT NULL,
    client_id character varying(100) NOT NULL,
    redirect_uris text NOT NULL,
    client_type character varying(32) NOT NULL,
    authorization_grant_type character varying(32) NOT NULL,
    client_secret character varying(255) NOT NULL,
    name character varying(255) NOT NULL,
    user_id character varying(36) NOT NULL,
    skip_authorization boolean NOT NULL
);


ALTER TABLE oauth2_provider_application OWNER TO magency;

--
-- Name: oauth2_provider_application_id_seq; Type: SEQUENCE; Schema: public; Owner: magency
--

CREATE SEQUENCE oauth2_provider_application_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE oauth2_provider_application_id_seq OWNER TO magency;

--
-- Name: oauth2_provider_application_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: magency
--

ALTER SEQUENCE oauth2_provider_application_id_seq OWNED BY oauth2_provider_application.id;


--
-- Name: oauth2_provider_grant; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE oauth2_provider_grant (
    id integer NOT NULL,
    code character varying(255) NOT NULL,
    expires timestamp with time zone NOT NULL,
    redirect_uri character varying(255) NOT NULL,
    scope text NOT NULL,
    application_id integer NOT NULL,
    user_id character varying(36) NOT NULL
);


ALTER TABLE oauth2_provider_grant OWNER TO magency;

--
-- Name: oauth2_provider_grant_id_seq; Type: SEQUENCE; Schema: public; Owner: magency
--

CREATE SEQUENCE oauth2_provider_grant_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE oauth2_provider_grant_id_seq OWNER TO magency;

--
-- Name: oauth2_provider_grant_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: magency
--

ALTER SEQUENCE oauth2_provider_grant_id_seq OWNED BY oauth2_provider_grant.id;


--
-- Name: oauth2_provider_refreshtoken; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE oauth2_provider_refreshtoken (
    id integer NOT NULL,
    token character varying(255) NOT NULL,
    access_token_id integer NOT NULL,
    application_id integer NOT NULL,
    user_id character varying(36) NOT NULL
);


ALTER TABLE oauth2_provider_refreshtoken OWNER TO magency;

--
-- Name: oauth2_provider_refreshtoken_id_seq; Type: SEQUENCE; Schema: public; Owner: magency
--

CREATE SEQUENCE oauth2_provider_refreshtoken_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE oauth2_provider_refreshtoken_id_seq OWNER TO magency;

--
-- Name: oauth2_provider_refreshtoken_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: magency
--

ALTER SEQUENCE oauth2_provider_refreshtoken_id_seq OWNED BY oauth2_provider_refreshtoken.id;


--
-- Name: roleplays_criterion; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE roleplays_criterion (
    sort_order integer NOT NULL,
    id character varying(36) NOT NULL,
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    name character varying(500) NOT NULL,
    description text NOT NULL,
    criterion_type character varying(2) NOT NULL,
    first_update_id character varying(36),
    last_update_id character varying(36),
    step_id character varying(36) NOT NULL,
    activity_id character varying(36),
    activity_type_id integer,
    is_assessing boolean NOT NULL,
    training_id character varying(36),
    original_version_id character varying(36),
    parent_version_id character varying(36)
);


ALTER TABLE roleplays_criterion OWNER TO magency;

--
-- Name: roleplays_criterion_dimensions; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE roleplays_criterion_dimensions (
    id integer NOT NULL,
    criterion_id character varying(36) NOT NULL,
    dimension_id character varying(36) NOT NULL
);


ALTER TABLE roleplays_criterion_dimensions OWNER TO magency;

--
-- Name: roleplays_criterion_dimensions_id_seq; Type: SEQUENCE; Schema: public; Owner: magency
--

CREATE SEQUENCE roleplays_criterion_dimensions_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE roleplays_criterion_dimensions_id_seq OWNER TO magency;

--
-- Name: roleplays_criterion_dimensions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: magency
--

ALTER SEQUENCE roleplays_criterion_dimensions_id_seq OWNED BY roleplays_criterion_dimensions.id;


--
-- Name: roleplays_rating; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE roleplays_rating (
    id character varying(36) NOT NULL,
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    text text NOT NULL,
    score integer,
    criterion_id character varying(36) NOT NULL,
    first_update_id character varying(36),
    last_update_id character varying(36),
    trainee_id character varying(36) NOT NULL,
    training_session_id character varying(36) NOT NULL,
    CONSTRAINT roleplays_rating_score_check CHECK ((score >= 0))
);


ALTER TABLE roleplays_rating OWNER TO magency;

--
-- Name: roleplays_roleplay; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE roleplays_roleplay (
    are_criteria_ratings_editable boolean NOT NULL,
    criteria_rating_scale integer NOT NULL,
    criteria_rating_type character varying(2) NOT NULL,
    "order" integer NOT NULL,
    rating_scale text NOT NULL,
    trainingactivity_ptr_id character varying(36) NOT NULL,
    CONSTRAINT roleplays_roleplay_criteria_rating_scale_check CHECK ((criteria_rating_scale >= 0)),
    CONSTRAINT roleplays_roleplay_order_check CHECK (("order" >= 0))
);


ALTER TABLE roleplays_roleplay OWNER TO magency;

--
-- Name: roleplays_step; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE roleplays_step (
    sort_order integer NOT NULL,
    id character varying(36) NOT NULL,
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    name character varying(500) NOT NULL,
    description text NOT NULL,
    duration interval NOT NULL,
    first_update_id character varying(36),
    last_update_id character varying(36),
    roleplay_id character varying(36) NOT NULL,
    original_version_id character varying(36),
    parent_version_id character varying(36)
);


ALTER TABLE roleplays_step OWNER TO magency;

--
-- Name: surveys_answer; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE surveys_answer (
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    id character varying(36) NOT NULL,
    text text NOT NULL,
    first_update_id character varying(36),
    last_update_id character varying(36),
    question_id character varying(36) NOT NULL,
    survey_id character varying(36) NOT NULL,
    trainee_id character varying(36) NOT NULL,
    training_session_id character varying(36) NOT NULL,
    "time" timestamp with time zone NOT NULL
);


ALTER TABLE surveys_answer OWNER TO magency;

--
-- Name: surveys_answer_choices; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE surveys_answer_choices (
    id integer NOT NULL,
    answer_id character varying(36) NOT NULL,
    choice_id character varying(36) NOT NULL
);


ALTER TABLE surveys_answer_choices OWNER TO magency;

--
-- Name: surveys_answer_choices_id_seq; Type: SEQUENCE; Schema: public; Owner: magency
--

CREATE SEQUENCE surveys_answer_choices_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE surveys_answer_choices_id_seq OWNER TO magency;

--
-- Name: surveys_answer_choices_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: magency
--

ALTER SEQUENCE surveys_answer_choices_id_seq OWNED BY surveys_answer_choices.id;


--
-- Name: surveys_choice; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE surveys_choice (
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    id character varying(36) NOT NULL,
    label character varying(500) NOT NULL,
    value_number integer,
    value_text character varying(500),
    first_update_id character varying(36),
    last_update_id character varying(36),
    question_id character varying(36) NOT NULL,
    details text NOT NULL,
    sort_order integer NOT NULL
);


ALTER TABLE surveys_choice OWNER TO magency;

--
-- Name: surveys_pool; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE surveys_pool (
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    id character varying(36) NOT NULL,
    name character varying(500) NOT NULL,
    description text NOT NULL,
    is_global boolean NOT NULL,
    is_mandatory boolean NOT NULL,
    author_id character varying(36) NOT NULL,
    first_update_id character varying(36),
    last_update_id character varying(36),
    sort_order integer NOT NULL
);


ALTER TABLE surveys_pool OWNER TO magency;

--
-- Name: surveys_question; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE surveys_question (
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    id character varying(36) NOT NULL,
    title character varying(500) NOT NULL,
    details text NOT NULL,
    question_type character varying(1) NOT NULL,
    value_type character varying(1) NOT NULL,
    first_update_id character varying(36),
    last_update_id character varying(36),
    pool_id character varying(36) NOT NULL,
    is_for_global_satisfaction boolean NOT NULL,
    sort_order integer NOT NULL
);


ALTER TABLE surveys_question OWNER TO magency;

--
-- Name: surveys_survey; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE surveys_survey (
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    id character varying(36) NOT NULL,
    first_update_id character varying(36),
    last_update_id character varying(36),
    trainer_id character varying(36) NOT NULL,
    training_id character varying(36) NOT NULL
);


ALTER TABLE surveys_survey OWNER TO magency;

--
-- Name: surveys_surveypool; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE surveys_surveypool (
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    id character varying(36) NOT NULL,
    is_displayed boolean NOT NULL,
    is_new boolean NOT NULL,
    first_update_id character varying(36),
    last_update_id character varying(36),
    pool_id character varying(36) NOT NULL,
    survey_id character varying(36) NOT NULL
);


ALTER TABLE surveys_surveypool OWNER TO magency;

--
-- Name: sync_clientversion; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE sync_clientversion (
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    id character varying(36) NOT NULL,
    name character varying(30) NOT NULL,
    bundle_name character varying(255) NOT NULL,
    version integer NOT NULL,
    file character varying(100) NOT NULL,
    hash character varying(36),
    first_update_id character varying(36),
    last_update_id character varying(36),
    CONSTRAINT sync_clientversion_version_check CHECK ((version >= 0))
);


ALTER TABLE sync_clientversion OWNER TO magency;

--
-- Name: sync_localserver; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE sync_localserver (
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    id character varying(36) NOT NULL,
    mac character varying(50) NOT NULL,
    name character varying(150) NOT NULL,
    currently_update boolean NOT NULL,
    first_update_id character varying(36),
    last_update_id character varying(36)
);


ALTER TABLE sync_localserver OWNER TO magency;

--
-- Name: sync_localserverconnection; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE sync_localserverconnection (
    id integer NOT NULL,
    date timestamp with time zone NOT NULL,
    "time" integer NOT NULL,
    update_count integer NOT NULL,
    local_server_id character varying(36) NOT NULL,
    CONSTRAINT sync_localserverconnection_time_check CHECK (("time" >= 0)),
    CONSTRAINT sync_localserverconnection_update_count_check CHECK ((update_count >= 0))
);


ALTER TABLE sync_localserverconnection OWNER TO magency;

--
-- Name: sync_localserverconnection_id_seq; Type: SEQUENCE; Schema: public; Owner: magency
--

CREATE SEQUENCE sync_localserverconnection_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE sync_localserverconnection_id_seq OWNER TO magency;

--
-- Name: sync_localserverconnection_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: magency
--

ALTER SEQUENCE sync_localserverconnection_id_seq OWNED BY sync_localserverconnection.id;


--
-- Name: sync_serverversion; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE sync_serverversion (
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    id character varying(36) NOT NULL,
    name character varying(30) NOT NULL,
    version integer NOT NULL,
    file character varying(100) NOT NULL,
    hash character varying(36),
    first_update_id character varying(36),
    last_update_id character varying(36),
    CONSTRAINT sync_serverversion_version_check CHECK ((version >= 0))
);


ALTER TABLE sync_serverversion OWNER TO magency;

--
-- Name: sync_task; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE sync_task (
    id integer NOT NULL,
    date timestamp with time zone NOT NULL,
    path character varying(1000) NOT NULL,
    done boolean NOT NULL,
    finish_path character varying(1000) NOT NULL
);


ALTER TABLE sync_task OWNER TO magency;

--
-- Name: sync_task_id_seq; Type: SEQUENCE; Schema: public; Owner: magency
--

CREATE SEQUENCE sync_task_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE sync_task_id_seq OWNER TO magency;

--
-- Name: sync_task_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: magency
--

ALTER SEQUENCE sync_task_id_seq OWNED BY sync_task.id;


--
-- Name: sync_update; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE sync_update (
    id character varying(36) NOT NULL,
    date timestamp with time zone NOT NULL,
    healthy boolean NOT NULL,
    synchronized boolean NOT NULL
);


ALTER TABLE sync_update OWNER TO magency;

--
-- Name: themes_theme; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE themes_theme (
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    id character varying(36) NOT NULL,
    name character varying(200) NOT NULL,
    color_first character varying(10) NOT NULL,
    color_second character varying(10) NOT NULL,
    color_item character varying(10) NOT NULL,
    color_selected_item character varying(10) NOT NULL,
    color_text_item character varying(10) NOT NULL,
    color_text_selected_item character varying(10) NOT NULL,
    color_text_quizz character varying(10) NOT NULL,
    background_color character varying(10) NOT NULL,
    background_color_diffusion character varying(10) NOT NULL,
    background_image character varying(100) NOT NULL,
    background_image_hash character varying(36),
    background_image_diffusion character varying(100) NOT NULL,
    background_image_diffusion_hash character varying(36),
    "default" boolean NOT NULL,
    first_update_id character varying(36),
    last_update_id character varying(36),
    accent_blue character varying(64) NOT NULL,
    accent_green character varying(64) NOT NULL,
    accent_pink character varying(64) NOT NULL,
    accent_red character varying(64) NOT NULL,
    accent_white character varying(64) NOT NULL,
    accent_yellow character varying(64) NOT NULL,
    background character varying(64) NOT NULL,
    clear character varying(64) NOT NULL,
    complementary character varying(64) NOT NULL,
    font_bold_name character varying(64) NOT NULL,
    font_name character varying(64) NOT NULL,
    font_thin_name character varying(64) NOT NULL,
    gray character varying(64) NOT NULL,
    gray_darker character varying(64) NOT NULL,
    gray_lighter character varying(64) NOT NULL,
    main character varying(64) NOT NULL,
    main_darker character varying(64) NOT NULL,
    main_lighter character varying(64) NOT NULL,
    text_on_clear character varying(64) NOT NULL,
    text_on_complementary character varying(64) NOT NULL,
    text_on_main character varying(64) NOT NULL,
    text_on_main_darker character varying(64) NOT NULL,
    text_on_main_lighter character varying(64) NOT NULL,
    header_image character varying(100) NOT NULL,
    header_image_hash character varying(64) NOT NULL,
    home_diffusion_image character varying(100) NOT NULL,
    home_diffusion_image_hash character varying(64) NOT NULL,
    brand_logo character varying(100) NOT NULL
);


ALTER TABLE themes_theme OWNER TO magency;

--
-- Name: trainings_action; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE trainings_action (
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    id character varying(36) NOT NULL,
    action character varying(20) NOT NULL,
    module character varying(40) NOT NULL,
    module_id character varying(100) NOT NULL,
    external_id character varying(100) NOT NULL,
    first_update_id character varying(36),
    last_update_id character varying(36),
    training_id character varying(36) NOT NULL,
    user_id character varying(36)
);


ALTER TABLE trainings_action OWNER TO magency;

--
-- Name: trainings_action_mgroups; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE trainings_action_mgroups (
    id integer NOT NULL,
    action_id character varying(36) NOT NULL,
    group_id character varying(36) NOT NULL
);


ALTER TABLE trainings_action_mgroups OWNER TO magency;

--
-- Name: trainings_action_mgroups_id_seq; Type: SEQUENCE; Schema: public; Owner: magency
--

CREATE SEQUENCE trainings_action_mgroups_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE trainings_action_mgroups_id_seq OWNER TO magency;

--
-- Name: trainings_action_mgroups_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: magency
--

ALTER SEQUENCE trainings_action_mgroups_id_seq OWNED BY trainings_action_mgroups.id;


--
-- Name: trainings_currentsession; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE trainings_currentsession (
    id integer NOT NULL,
    session_id character varying(36) NOT NULL
);


ALTER TABLE trainings_currentsession OWNER TO magency;

--
-- Name: trainings_currentsession_id_seq; Type: SEQUENCE; Schema: public; Owner: magency
--

CREATE SEQUENCE trainings_currentsession_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE trainings_currentsession_id_seq OWNER TO magency;

--
-- Name: trainings_currentsession_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: magency
--

ALTER SEQUENCE trainings_currentsession_id_seq OWNED BY trainings_currentsession.id;


--
-- Name: trainings_training; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE trainings_training (
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    id character varying(36) NOT NULL,
    name character varying(30) NOT NULL,
    description text NOT NULL,
    default_group_set_id character varying(36),
    first_update_id character varying(36),
    last_update_id character varying(36),
    theme_id character varying(36),
    header_image character varying(100),
    header_image_hash character varying(64) NOT NULL,
    job_profile_id character varying(36),
    owner_id character varying(36) NOT NULL,
    created_at timestamp with time zone NOT NULL,
    original_version_id character varying(36),
    parent_version_id character varying(36),
    thumbnail_image character varying(100),
    thumbnail_image_hash character varying(64) NOT NULL,
    version_state character varying(1) NOT NULL,
    business_unit_id character varying(36),
    external_id character varying(255) NOT NULL
);


ALTER TABLE trainings_training OWNER TO magency;

--
-- Name: trainings_trainingactivity; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE trainings_trainingactivity (
    sort_order integer NOT NULL,
    id character varying(36) NOT NULL,
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    is_assessing boolean NOT NULL,
    weight integer NOT NULL,
    name character varying(255) NOT NULL,
    description text NOT NULL,
    first_update_id character varying(36),
    last_update_id character varying(36),
    original_version_id character varying(36),
    parent_version_id character varying(36),
    polymorphic_ctype_id integer,
    training_id character varying(36) NOT NULL,
    needs_approval boolean NOT NULL,
    CONSTRAINT trainings_trainingactivity_weight_check CHECK ((weight >= 0))
);


ALTER TABLE trainings_trainingactivity OWNER TO magency;

--
-- Name: trainings_trainingclientoptions; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE trainings_trainingclientoptions (
    id character varying(36) NOT NULL,
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    activate_show_results boolean NOT NULL,
    first_update_id character varying(36),
    last_update_id character varying(36),
    original_version_id character varying(36),
    parent_version_id character varying(36),
    training_id character varying(36) NOT NULL,
    activate_qrcode_launcher boolean NOT NULL,
    activate_activity_quickcreation boolean NOT NULL
);


ALTER TABLE trainings_trainingclientoptions OWNER TO magency;

--
-- Name: trainings_trainingsession; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE trainings_trainingsession (
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    id character varying(36) NOT NULL,
    start_date timestamp with time zone NOT NULL,
    end_date timestamp with time zone NOT NULL,
    state character varying(2) NOT NULL,
    permissions character varying(2) NOT NULL,
    first_update_id character varying(36),
    last_update_id character varying(36),
    trainer_id character varying(36) NOT NULL,
    training_id character varying(36) NOT NULL,
    average_tablet_usage_time integer,
    token character varying(5),
    CONSTRAINT trainings_trainingsession_average_tablet_usage_time_check CHECK ((average_tablet_usage_time >= 0))
);


ALTER TABLE trainings_trainingsession OWNER TO magency;

--
-- Name: trainings_trainingsession_users; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE trainings_trainingsession_users (
    id integer NOT NULL,
    trainingsession_id character varying(36) NOT NULL,
    mtpuser_id character varying(36) NOT NULL
);


ALTER TABLE trainings_trainingsession_users OWNER TO magency;

--
-- Name: trainings_trainingsession_users_id_seq; Type: SEQUENCE; Schema: public; Owner: magency
--

CREATE SEQUENCE trainings_trainingsession_users_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE trainings_trainingsession_users_id_seq OWNER TO magency;

--
-- Name: trainings_trainingsession_users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: magency
--

ALTER SEQUENCE trainings_trainingsession_users_id_seq OWNED BY trainings_trainingsession_users.id;


--
-- Name: translation_translatablelanguage; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE translation_translatablelanguage (
    id character varying(36) NOT NULL,
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    language character varying(5) NOT NULL,
    enabled boolean NOT NULL,
    last_modified timestamp with time zone NOT NULL,
    first_update_id character varying(36),
    last_update_id character varying(36)
);


ALTER TABLE translation_translatablelanguage OWNER TO magency;

--
-- Name: translation_translation; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE translation_translation (
    id character varying(36) NOT NULL,
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    language character varying(5) NOT NULL,
    domain character varying(3) NOT NULL,
    progression smallint NOT NULL,
    last_modified timestamp with time zone NOT NULL,
    first_update_id character varying(36),
    last_update_id character varying(36),
    CONSTRAINT translation_translation_progression_check CHECK ((progression >= 0))
);


ALTER TABLE translation_translation OWNER TO magency;

--
-- Name: waffle_flag; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE waffle_flag (
    id integer NOT NULL,
    name character varying(100) NOT NULL,
    everyone boolean,
    percent numeric(3,1),
    testing boolean NOT NULL,
    superusers boolean NOT NULL,
    staff boolean NOT NULL,
    authenticated boolean NOT NULL,
    languages text NOT NULL,
    rollout boolean NOT NULL,
    note text NOT NULL,
    created timestamp with time zone NOT NULL,
    modified timestamp with time zone NOT NULL
);


ALTER TABLE waffle_flag OWNER TO magency;

--
-- Name: waffle_flag_groups; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE waffle_flag_groups (
    id integer NOT NULL,
    flag_id integer NOT NULL,
    group_id integer NOT NULL
);


ALTER TABLE waffle_flag_groups OWNER TO magency;

--
-- Name: waffle_flag_groups_id_seq; Type: SEQUENCE; Schema: public; Owner: magency
--

CREATE SEQUENCE waffle_flag_groups_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE waffle_flag_groups_id_seq OWNER TO magency;

--
-- Name: waffle_flag_groups_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: magency
--

ALTER SEQUENCE waffle_flag_groups_id_seq OWNED BY waffle_flag_groups.id;


--
-- Name: waffle_flag_id_seq; Type: SEQUENCE; Schema: public; Owner: magency
--

CREATE SEQUENCE waffle_flag_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE waffle_flag_id_seq OWNER TO magency;

--
-- Name: waffle_flag_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: magency
--

ALTER SEQUENCE waffle_flag_id_seq OWNED BY waffle_flag.id;


--
-- Name: waffle_flag_users; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE waffle_flag_users (
    id integer NOT NULL,
    flag_id integer NOT NULL,
    mtpuser_id character varying(36) NOT NULL
);


ALTER TABLE waffle_flag_users OWNER TO magency;

--
-- Name: waffle_flag_users_id_seq; Type: SEQUENCE; Schema: public; Owner: magency
--

CREATE SEQUENCE waffle_flag_users_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE waffle_flag_users_id_seq OWNER TO magency;

--
-- Name: waffle_flag_users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: magency
--

ALTER SEQUENCE waffle_flag_users_id_seq OWNED BY waffle_flag_users.id;


--
-- Name: waffle_sample; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE waffle_sample (
    id integer NOT NULL,
    name character varying(100) NOT NULL,
    percent numeric(4,1) NOT NULL,
    note text NOT NULL,
    created timestamp with time zone NOT NULL,
    modified timestamp with time zone NOT NULL
);


ALTER TABLE waffle_sample OWNER TO magency;

--
-- Name: waffle_sample_id_seq; Type: SEQUENCE; Schema: public; Owner: magency
--

CREATE SEQUENCE waffle_sample_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE waffle_sample_id_seq OWNER TO magency;

--
-- Name: waffle_sample_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: magency
--

ALTER SEQUENCE waffle_sample_id_seq OWNED BY waffle_sample.id;


--
-- Name: waffle_switch; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE waffle_switch (
    id integer NOT NULL,
    name character varying(100) NOT NULL,
    active boolean NOT NULL,
    note text NOT NULL,
    created timestamp with time zone NOT NULL,
    modified timestamp with time zone NOT NULL
);


ALTER TABLE waffle_switch OWNER TO magency;

--
-- Name: waffle_switch_id_seq; Type: SEQUENCE; Schema: public; Owner: magency
--

CREATE SEQUENCE waffle_switch_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE waffle_switch_id_seq OWNER TO magency;

--
-- Name: waffle_switch_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: magency
--

ALTER SEQUENCE waffle_switch_id_seq OWNED BY waffle_switch.id;


--
-- Name: workshops_workshop; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE workshops_workshop (
    are_questions_mandatory boolean NOT NULL,
    enable_score boolean NOT NULL,
    is_broadcastable boolean NOT NULL,
    is_questions_answers_order_random boolean NOT NULL,
    is_steps_order_random boolean NOT NULL,
    trainingactivity_ptr_id character varying(36) NOT NULL
);


ALTER TABLE workshops_workshop OWNER TO magency;

--
-- Name: workshops_workshopstep; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE workshops_workshopstep (
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    id character varying(36) NOT NULL,
    title character varying(255) NOT NULL,
    first_update_id character varying(36),
    last_update_id character varying(36),
    workshop_id character varying(36) NOT NULL,
    description character varying(500) NOT NULL,
    polymorphic_ctype_id integer,
    sort_order integer NOT NULL,
    original_version_id character varying(36),
    parent_version_id character varying(36)
);


ALTER TABLE workshops_workshopstep OWNER TO magency;

--
-- Name: workshops_workshopstepimage; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE workshops_workshopstepimage (
    workshopstep_ptr_id character varying(36) NOT NULL,
    image character varying(100) NOT NULL
);


ALTER TABLE workshops_workshopstepimage OWNER TO magency;

--
-- Name: workshops_workshopstepquestion; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE workshops_workshopstepquestion (
    workshopstep_ptr_id character varying(36) NOT NULL,
    is_assessing boolean NOT NULL,
    activity_id character varying(36),
    is_multiple_choices boolean NOT NULL,
    is_answers_order_random boolean NOT NULL,
    activity_type_id integer,
    training_id character varying(36),
    is_all_or_nothing boolean NOT NULL
);


ALTER TABLE workshops_workshopstepquestion OWNER TO magency;

--
-- Name: workshops_workshopstepquestion_dimensions; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE workshops_workshopstepquestion_dimensions (
    id integer NOT NULL,
    workshopstepquestion_id character varying(36) NOT NULL,
    dimension_id character varying(36) NOT NULL
);


ALTER TABLE workshops_workshopstepquestion_dimensions OWNER TO magency;

--
-- Name: workshops_workshopstepquestion_dimensions_id_seq; Type: SEQUENCE; Schema: public; Owner: magency
--

CREATE SEQUENCE workshops_workshopstepquestion_dimensions_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE workshops_workshopstepquestion_dimensions_id_seq OWNER TO magency;

--
-- Name: workshops_workshopstepquestion_dimensions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: magency
--

ALTER SEQUENCE workshops_workshopstepquestion_dimensions_id_seq OWNED BY workshops_workshopstepquestion_dimensions.id;


--
-- Name: workshops_workshopstepquestionanswer; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE workshops_workshopstepquestionanswer (
    sort_order integer NOT NULL,
    id character varying(36) NOT NULL,
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    label character varying(500) NOT NULL,
    color character varying(50),
    is_correct boolean NOT NULL,
    points integer NOT NULL,
    first_update_id character varying(36),
    last_update_id character varying(36),
    original_version_id character varying(36),
    parent_version_id character varying(36),
    question_id character varying(36) NOT NULL
);


ALTER TABLE workshops_workshopstepquestionanswer OWNER TO magency;

--
-- Name: workshops_workshopstepquestionuseranswer; Type: TABLE; Schema: public; Owner: magency
--

CREATE TABLE workshops_workshopstepquestionuseranswer (
    id character varying(36) NOT NULL,
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    text text NOT NULL,
    answer_id character varying(36),
    first_update_id character varying(36),
    last_update_id character varying(36),
    question_id character varying(36) NOT NULL,
    training_session_id character varying(36) NOT NULL,
    user_id character varying(36) NOT NULL
);


ALTER TABLE workshops_workshopstepquestionuseranswer OWNER TO magency;

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

ALTER TABLE ONLY accounts_groupset_mgroups ALTER COLUMN id SET DEFAULT nextval('accounts_groupset_mgroups_id_seq'::regclass);


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

ALTER TABLE ONLY accounts_mtpuser_groups ALTER COLUMN id SET DEFAULT nextval('accounts_mtpuser_groups_id_seq'::regclass);


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

ALTER TABLE ONLY accounts_mtpuser_photos ALTER COLUMN id SET DEFAULT nextval('accounts_mtpuser_photos_id_seq'::regclass);


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

ALTER TABLE ONLY accounts_mtpuser_user_permissions ALTER COLUMN id SET DEFAULT nextval('accounts_mtpuser_user_permissions_id_seq'::regclass);


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

ALTER TABLE ONLY assessments_curriculum_active_recommendation_levels ALTER COLUMN id SET DEFAULT nextval('assessments_curriculum_active_recommendation_levels_id_seq'::regclass);


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

ALTER TABLE ONLY assessments_curriculum_mgroups ALTER COLUMN id SET DEFAULT nextval('assessments_curriculum_mgroups_id_seq'::regclass);


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

ALTER TABLE ONLY auth_group ALTER COLUMN id SET DEFAULT nextval('auth_group_id_seq'::regclass);


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

ALTER TABLE ONLY auth_group_permissions ALTER COLUMN id SET DEFAULT nextval('auth_group_permissions_id_seq'::regclass);


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

ALTER TABLE ONLY auth_permission ALTER COLUMN id SET DEFAULT nextval('auth_permission_id_seq'::regclass);


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

ALTER TABLE ONLY brainstormers_brainstormeractivity_trainings ALTER COLUMN id SET DEFAULT nextval('brainstormers_brainstormeractivity_trainings_id_seq'::regclass);


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

ALTER TABLE ONLY django_admin_log ALTER COLUMN id SET DEFAULT nextval('django_admin_log_id_seq'::regclass);


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

ALTER TABLE ONLY django_content_type ALTER COLUMN id SET DEFAULT nextval('django_content_type_id_seq'::regclass);


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

ALTER TABLE ONLY django_migrations ALTER COLUMN id SET DEFAULT nextval('django_migrations_id_seq'::regclass);


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

ALTER TABLE ONLY django_site ALTER COLUMN id SET DEFAULT nextval('django_site_id_seq'::regclass);


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

ALTER TABLE ONLY documents_backgroundexecution_auto_mgroups ALTER COLUMN id SET DEFAULT nextval('documents_backgroundexecution_auto_mgroups_id_seq'::regclass);


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

ALTER TABLE ONLY documents_backgroundexecution_mgroups ALTER COLUMN id SET DEFAULT nextval('documents_backgroundexecution_mgroups_id_seq'::regclass);


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

ALTER TABLE ONLY notifications_noticequeuebatch ALTER COLUMN id SET DEFAULT nextval('notifications_noticequeuebatch_id_seq'::regclass);


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

ALTER TABLE ONLY notifications_noticesetting ALTER COLUMN id SET DEFAULT nextval('notifications_noticesetting_id_seq'::regclass);


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

ALTER TABLE ONLY notifications_noticetype ALTER COLUMN id SET DEFAULT nextval('notifications_noticetype_id_seq'::regclass);


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

ALTER TABLE ONLY oauth2_provider_accesstoken ALTER COLUMN id SET DEFAULT nextval('oauth2_provider_accesstoken_id_seq'::regclass);


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

ALTER TABLE ONLY oauth2_provider_application ALTER COLUMN id SET DEFAULT nextval('oauth2_provider_application_id_seq'::regclass);


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

ALTER TABLE ONLY oauth2_provider_grant ALTER COLUMN id SET DEFAULT nextval('oauth2_provider_grant_id_seq'::regclass);


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

ALTER TABLE ONLY oauth2_provider_refreshtoken ALTER COLUMN id SET DEFAULT nextval('oauth2_provider_refreshtoken_id_seq'::regclass);


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

ALTER TABLE ONLY roleplays_criterion_dimensions ALTER COLUMN id SET DEFAULT nextval('roleplays_criterion_dimensions_id_seq'::regclass);


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

ALTER TABLE ONLY surveys_answer_choices ALTER COLUMN id SET DEFAULT nextval('surveys_answer_choices_id_seq'::regclass);


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

ALTER TABLE ONLY sync_localserverconnection ALTER COLUMN id SET DEFAULT nextval('sync_localserverconnection_id_seq'::regclass);


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

ALTER TABLE ONLY sync_task ALTER COLUMN id SET DEFAULT nextval('sync_task_id_seq'::regclass);


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

ALTER TABLE ONLY trainings_action_mgroups ALTER COLUMN id SET DEFAULT nextval('trainings_action_mgroups_id_seq'::regclass);


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

ALTER TABLE ONLY trainings_currentsession ALTER COLUMN id SET DEFAULT nextval('trainings_currentsession_id_seq'::regclass);


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

ALTER TABLE ONLY trainings_trainingsession_users ALTER COLUMN id SET DEFAULT nextval('trainings_trainingsession_users_id_seq'::regclass);


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

ALTER TABLE ONLY waffle_flag ALTER COLUMN id SET DEFAULT nextval('waffle_flag_id_seq'::regclass);


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

ALTER TABLE ONLY waffle_flag_groups ALTER COLUMN id SET DEFAULT nextval('waffle_flag_groups_id_seq'::regclass);


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

ALTER TABLE ONLY waffle_flag_users ALTER COLUMN id SET DEFAULT nextval('waffle_flag_users_id_seq'::regclass);


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

ALTER TABLE ONLY waffle_sample ALTER COLUMN id SET DEFAULT nextval('waffle_sample_id_seq'::regclass);


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

ALTER TABLE ONLY waffle_switch ALTER COLUMN id SET DEFAULT nextval('waffle_switch_id_seq'::regclass);


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

ALTER TABLE ONLY workshops_workshopstepquestion_dimensions ALTER COLUMN id SET DEFAULT nextval('workshops_workshopstepquestion_dimensions_id_seq'::regclass);


--
-- Name: accounts_avatar_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY accounts_avatar
    ADD CONSTRAINT accounts_avatar_pkey PRIMARY KEY (id);


--
-- Name: accounts_group_name_4031d8061687145e_uniq; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY accounts_group
    ADD CONSTRAINT accounts_group_name_4031d8061687145e_uniq UNIQUE (name, type_id);


--
-- Name: accounts_group_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY accounts_group
    ADD CONSTRAINT accounts_group_pkey PRIMARY KEY (id);


--
-- Name: accounts_grouprole_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY accounts_grouprole
    ADD CONSTRAINT accounts_grouprole_pkey PRIMARY KEY (id);


--
-- Name: accounts_grouprole_user_id_24a388e78e23e341_uniq; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY accounts_grouprole
    ADD CONSTRAINT accounts_grouprole_user_id_24a388e78e23e341_uniq UNIQUE (user_id, group_id);


--
-- Name: accounts_groupset_mgroups_groupset_id_group_id_key; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY accounts_groupset_mgroups
    ADD CONSTRAINT accounts_groupset_mgroups_groupset_id_group_id_key UNIQUE (groupset_id, group_id);


--
-- Name: accounts_groupset_mgroups_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY accounts_groupset_mgroups
    ADD CONSTRAINT accounts_groupset_mgroups_pkey PRIMARY KEY (id);


--
-- Name: accounts_groupset_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY accounts_groupset
    ADD CONSTRAINT accounts_groupset_pkey PRIMARY KEY (id);


--
-- Name: accounts_grouptype_name_key; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY accounts_grouptype
    ADD CONSTRAINT accounts_grouptype_name_key UNIQUE (name);


--
-- Name: accounts_grouptype_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY accounts_grouptype
    ADD CONSTRAINT accounts_grouptype_pkey PRIMARY KEY (id);


--
-- Name: accounts_mtpuser_groups_mtpuser_id_group_id_key; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY accounts_mtpuser_groups
    ADD CONSTRAINT accounts_mtpuser_groups_mtpuser_id_group_id_key UNIQUE (mtpuser_id, group_id);


--
-- Name: accounts_mtpuser_groups_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY accounts_mtpuser_groups
    ADD CONSTRAINT accounts_mtpuser_groups_pkey PRIMARY KEY (id);


--
-- Name: accounts_mtpuser_photos_mtpuser_id_avatar_id_key; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY accounts_mtpuser_photos
    ADD CONSTRAINT accounts_mtpuser_photos_mtpuser_id_avatar_id_key UNIQUE (mtpuser_id, avatar_id);


--
-- Name: accounts_mtpuser_photos_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY accounts_mtpuser_photos
    ADD CONSTRAINT accounts_mtpuser_photos_pkey PRIMARY KEY (id);


--
-- Name: accounts_mtpuser_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY accounts_mtpuser
    ADD CONSTRAINT accounts_mtpuser_pkey PRIMARY KEY (id);


--
-- Name: accounts_mtpuser_user_permissions_mtpuser_id_permission_id_key; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY accounts_mtpuser_user_permissions
    ADD CONSTRAINT accounts_mtpuser_user_permissions_mtpuser_id_permission_id_key UNIQUE (mtpuser_id, permission_id);


--
-- Name: accounts_mtpuser_user_permissions_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY accounts_mtpuser_user_permissions
    ADD CONSTRAINT accounts_mtpuser_user_permissions_pkey PRIMARY KEY (id);


--
-- Name: accounts_mtpuser_username_key; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY accounts_mtpuser
    ADD CONSTRAINT accounts_mtpuser_username_key UNIQUE (username);


--
-- Name: assessments_assessableactivitypartuserscore_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_assessableactivitypartuserscore
    ADD CONSTRAINT assessments_assessableactivitypartuserscore_pkey PRIMARY KEY (id);


--
-- Name: assessments_assessableactivityuserscore_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_assessableactivityuserscore
    ADD CONSTRAINT assessments_assessableactivityuserscore_pkey PRIMARY KEY (id);


--
-- Name: assessments_certificationcompetencythreshold_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_certificationcompetencythreshold
    ADD CONSTRAINT assessments_certificationcompetencythreshold_pkey PRIMARY KEY (id);


--
-- Name: assessments_certificationprogram_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_certificationprogram
    ADD CONSTRAINT assessments_certificationprogram_pkey PRIMARY KEY (id);


--
-- Name: assessments_certificationprogram_tree_id_6af5b3166257d4b9_uniq; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_certificationprogram
    ADD CONSTRAINT assessments_certificationprogram_tree_id_6af5b3166257d4b9_uniq UNIQUE (tree_id);


--
-- Name: assessments_certificationprogramuserstatus_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_certificationprogramuserstatus
    ADD CONSTRAINT assessments_certificationprogramuserstatus_pkey PRIMARY KEY (id);


--
-- Name: assessments_certificationstatus_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_certificationstatus
    ADD CONSTRAINT assessments_certificationstatus_pkey PRIMARY KEY (id);


--
-- Name: assessments_competency_code_608c5ee8f0251b47_uniq; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_competency
    ADD CONSTRAINT assessments_competency_code_608c5ee8f0251b47_uniq UNIQUE (code, tree_id);


--
-- Name: assessments_competency_name_47a97be8eabeb5eb_uniq; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_competency
    ADD CONSTRAINT assessments_competency_name_47a97be8eabeb5eb_uniq UNIQUE (name, tree_id);


--
-- Name: assessments_competency_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_competency
    ADD CONSTRAINT assessments_competency_pkey PRIMARY KEY (id);


--
-- Name: assessments_competencytree_job_profile_id_key; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_competencytree
    ADD CONSTRAINT assessments_competencytree_job_profile_id_key UNIQUE (job_profile_id);


--
-- Name: assessments_competencytree_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_competencytree
    ADD CONSTRAINT assessments_competencytree_pkey PRIMARY KEY (id);


--
-- Name: assessments_competencytreeuserscore_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_competencytreeuserscore
    ADD CONSTRAINT assessments_competencytreeuserscore_pkey PRIMARY KEY (id);


--
-- Name: assessments_competencyuserscore_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_competencyuserscore
    ADD CONSTRAINT assessments_competencyuserscore_pkey PRIMARY KEY (id);


--
-- Name: assessments_curriculum_active_curriculum_id_recommendationl_key; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_curriculum_active_recommendation_levels
    ADD CONSTRAINT assessments_curriculum_active_curriculum_id_recommendationl_key UNIQUE (curriculum_id, recommendationlevel_id);


--
-- Name: assessments_curriculum_active_recommendation_levels_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_curriculum_active_recommendation_levels
    ADD CONSTRAINT assessments_curriculum_active_recommendation_levels_pkey PRIMARY KEY (id);


--
-- Name: assessments_curriculum_mgroups_curriculum_id_group_id_key; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_curriculum_mgroups
    ADD CONSTRAINT assessments_curriculum_mgroups_curriculum_id_group_id_key UNIQUE (curriculum_id, group_id);


--
-- Name: assessments_curriculum_mgroups_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_curriculum_mgroups
    ADD CONSTRAINT assessments_curriculum_mgroups_pkey PRIMARY KEY (id);


--
-- Name: assessments_curriculum_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_curriculum
    ADD CONSTRAINT assessments_curriculum_pkey PRIMARY KEY (id);


--
-- Name: assessments_dimension_code_1d6de72ea76b7094_uniq; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_dimension
    ADD CONSTRAINT assessments_dimension_code_1d6de72ea76b7094_uniq UNIQUE (code, competency_id);


--
-- Name: assessments_dimension_name_1c01ea9b6b4910b4_uniq; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_dimension
    ADD CONSTRAINT assessments_dimension_name_1c01ea9b6b4910b4_uniq UNIQUE (name, competency_id);


--
-- Name: assessments_dimension_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_dimension
    ADD CONSTRAINT assessments_dimension_pkey PRIMARY KEY (id);


--
-- Name: assessments_dimensiontrainingweight_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_dimensiontrainingweight
    ADD CONSTRAINT assessments_dimensiontrainingweight_pkey PRIMARY KEY (id);


--
-- Name: assessments_dimensionuserscore_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_dimensionuserscore
    ADD CONSTRAINT assessments_dimensionuserscore_pkey PRIMARY KEY (id);


--
-- Name: assessments_lesson_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_lesson
    ADD CONSTRAINT assessments_lesson_pkey PRIMARY KEY (id);


--
-- Name: assessments_lessondimensionweight_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_lessondimensionweight
    ADD CONSTRAINT assessments_lessondimensionweight_pkey PRIMARY KEY (id);


--
-- Name: assessments_lessonrecommendationthreshold_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_lessonrecommendationthreshold
    ADD CONSTRAINT assessments_lessonrecommendationthreshold_pkey PRIMARY KEY (id);


--
-- Name: assessments_lessonreference_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_lessonreference
    ADD CONSTRAINT assessments_lessonreference_pkey PRIMARY KEY (id);


--
-- Name: assessments_recommendationlevel_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_recommendationlevel
    ADD CONSTRAINT assessments_recommendationlevel_pkey PRIMARY KEY (id);


--
-- Name: assessments_topic_curriculum_id_67c820f3a930262b_uniq; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_topic
    ADD CONSTRAINT assessments_topic_curriculum_id_67c820f3a930262b_uniq UNIQUE (curriculum_id, name);


--
-- Name: assessments_topic_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_topic
    ADD CONSTRAINT assessments_topic_pkey PRIMARY KEY (id);


--
-- Name: assessments_userlessonrecommendation_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_userlessonrecommendation
    ADD CONSTRAINT assessments_userlessonrecommendation_pkey PRIMARY KEY (id);


--
-- Name: auth_group_name_key; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY auth_group
    ADD CONSTRAINT auth_group_name_key UNIQUE (name);


--
-- Name: auth_group_permissions_group_id_permission_id_key; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY auth_group_permissions
    ADD CONSTRAINT auth_group_permissions_group_id_permission_id_key UNIQUE (group_id, permission_id);


--
-- Name: auth_group_permissions_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY auth_group_permissions
    ADD CONSTRAINT auth_group_permissions_pkey PRIMARY KEY (id);


--
-- Name: auth_group_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY auth_group
    ADD CONSTRAINT auth_group_pkey PRIMARY KEY (id);


--
-- Name: auth_permission_content_type_id_codename_key; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY auth_permission
    ADD CONSTRAINT auth_permission_content_type_id_codename_key UNIQUE (content_type_id, codename);


--
-- Name: auth_permission_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY auth_permission
    ADD CONSTRAINT auth_permission_pkey PRIMARY KEY (id);


--
-- Name: brainstormers_brainstormer_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY brainstormers_brainstormer
    ADD CONSTRAINT brainstormers_brainstormer_pkey PRIMARY KEY (id);


--
-- Name: brainstormers_brainstormeract_brainstormeractivity_id_train_key; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY brainstormers_brainstormeractivity_trainings
    ADD CONSTRAINT brainstormers_brainstormeract_brainstormeractivity_id_train_key UNIQUE (brainstormeractivity_id, training_id);


--
-- Name: brainstormers_brainstormeractivity_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY brainstormers_brainstormeractivity
    ADD CONSTRAINT brainstormers_brainstormeractivity_pkey PRIMARY KEY (id);


--
-- Name: brainstormers_brainstormeractivity_trainings_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY brainstormers_brainstormeractivity_trainings
    ADD CONSTRAINT brainstormers_brainstormeractivity_trainings_pkey PRIMARY KEY (id);


--
-- Name: brainstormers_brainstormerproposition_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY brainstormers_brainstormerproposition
    ADD CONSTRAINT brainstormers_brainstormerproposition_pkey PRIMARY KEY (id);


--
-- Name: brainstormers_brainstormerpropositiongroup_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY brainstormers_brainstormerpropositiongroup
    ADD CONSTRAINT brainstormers_brainstormerpropositiongroup_pkey PRIMARY KEY (id);


--
-- Name: brainstormers_brainstormertemplate_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY brainstormers_brainstormertemplate
    ADD CONSTRAINT brainstormers_brainstormertemplate_pkey PRIMARY KEY (trainingactivity_ptr_id);


--
-- Name: django_admin_log_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY django_admin_log
    ADD CONSTRAINT django_admin_log_pkey PRIMARY KEY (id);


--
-- Name: django_content_type_app_label_473c7be66f2128c7_uniq; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY django_content_type
    ADD CONSTRAINT django_content_type_app_label_473c7be66f2128c7_uniq UNIQUE (app_label, model);


--
-- Name: django_content_type_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY django_content_type
    ADD CONSTRAINT django_content_type_pkey PRIMARY KEY (id);


--
-- Name: django_migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY django_migrations
    ADD CONSTRAINT django_migrations_pkey PRIMARY KEY (id);


--
-- Name: django_session_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY django_session
    ADD CONSTRAINT django_session_pkey PRIMARY KEY (session_key);


--
-- Name: django_site_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY django_site
    ADD CONSTRAINT django_site_pkey PRIMARY KEY (id);


--
-- Name: documents_backgroundexecution_auto_mgroups_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY documents_backgroundexecution_auto_mgroups
    ADD CONSTRAINT documents_backgroundexecution_auto_mgroups_pkey PRIMARY KEY (id);


--
-- Name: documents_backgroundexecution_backgroundexecution_id_group__key; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY documents_backgroundexecution_auto_mgroups
    ADD CONSTRAINT documents_backgroundexecution_backgroundexecution_id_group__key UNIQUE (backgroundexecution_id, group_id);


--
-- Name: documents_backgroundexecution_backgroundexecution_id_group_key1; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY documents_backgroundexecution_mgroups
    ADD CONSTRAINT documents_backgroundexecution_backgroundexecution_id_group_key1 UNIQUE (backgroundexecution_id, group_id);


--
-- Name: documents_backgroundexecution_mgroups_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY documents_backgroundexecution_mgroups
    ADD CONSTRAINT documents_backgroundexecution_mgroups_pkey PRIMARY KEY (id);


--
-- Name: documents_backgroundexecution_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY documents_backgroundexecution
    ADD CONSTRAINT documents_backgroundexecution_pkey PRIMARY KEY (id);


--
-- Name: documents_document_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY documents_document
    ADD CONSTRAINT documents_document_pkey PRIMARY KEY (trainingactivity_ptr_id);


--
-- Name: documents_note_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY documents_note
    ADD CONSTRAINT documents_note_pkey PRIMARY KEY (id);


--
-- Name: evaluations_criterion_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY evaluations_criterion
    ADD CONSTRAINT evaluations_criterion_pkey PRIMARY KEY (id);


--
-- Name: evaluations_evaluation_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY evaluations_evaluation
    ADD CONSTRAINT evaluations_evaluation_pkey PRIMARY KEY (trainingactivity_ptr_id);


--
-- Name: evaluations_evaluationgrouppermi_group_id_5bca8127facbd267_uniq; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY evaluations_evaluationgrouppermission
    ADD CONSTRAINT evaluations_evaluationgrouppermi_group_id_5bca8127facbd267_uniq UNIQUE (group_id, permission, evaluation_id);


--
-- Name: evaluations_evaluationgrouppermission_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY evaluations_evaluationgrouppermission
    ADD CONSTRAINT evaluations_evaluationgrouppermission_pkey PRIMARY KEY (id);


--
-- Name: evaluations_exercise_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY evaluations_exercise
    ADD CONSTRAINT evaluations_exercise_pkey PRIMARY KEY (id);


--
-- Name: evaluations_rating_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY evaluations_rating
    ADD CONSTRAINT evaluations_rating_pkey PRIMARY KEY (id);


--
-- Name: eventlog_eventlog_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY eventlog_eventlog
    ADD CONSTRAINT eventlog_eventlog_pkey PRIMARY KEY (id);


--
-- Name: likes_like_author_id_1561064bc1316e74_uniq; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY likes_like
    ADD CONSTRAINT likes_like_author_id_1561064bc1316e74_uniq UNIQUE (author_id, content_type_id, object_uuid);


--
-- Name: likes_like_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY likes_like
    ADD CONSTRAINT likes_like_pkey PRIMARY KEY (id);


--
-- Name: metaplans_metaplan_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY metaplans_metaplan
    ADD CONSTRAINT metaplans_metaplan_pkey PRIMARY KEY (id);


--
-- Name: metaplans_metaplanproposition_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY metaplans_metaplanproposition
    ADD CONSTRAINT metaplans_metaplanproposition_pkey PRIMARY KEY (id);


--
-- Name: metaplans_metaplantemplate_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY metaplans_metaplantemplate
    ADD CONSTRAINT metaplans_metaplantemplate_pkey PRIMARY KEY (trainingactivity_ptr_id);


--
-- Name: notifications_noticequeuebatch_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY notifications_noticequeuebatch
    ADD CONSTRAINT notifications_noticequeuebatch_pkey PRIMARY KEY (id);


--
-- Name: notifications_noticesetting_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY notifications_noticesetting
    ADD CONSTRAINT notifications_noticesetting_pkey PRIMARY KEY (id);


--
-- Name: notifications_noticesetting_user_id_75164e2b718e7025_uniq; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY notifications_noticesetting
    ADD CONSTRAINT notifications_noticesetting_user_id_75164e2b718e7025_uniq UNIQUE (user_id, notice_type_id, medium, scoping_content_type_id, scoping_object_id);


--
-- Name: notifications_noticetype_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY notifications_noticetype
    ADD CONSTRAINT notifications_noticetype_pkey PRIMARY KEY (id);


--
-- Name: oauth2_provider_accesstoken_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY oauth2_provider_accesstoken
    ADD CONSTRAINT oauth2_provider_accesstoken_pkey PRIMARY KEY (id);


--
-- Name: oauth2_provider_application_client_id_key; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY oauth2_provider_application
    ADD CONSTRAINT oauth2_provider_application_client_id_key UNIQUE (client_id);


--
-- Name: oauth2_provider_application_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY oauth2_provider_application
    ADD CONSTRAINT oauth2_provider_application_pkey PRIMARY KEY (id);


--
-- Name: oauth2_provider_grant_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY oauth2_provider_grant
    ADD CONSTRAINT oauth2_provider_grant_pkey PRIMARY KEY (id);


--
-- Name: oauth2_provider_refreshtoken_access_token_id_key; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY oauth2_provider_refreshtoken
    ADD CONSTRAINT oauth2_provider_refreshtoken_access_token_id_key UNIQUE (access_token_id);


--
-- Name: oauth2_provider_refreshtoken_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY oauth2_provider_refreshtoken
    ADD CONSTRAINT oauth2_provider_refreshtoken_pkey PRIMARY KEY (id);


--
-- Name: roleplays_criterion_dimensions_criterion_id_dimension_id_key; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY roleplays_criterion_dimensions
    ADD CONSTRAINT roleplays_criterion_dimensions_criterion_id_dimension_id_key UNIQUE (criterion_id, dimension_id);


--
-- Name: roleplays_criterion_dimensions_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY roleplays_criterion_dimensions
    ADD CONSTRAINT roleplays_criterion_dimensions_pkey PRIMARY KEY (id);


--
-- Name: roleplays_criterion_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY roleplays_criterion
    ADD CONSTRAINT roleplays_criterion_pkey PRIMARY KEY (id);


--
-- Name: roleplays_criterion_sort_order_1635807ddd58cf09_uniq; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY roleplays_criterion
    ADD CONSTRAINT roleplays_criterion_sort_order_1635807ddd58cf09_uniq UNIQUE (sort_order, step_id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: roleplays_rating_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY roleplays_rating
    ADD CONSTRAINT roleplays_rating_pkey PRIMARY KEY (id);


--
-- Name: roleplays_roleplay_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY roleplays_roleplay
    ADD CONSTRAINT roleplays_roleplay_pkey PRIMARY KEY (trainingactivity_ptr_id);


--
-- Name: roleplays_step_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY roleplays_step
    ADD CONSTRAINT roleplays_step_pkey PRIMARY KEY (id);


--
-- Name: roleplays_step_sort_order_7683c2c8ea5718fc_uniq; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY roleplays_step
    ADD CONSTRAINT roleplays_step_sort_order_7683c2c8ea5718fc_uniq UNIQUE (sort_order, roleplay_id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: surveys_answer_choices_answer_id_choice_id_key; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY surveys_answer_choices
    ADD CONSTRAINT surveys_answer_choices_answer_id_choice_id_key UNIQUE (answer_id, choice_id);


--
-- Name: surveys_answer_choices_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY surveys_answer_choices
    ADD CONSTRAINT surveys_answer_choices_pkey PRIMARY KEY (id);


--
-- Name: surveys_answer_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY surveys_answer
    ADD CONSTRAINT surveys_answer_pkey PRIMARY KEY (id);


--
-- Name: surveys_choice_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY surveys_choice
    ADD CONSTRAINT surveys_choice_pkey PRIMARY KEY (id);


--
-- Name: surveys_pool_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY surveys_pool
    ADD CONSTRAINT surveys_pool_pkey PRIMARY KEY (id);


--
-- Name: surveys_question_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY surveys_question
    ADD CONSTRAINT surveys_question_pkey PRIMARY KEY (id);


--
-- Name: surveys_survey_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY surveys_survey
    ADD CONSTRAINT surveys_survey_pkey PRIMARY KEY (id);


--
-- Name: surveys_survey_training_id_616b54eec1f166c7_uniq; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY surveys_survey
    ADD CONSTRAINT surveys_survey_training_id_616b54eec1f166c7_uniq UNIQUE (training_id, trainer_id);


--
-- Name: surveys_surveypool_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY surveys_surveypool
    ADD CONSTRAINT surveys_surveypool_pkey PRIMARY KEY (id);


--
-- Name: surveys_surveypool_survey_id_198c8c90cae5c71c_uniq; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY surveys_surveypool
    ADD CONSTRAINT surveys_surveypool_survey_id_198c8c90cae5c71c_uniq UNIQUE (survey_id, pool_id);


--
-- Name: sync_clientversion_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY sync_clientversion
    ADD CONSTRAINT sync_clientversion_pkey PRIMARY KEY (id);


--
-- Name: sync_localserver_mac_key; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY sync_localserver
    ADD CONSTRAINT sync_localserver_mac_key UNIQUE (mac);


--
-- Name: sync_localserver_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY sync_localserver
    ADD CONSTRAINT sync_localserver_pkey PRIMARY KEY (id);


--
-- Name: sync_localserverconnection_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY sync_localserverconnection
    ADD CONSTRAINT sync_localserverconnection_pkey PRIMARY KEY (id);


--
-- Name: sync_serverversion_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY sync_serverversion
    ADD CONSTRAINT sync_serverversion_pkey PRIMARY KEY (id);


--
-- Name: sync_task_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY sync_task
    ADD CONSTRAINT sync_task_pkey PRIMARY KEY (id);


--
-- Name: sync_update_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY sync_update
    ADD CONSTRAINT sync_update_pkey PRIMARY KEY (id);


--
-- Name: themes_theme_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY themes_theme
    ADD CONSTRAINT themes_theme_pkey PRIMARY KEY (id);


--
-- Name: trainings_action_mgroups_action_id_group_id_key; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY trainings_action_mgroups
    ADD CONSTRAINT trainings_action_mgroups_action_id_group_id_key UNIQUE (action_id, group_id);


--
-- Name: trainings_action_mgroups_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY trainings_action_mgroups
    ADD CONSTRAINT trainings_action_mgroups_pkey PRIMARY KEY (id);


--
-- Name: trainings_action_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY trainings_action
    ADD CONSTRAINT trainings_action_pkey PRIMARY KEY (id);


--
-- Name: trainings_currentsession_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY trainings_currentsession
    ADD CONSTRAINT trainings_currentsession_pkey PRIMARY KEY (id);


--
-- Name: trainings_training_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY trainings_training
    ADD CONSTRAINT trainings_training_pkey PRIMARY KEY (id);


--
-- Name: trainings_trainingactivity_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY trainings_trainingactivity
    ADD CONSTRAINT trainings_trainingactivity_pkey PRIMARY KEY (id);


--
-- Name: trainings_trainingactivity_sort_order_232dbc64b80b4ef_uniq; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY trainings_trainingactivity
    ADD CONSTRAINT trainings_trainingactivity_sort_order_232dbc64b80b4ef_uniq UNIQUE (sort_order, training_id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: trainings_trainingclientoptions_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY trainings_trainingclientoptions
    ADD CONSTRAINT trainings_trainingclientoptions_pkey PRIMARY KEY (id);


--
-- Name: trainings_trainingclientoptions_training_id_key; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY trainings_trainingclientoptions
    ADD CONSTRAINT trainings_trainingclientoptions_training_id_key UNIQUE (training_id);


--
-- Name: trainings_trainingsession_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY trainings_trainingsession
    ADD CONSTRAINT trainings_trainingsession_pkey PRIMARY KEY (id);


--
-- Name: trainings_trainingsession_token_key; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY trainings_trainingsession
    ADD CONSTRAINT trainings_trainingsession_token_key UNIQUE (token);


--
-- Name: trainings_trainingsession_use_trainingsession_id_mtpuser_id_key; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY trainings_trainingsession_users
    ADD CONSTRAINT trainings_trainingsession_use_trainingsession_id_mtpuser_id_key UNIQUE (trainingsession_id, mtpuser_id);


--
-- Name: trainings_trainingsession_users_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY trainings_trainingsession_users
    ADD CONSTRAINT trainings_trainingsession_users_pkey PRIMARY KEY (id);


--
-- Name: translation_translatablelanguage_language_key; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY translation_translatablelanguage
    ADD CONSTRAINT translation_translatablelanguage_language_key UNIQUE (language);


--
-- Name: translation_translatablelanguage_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY translation_translatablelanguage
    ADD CONSTRAINT translation_translatablelanguage_pkey PRIMARY KEY (id);


--
-- Name: translation_translation_language_640dcf407cf38d99_uniq; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY translation_translation
    ADD CONSTRAINT translation_translation_language_640dcf407cf38d99_uniq UNIQUE (language, domain);


--
-- Name: translation_translation_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY translation_translation
    ADD CONSTRAINT translation_translation_pkey PRIMARY KEY (id);


--
-- Name: waffle_flag_groups_flag_id_group_id_key; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY waffle_flag_groups
    ADD CONSTRAINT waffle_flag_groups_flag_id_group_id_key UNIQUE (flag_id, group_id);


--
-- Name: waffle_flag_groups_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY waffle_flag_groups
    ADD CONSTRAINT waffle_flag_groups_pkey PRIMARY KEY (id);


--
-- Name: waffle_flag_name_key; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY waffle_flag
    ADD CONSTRAINT waffle_flag_name_key UNIQUE (name);


--
-- Name: waffle_flag_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY waffle_flag
    ADD CONSTRAINT waffle_flag_pkey PRIMARY KEY (id);


--
-- Name: waffle_flag_users_flag_id_mtpuser_id_key; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY waffle_flag_users
    ADD CONSTRAINT waffle_flag_users_flag_id_mtpuser_id_key UNIQUE (flag_id, mtpuser_id);


--
-- Name: waffle_flag_users_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY waffle_flag_users
    ADD CONSTRAINT waffle_flag_users_pkey PRIMARY KEY (id);


--
-- Name: waffle_sample_name_key; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY waffle_sample
    ADD CONSTRAINT waffle_sample_name_key UNIQUE (name);


--
-- Name: waffle_sample_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY waffle_sample
    ADD CONSTRAINT waffle_sample_pkey PRIMARY KEY (id);


--
-- Name: waffle_switch_name_key; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY waffle_switch
    ADD CONSTRAINT waffle_switch_name_key UNIQUE (name);


--
-- Name: waffle_switch_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY waffle_switch
    ADD CONSTRAINT waffle_switch_pkey PRIMARY KEY (id);


--
-- Name: workshops_workshop_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY workshops_workshop
    ADD CONSTRAINT workshops_workshop_pkey PRIMARY KEY (trainingactivity_ptr_id);


--
-- Name: workshops_workshopstep_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY workshops_workshopstep
    ADD CONSTRAINT workshops_workshopstep_pkey PRIMARY KEY (id);


--
-- Name: workshops_workshopstep_sort_order_328c585533ab0704_uniq; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY workshops_workshopstep
    ADD CONSTRAINT workshops_workshopstep_sort_order_328c585533ab0704_uniq UNIQUE (sort_order, workshop_id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: workshops_workshopstepimage_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY workshops_workshopstepimage
    ADD CONSTRAINT workshops_workshopstepimage_pkey PRIMARY KEY (workshopstep_ptr_id);


--
-- Name: workshops_workshopstepquestio_workshopstepquestion_id_dimen_key; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY workshops_workshopstepquestion_dimensions
    ADD CONSTRAINT workshops_workshopstepquestio_workshopstepquestion_id_dimen_key UNIQUE (workshopstepquestion_id, dimension_id);


--
-- Name: workshops_workshopstepquestion_dimensions_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY workshops_workshopstepquestion_dimensions
    ADD CONSTRAINT workshops_workshopstepquestion_dimensions_pkey PRIMARY KEY (id);


--
-- Name: workshops_workshopstepquestion_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY workshops_workshopstepquestion
    ADD CONSTRAINT workshops_workshopstepquestion_pkey PRIMARY KEY (workshopstep_ptr_id);


--
-- Name: workshops_workshopstepquestion_sort_order_5de7801f526e8629_uniq; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY workshops_workshopstepquestionanswer
    ADD CONSTRAINT workshops_workshopstepquestion_sort_order_5de7801f526e8629_uniq UNIQUE (sort_order, question_id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: workshops_workshopstepquestionanswer_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY workshops_workshopstepquestionanswer
    ADD CONSTRAINT workshops_workshopstepquestionanswer_pkey PRIMARY KEY (id);


--
-- Name: workshops_workshopstepquestionuseranswer_pkey; Type: CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY workshops_workshopstepquestionuseranswer
    ADD CONSTRAINT workshops_workshopstepquestionuseranswer_pkey PRIMARY KEY (id);


--
-- Name: accounts_avatar_2401be38; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX accounts_avatar_2401be38 ON accounts_avatar USING btree (first_update_id);


--
-- Name: accounts_avatar_6cac0549; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX accounts_avatar_6cac0549 ON accounts_avatar USING btree (last_update_id);


--
-- Name: accounts_avatar_first_update_id_475d789678f14ad0_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX accounts_avatar_first_update_id_475d789678f14ad0_like ON accounts_avatar USING btree (first_update_id varchar_pattern_ops);


--
-- Name: accounts_avatar_id_73da914d5c5b28c2_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX accounts_avatar_id_73da914d5c5b28c2_like ON accounts_avatar USING btree (id varchar_pattern_ops);


--
-- Name: accounts_avatar_last_update_id_1e9eb2656ef161ac_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX accounts_avatar_last_update_id_1e9eb2656ef161ac_like ON accounts_avatar USING btree (last_update_id varchar_pattern_ops);


--
-- Name: accounts_group_2401be38; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX accounts_group_2401be38 ON accounts_group USING btree (first_update_id);


--
-- Name: accounts_group_6be37982; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX accounts_group_6be37982 ON accounts_group USING btree (parent_id);


--
-- Name: accounts_group_6cac0549; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX accounts_group_6cac0549 ON accounts_group USING btree (last_update_id);


--
-- Name: accounts_group_94757cae; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX accounts_group_94757cae ON accounts_group USING btree (type_id);


--
-- Name: accounts_group_first_update_id_1462a4bba4591576_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX accounts_group_first_update_id_1462a4bba4591576_like ON accounts_group USING btree (first_update_id varchar_pattern_ops);


--
-- Name: accounts_group_id_6728ebb54320129c_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX accounts_group_id_6728ebb54320129c_like ON accounts_group USING btree (id varchar_pattern_ops);


--
-- Name: accounts_group_last_update_id_33d30c646fb3ffae_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX accounts_group_last_update_id_33d30c646fb3ffae_like ON accounts_group USING btree (last_update_id varchar_pattern_ops);


--
-- Name: accounts_grouprole_0e939a4f; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX accounts_grouprole_0e939a4f ON accounts_grouprole USING btree (group_id);


--
-- Name: accounts_grouprole_2401be38; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX accounts_grouprole_2401be38 ON accounts_grouprole USING btree (first_update_id);


--
-- Name: accounts_grouprole_6cac0549; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX accounts_grouprole_6cac0549 ON accounts_grouprole USING btree (last_update_id);


--
-- Name: accounts_grouprole_e8701ad4; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX accounts_grouprole_e8701ad4 ON accounts_grouprole USING btree (user_id);


--
-- Name: accounts_grouprole_first_update_id_283d7bd122cbb5e6_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX accounts_grouprole_first_update_id_283d7bd122cbb5e6_like ON accounts_grouprole USING btree (first_update_id varchar_pattern_ops);


--
-- Name: accounts_grouprole_group_id_43bebe5d8528e65e_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX accounts_grouprole_group_id_43bebe5d8528e65e_like ON accounts_grouprole USING btree (group_id varchar_pattern_ops);


--
-- Name: accounts_grouprole_id_3a7985cc33611a4c_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX accounts_grouprole_id_3a7985cc33611a4c_like ON accounts_grouprole USING btree (id varchar_pattern_ops);


--
-- Name: accounts_grouprole_last_update_id_532196df8d6a55de_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX accounts_grouprole_last_update_id_532196df8d6a55de_like ON accounts_grouprole USING btree (last_update_id varchar_pattern_ops);


--
-- Name: accounts_groupset_2401be38; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX accounts_groupset_2401be38 ON accounts_groupset USING btree (first_update_id);


--
-- Name: accounts_groupset_6cac0549; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX accounts_groupset_6cac0549 ON accounts_groupset USING btree (last_update_id);


--
-- Name: accounts_groupset_first_update_id_397b548bd1cd2bd0_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX accounts_groupset_first_update_id_397b548bd1cd2bd0_like ON accounts_groupset USING btree (first_update_id varchar_pattern_ops);


--
-- Name: accounts_groupset_id_4696d6b125963dc2_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX accounts_groupset_id_4696d6b125963dc2_like ON accounts_groupset USING btree (id varchar_pattern_ops);


--
-- Name: accounts_groupset_last_update_id_63ebf6478bff7954_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX accounts_groupset_last_update_id_63ebf6478bff7954_like ON accounts_groupset USING btree (last_update_id varchar_pattern_ops);


--
-- Name: accounts_groupset_mgroups_0e939a4f; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX accounts_groupset_mgroups_0e939a4f ON accounts_groupset_mgroups USING btree (group_id);


--
-- Name: accounts_groupset_mgroups_da191177; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX accounts_groupset_mgroups_da191177 ON accounts_groupset_mgroups USING btree (groupset_id);


--
-- Name: accounts_groupset_mgroups_group_id_223775c477a47aa0_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX accounts_groupset_mgroups_group_id_223775c477a47aa0_like ON accounts_groupset_mgroups USING btree (group_id varchar_pattern_ops);


--
-- Name: accounts_groupset_mgroups_groupset_id_4167d4fa136221d1_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX accounts_groupset_mgroups_groupset_id_4167d4fa136221d1_like ON accounts_groupset_mgroups USING btree (groupset_id varchar_pattern_ops);


--
-- Name: accounts_grouptype_2401be38; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX accounts_grouptype_2401be38 ON accounts_grouptype USING btree (first_update_id);


--
-- Name: accounts_grouptype_6cac0549; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX accounts_grouptype_6cac0549 ON accounts_grouptype USING btree (last_update_id);


--
-- Name: accounts_grouptype_first_update_id_113eaaa3a8dbba91_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX accounts_grouptype_first_update_id_113eaaa3a8dbba91_like ON accounts_grouptype USING btree (first_update_id varchar_pattern_ops);


--
-- Name: accounts_grouptype_id_61dd16741aaf41d5_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX accounts_grouptype_id_61dd16741aaf41d5_like ON accounts_grouptype USING btree (id varchar_pattern_ops);


--
-- Name: accounts_grouptype_last_update_id_1134f43e21067ab5_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX accounts_grouptype_last_update_id_1134f43e21067ab5_like ON accounts_grouptype USING btree (last_update_id varchar_pattern_ops);


--
-- Name: accounts_grouptype_name_4d056d4d14953efb_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX accounts_grouptype_name_4d056d4d14953efb_like ON accounts_grouptype USING btree (name varchar_pattern_ops);


--
-- Name: accounts_mtpuser_2401be38; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX accounts_mtpuser_2401be38 ON accounts_mtpuser USING btree (first_update_id);


--
-- Name: accounts_mtpuser_6cac0549; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX accounts_mtpuser_6cac0549 ON accounts_mtpuser USING btree (last_update_id);


--
-- Name: accounts_mtpuser_b4e75e23; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX accounts_mtpuser_b4e75e23 ON accounts_mtpuser USING btree (photo_id);


--
-- Name: accounts_mtpuser_first_update_id_5d67906303dbb1b1_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX accounts_mtpuser_first_update_id_5d67906303dbb1b1_like ON accounts_mtpuser USING btree (first_update_id varchar_pattern_ops);


--
-- Name: accounts_mtpuser_groups_0e939a4f; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX accounts_mtpuser_groups_0e939a4f ON accounts_mtpuser_groups USING btree (group_id);


--
-- Name: accounts_mtpuser_groups_ae3d8976; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX accounts_mtpuser_groups_ae3d8976 ON accounts_mtpuser_groups USING btree (mtpuser_id);


--
-- Name: accounts_mtpuser_groups_mtpuser_id_5d333f33c7f966f1_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX accounts_mtpuser_groups_mtpuser_id_5d333f33c7f966f1_like ON accounts_mtpuser_groups USING btree (mtpuser_id varchar_pattern_ops);


--
-- Name: accounts_mtpuser_id_3887e8f54c2aa88b_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX accounts_mtpuser_id_3887e8f54c2aa88b_like ON accounts_mtpuser USING btree (id varchar_pattern_ops);


--
-- Name: accounts_mtpuser_photos_1b119da6; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX accounts_mtpuser_photos_1b119da6 ON accounts_mtpuser_photos USING btree (avatar_id);


--
-- Name: accounts_mtpuser_photos_ae3d8976; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX accounts_mtpuser_photos_ae3d8976 ON accounts_mtpuser_photos USING btree (mtpuser_id);


--
-- Name: accounts_mtpuser_photos_avatar_id_6a6c8bd7444d5806_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX accounts_mtpuser_photos_avatar_id_6a6c8bd7444d5806_like ON accounts_mtpuser_photos USING btree (avatar_id varchar_pattern_ops);


--
-- Name: accounts_mtpuser_photos_mtpuser_id_2c379b1954dfacb3_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX accounts_mtpuser_photos_mtpuser_id_2c379b1954dfacb3_like ON accounts_mtpuser_photos USING btree (mtpuser_id varchar_pattern_ops);


--
-- Name: accounts_mtpuser_user_permissi_mtpuser_id_2f8eeb555b35a6d9_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX accounts_mtpuser_user_permissi_mtpuser_id_2f8eeb555b35a6d9_like ON accounts_mtpuser_user_permissions USING btree (mtpuser_id varchar_pattern_ops);


--
-- Name: accounts_mtpuser_user_permissions_8373b171; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX accounts_mtpuser_user_permissions_8373b171 ON accounts_mtpuser_user_permissions USING btree (permission_id);


--
-- Name: accounts_mtpuser_user_permissions_ae3d8976; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX accounts_mtpuser_user_permissions_ae3d8976 ON accounts_mtpuser_user_permissions USING btree (mtpuser_id);


--
-- Name: accounts_mtpuser_username_2488e6409f18ef85_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX accounts_mtpuser_username_2488e6409f18ef85_like ON accounts_mtpuser USING btree (username varchar_pattern_ops);


--
-- Name: assessments_assessableact_first_update_id_1f59942004be5c4d_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_assessableact_first_update_id_1f59942004be5c4d_like ON assessments_assessableactivitypartuserscore USING btree (first_update_id varchar_pattern_ops);


--
-- Name: assessments_assessableacti_last_update_id_3c86aae60ed5c071_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_assessableacti_last_update_id_3c86aae60ed5c071_like ON assessments_assessableactivitypartuserscore USING btree (last_update_id varchar_pattern_ops);


--
-- Name: assessments_assessableactivity_session_id_2b59ed896994f513_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_assessableactivity_session_id_2b59ed896994f513_like ON assessments_assessableactivityuserscore USING btree (session_id varchar_pattern_ops);


--
-- Name: assessments_assessableactivity_session_id_2ed6f5ee4d79bbcb_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_assessableactivity_session_id_2ed6f5ee4d79bbcb_like ON assessments_assessableactivitypartuserscore USING btree (session_id varchar_pattern_ops);


--
-- Name: assessments_assessableactivitypart_user_id_f392d169f5eae99_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_assessableactivitypart_user_id_f392d169f5eae99_like ON assessments_assessableactivitypartuserscore USING btree (user_id varchar_pattern_ops);


--
-- Name: assessments_assessableactivitypartuser_id_3604ae918278c3e7_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_assessableactivitypartuser_id_3604ae918278c3e7_like ON assessments_assessableactivitypartuserscore USING btree (id varchar_pattern_ops);


--
-- Name: assessments_assessableactivitypartuserscore_2401be38; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_assessableactivitypartuserscore_2401be38 ON assessments_assessableactivitypartuserscore USING btree (first_update_id);


--
-- Name: assessments_assessableactivitypartuserscore_6cac0549; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_assessableactivitypartuserscore_6cac0549 ON assessments_assessableactivitypartuserscore USING btree (last_update_id);


--
-- Name: assessments_assessableactivitypartuserscore_7fc8ef54; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_assessableactivitypartuserscore_7fc8ef54 ON assessments_assessableactivitypartuserscore USING btree (session_id);


--
-- Name: assessments_assessableactivitypartuserscore_b0711228; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_assessableactivitypartuserscore_b0711228 ON assessments_assessableactivitypartuserscore USING btree (activity_part_type_id);


--
-- Name: assessments_assessableactivitypartuserscore_e8701ad4; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_assessableactivitypartuserscore_e8701ad4 ON assessments_assessableactivitypartuserscore USING btree (user_id);


--
-- Name: assessments_assessableactivityuse_user_id_6992736af40c1069_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_assessableactivityuse_user_id_6992736af40c1069_like ON assessments_assessableactivityuserscore USING btree (user_id varchar_pattern_ops);


--
-- Name: assessments_assessableactivityuserscor_id_1c5b3eda601065b7_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_assessableactivityuserscor_id_1c5b3eda601065b7_like ON assessments_assessableactivityuserscore USING btree (id varchar_pattern_ops);


--
-- Name: assessments_assessableactivityuserscore_7fc8ef54; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_assessableactivityuserscore_7fc8ef54 ON assessments_assessableactivityuserscore USING btree (session_id);


--
-- Name: assessments_assessableactivityuserscore_b6159b48; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_assessableactivityuserscore_b6159b48 ON assessments_assessableactivityuserscore USING btree (activity_type_id);


--
-- Name: assessments_assessableactivityuserscore_e8701ad4; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_assessableactivityuserscore_e8701ad4 ON assessments_assessableactivityuserscore USING btree (user_id);


--
-- Name: assessments_certification_first_update_id_4fe24f327cbdb313_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_certification_first_update_id_4fe24f327cbdb313_like ON assessments_certificationprogramuserstatus USING btree (first_update_id varchar_pattern_ops);


--
-- Name: assessments_certification_first_update_id_52ea9326a311ab9d_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_certification_first_update_id_52ea9326a311ab9d_like ON assessments_certificationprogram USING btree (first_update_id varchar_pattern_ops);


--
-- Name: assessments_certificationcompetencythr_id_6475a37163bdd39e_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_certificationcompetencythr_id_6475a37163bdd39e_like ON assessments_certificationcompetencythreshold USING btree (id varchar_pattern_ops);


--
-- Name: assessments_certificationcompetencythreshold_2401be38; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_certificationcompetencythreshold_2401be38 ON assessments_certificationcompetencythreshold USING btree (first_update_id);


--
-- Name: assessments_certificationcompetencythreshold_6b65d347; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_certificationcompetencythreshold_6b65d347 ON assessments_certificationcompetencythreshold USING btree (competency_id);


--
-- Name: assessments_certificationcompetencythreshold_6cac0549; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_certificationcompetencythreshold_6cac0549 ON assessments_certificationcompetencythreshold USING btree (last_update_id);


--
-- Name: assessments_certificationcompetencythreshold_dc91ed4b; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_certificationcompetencythreshold_dc91ed4b ON assessments_certificationcompetencythreshold USING btree (status_id);


--
-- Name: assessments_certificationp_last_update_id_173a0cc342f7bb61_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_certificationp_last_update_id_173a0cc342f7bb61_like ON assessments_certificationprogram USING btree (last_update_id varchar_pattern_ops);


--
-- Name: assessments_certificationp_last_update_id_1c941132394025ef_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_certificationp_last_update_id_1c941132394025ef_like ON assessments_certificationprogramuserstatus USING btree (last_update_id varchar_pattern_ops);


--
-- Name: assessments_certificationprogr_program_id_5963826e54395c01_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_certificationprogr_program_id_5963826e54395c01_like ON assessments_certificationprogramuserstatus USING btree (program_id varchar_pattern_ops);


--
-- Name: assessments_certificationprogram_2401be38; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_certificationprogram_2401be38 ON assessments_certificationprogram USING btree (first_update_id);


--
-- Name: assessments_certificationprogram_656442a0; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_certificationprogram_656442a0 ON assessments_certificationprogram USING btree (tree_id);


--
-- Name: assessments_certificationprogram_6cac0549; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_certificationprogram_6cac0549 ON assessments_certificationprogram USING btree (last_update_id);


--
-- Name: assessments_certificationprogram_id_4da3c167e59c6277_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_certificationprogram_id_4da3c167e59c6277_like ON assessments_certificationprogram USING btree (id varchar_pattern_ops);


--
-- Name: assessments_certificationprogramuserst_id_2db973d058a84839_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_certificationprogramuserst_id_2db973d058a84839_like ON assessments_certificationprogramuserstatus USING btree (id varchar_pattern_ops);


--
-- Name: assessments_certificationprogramuserstatus_2401be38; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_certificationprogramuserstatus_2401be38 ON assessments_certificationprogramuserstatus USING btree (first_update_id);


--
-- Name: assessments_certificationprogramuserstatus_429b1823; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_certificationprogramuserstatus_429b1823 ON assessments_certificationprogramuserstatus USING btree (program_id);


--
-- Name: assessments_certificationprogramuserstatus_6cac0549; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_certificationprogramuserstatus_6cac0549 ON assessments_certificationprogramuserstatus USING btree (last_update_id);


--
-- Name: assessments_certificationprogramuserstatus_7fc8ef54; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_certificationprogramuserstatus_7fc8ef54 ON assessments_certificationprogramuserstatus USING btree (session_id);


--
-- Name: assessments_certificationprogramuserstatus_dc91ed4b; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_certificationprogramuserstatus_dc91ed4b ON assessments_certificationprogramuserstatus USING btree (status_id);


--
-- Name: assessments_certificationprogramuserstatus_e8701ad4; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_certificationprogramuserstatus_e8701ad4 ON assessments_certificationprogramuserstatus USING btree (user_id);


--
-- Name: assessments_certifications_first_update_id_31db17e123d673e_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_certifications_first_update_id_31db17e123d673e_like ON assessments_certificationstatus USING btree (first_update_id varchar_pattern_ops);


--
-- Name: assessments_certifications_last_update_id_28af2879ce4f4b1a_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_certifications_last_update_id_28af2879ce4f4b1a_like ON assessments_certificationstatus USING btree (last_update_id varchar_pattern_ops);


--
-- Name: assessments_certificationstatus_2401be38; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_certificationstatus_2401be38 ON assessments_certificationstatus USING btree (first_update_id);


--
-- Name: assessments_certificationstatus_429b1823; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_certificationstatus_429b1823 ON assessments_certificationstatus USING btree (program_id);


--
-- Name: assessments_certificationstatus_6cac0549; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_certificationstatus_6cac0549 ON assessments_certificationstatus USING btree (last_update_id);


--
-- Name: assessments_certificationstatus_id_3a0f4a5db5b1285c_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_certificationstatus_id_3a0f4a5db5b1285c_like ON assessments_certificationstatus USING btree (id varchar_pattern_ops);


--
-- Name: assessments_certificationstatus_program_id_8e3fdeaee7a0096_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_certificationstatus_program_id_8e3fdeaee7a0096_like ON assessments_certificationstatus USING btree (program_id varchar_pattern_ops);


--
-- Name: assessments_competency_2401be38; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_competency_2401be38 ON assessments_competency USING btree (first_update_id);


--
-- Name: assessments_competency_656442a0; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_competency_656442a0 ON assessments_competency USING btree (tree_id);


--
-- Name: assessments_competency_657593fa; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_competency_657593fa ON assessments_competency USING btree (original_version_id);


--
-- Name: assessments_competency_6cac0549; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_competency_6cac0549 ON assessments_competency USING btree (last_update_id);


--
-- Name: assessments_competency_a73f1f77; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_competency_a73f1f77 ON assessments_competency USING btree (sort_order);


--
-- Name: assessments_competency_ca88a2a2; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_competency_ca88a2a2 ON assessments_competency USING btree (parent_version_id);


--
-- Name: assessments_competency_first_update_id_5469a3aa516c8543_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_competency_first_update_id_5469a3aa516c8543_like ON assessments_competency USING btree (first_update_id varchar_pattern_ops);


--
-- Name: assessments_competency_id_51b3d65425e398af_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_competency_id_51b3d65425e398af_like ON assessments_competency USING btree (id varchar_pattern_ops);


--
-- Name: assessments_competency_last_update_id_41eee4d2e84d0507_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_competency_last_update_id_41eee4d2e84d0507_like ON assessments_competency USING btree (last_update_id varchar_pattern_ops);


--
-- Name: assessments_competencytre_first_update_id_559e13b7f552c45f_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_competencytre_first_update_id_559e13b7f552c45f_like ON assessments_competencytree USING btree (first_update_id varchar_pattern_ops);


--
-- Name: assessments_competencytree_0e939a4f; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_competencytree_0e939a4f ON assessments_competencytree USING btree (group_id);


--
-- Name: assessments_competencytree_2401be38; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_competencytree_2401be38 ON assessments_competencytree USING btree (first_update_id);


--
-- Name: assessments_competencytree_657593fa; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_competencytree_657593fa ON assessments_competencytree USING btree (original_version_id);


--
-- Name: assessments_competencytree_6cac0549; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_competencytree_6cac0549 ON assessments_competencytree USING btree (last_update_id);


--
-- Name: assessments_competencytree_ca88a2a2; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_competencytree_ca88a2a2 ON assessments_competencytree USING btree (parent_version_id);


--
-- Name: assessments_competencytree_e687153b; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_competencytree_e687153b ON assessments_competencytree USING btree (version_state);


--
-- Name: assessments_competencytree_id_2d5cca832b3e8193_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_competencytree_id_2d5cca832b3e8193_like ON assessments_competencytree USING btree (id varchar_pattern_ops);


--
-- Name: assessments_competencytree_job_profile_id_262a7087ff36bcd0_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_competencytree_job_profile_id_262a7087ff36bcd0_like ON assessments_competencytree USING btree (job_profile_id varchar_pattern_ops);


--
-- Name: assessments_competencytree_last_update_id_2c7971d0ea8f8c23_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_competencytree_last_update_id_2c7971d0ea8f8c23_like ON assessments_competencytree USING btree (last_update_id varchar_pattern_ops);


--
-- Name: assessments_competencytreeuser_session_id_1629fb6d55eab0cb_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_competencytreeuser_session_id_1629fb6d55eab0cb_like ON assessments_competencytreeuserscore USING btree (session_id varchar_pattern_ops);


--
-- Name: assessments_competencytreeusersco_user_id_7cf9a1ab5cc82f8f_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_competencytreeusersco_user_id_7cf9a1ab5cc82f8f_like ON assessments_competencytreeuserscore USING btree (user_id varchar_pattern_ops);


--
-- Name: assessments_competencytreeuserscor_tree_id_5e6f478e72f6021_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_competencytreeuserscor_tree_id_5e6f478e72f6021_like ON assessments_competencytreeuserscore USING btree (tree_id varchar_pattern_ops);


--
-- Name: assessments_competencytreeuserscore_656442a0; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_competencytreeuserscore_656442a0 ON assessments_competencytreeuserscore USING btree (tree_id);


--
-- Name: assessments_competencytreeuserscore_7fc8ef54; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_competencytreeuserscore_7fc8ef54 ON assessments_competencytreeuserscore USING btree (session_id);


--
-- Name: assessments_competencytreeuserscore_e8701ad4; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_competencytreeuserscore_e8701ad4 ON assessments_competencytreeuserscore USING btree (user_id);


--
-- Name: assessments_competencytreeuserscore_id_640110f72fcc68af_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_competencytreeuserscore_id_640110f72fcc68af_like ON assessments_competencytreeuserscore USING btree (id varchar_pattern_ops);


--
-- Name: assessments_competencyusers_competency_id_651587d998e7c5bd_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_competencyusers_competency_id_651587d998e7c5bd_like ON assessments_competencyuserscore USING btree (competency_id varchar_pattern_ops);


--
-- Name: assessments_competencyuserscor_session_id_6d1bd2924e083122_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_competencyuserscor_session_id_6d1bd2924e083122_like ON assessments_competencyuserscore USING btree (session_id varchar_pattern_ops);


--
-- Name: assessments_competencyuserscore_6b65d347; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_competencyuserscore_6b65d347 ON assessments_competencyuserscore USING btree (competency_id);


--
-- Name: assessments_competencyuserscore_7fc8ef54; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_competencyuserscore_7fc8ef54 ON assessments_competencyuserscore USING btree (session_id);


--
-- Name: assessments_competencyuserscore_e8701ad4; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_competencyuserscore_e8701ad4 ON assessments_competencyuserscore USING btree (user_id);


--
-- Name: assessments_competencyuserscore_id_3da7ba8e66e4d9b8_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_competencyuserscore_id_3da7ba8e66e4d9b8_like ON assessments_competencyuserscore USING btree (id varchar_pattern_ops);


--
-- Name: assessments_competencyuserscore_user_id_dbd846d995bfe86_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_competencyuserscore_user_id_dbd846d995bfe86_like ON assessments_competencyuserscore USING btree (user_id varchar_pattern_ops);


--
-- Name: assessments_curric_recommendationlevel_id_61b8b0df8274b8d0_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_curric_recommendationlevel_id_61b8b0df8274b8d0_like ON assessments_curriculum_active_recommendation_levels USING btree (recommendationlevel_id varchar_pattern_ops);


--
-- Name: assessments_curriculum_0e83bf95; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_curriculum_0e83bf95 ON assessments_curriculum USING btree (job_profile_id);


--
-- Name: assessments_curriculum_2401be38; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_curriculum_2401be38 ON assessments_curriculum USING btree (first_update_id);


--
-- Name: assessments_curriculum_6cac0549; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_curriculum_6cac0549 ON assessments_curriculum USING btree (last_update_id);


--
-- Name: assessments_curriculum_activ_curriculum_id_676bae033d02557_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_curriculum_activ_curriculum_id_676bae033d02557_like ON assessments_curriculum_active_recommendation_levels USING btree (curriculum_id varchar_pattern_ops);


--
-- Name: assessments_curriculum_active_recommendation_levels_64feaa2f; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_curriculum_active_recommendation_levels_64feaa2f ON assessments_curriculum_active_recommendation_levels USING btree (curriculum_id);


--
-- Name: assessments_curriculum_active_recommendation_levels_b17a5397; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_curriculum_active_recommendation_levels_b17a5397 ON assessments_curriculum_active_recommendation_levels USING btree (recommendationlevel_id);


--
-- Name: assessments_curriculum_f6f7f63d; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_curriculum_f6f7f63d ON assessments_curriculum USING btree (business_unit_id);


--
-- Name: assessments_curriculum_id_37f50b454e2509ec_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_curriculum_id_37f50b454e2509ec_like ON assessments_curriculum USING btree (id varchar_pattern_ops);


--
-- Name: assessments_curriculum_mgro_curriculum_id_23df279821acf7c2_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_curriculum_mgro_curriculum_id_23df279821acf7c2_like ON assessments_curriculum_mgroups USING btree (curriculum_id varchar_pattern_ops);


--
-- Name: assessments_curriculum_mgroups_0e939a4f; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_curriculum_mgroups_0e939a4f ON assessments_curriculum_mgroups USING btree (group_id);


--
-- Name: assessments_curriculum_mgroups_64feaa2f; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_curriculum_mgroups_64feaa2f ON assessments_curriculum_mgroups USING btree (curriculum_id);


--
-- Name: assessments_curriculum_mgroups_group_id_6f514474e7c27ace_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_curriculum_mgroups_group_id_6f514474e7c27ace_like ON assessments_curriculum_mgroups USING btree (group_id varchar_pattern_ops);


--
-- Name: assessments_dimension_2401be38; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_dimension_2401be38 ON assessments_dimension USING btree (first_update_id);


--
-- Name: assessments_dimension_657593fa; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_dimension_657593fa ON assessments_dimension USING btree (original_version_id);


--
-- Name: assessments_dimension_6b65d347; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_dimension_6b65d347 ON assessments_dimension USING btree (competency_id);


--
-- Name: assessments_dimension_6cac0549; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_dimension_6cac0549 ON assessments_dimension USING btree (last_update_id);


--
-- Name: assessments_dimension_a73f1f77; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_dimension_a73f1f77 ON assessments_dimension USING btree (sort_order);


--
-- Name: assessments_dimension_ca88a2a2; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_dimension_ca88a2a2 ON assessments_dimension USING btree (parent_version_id);


--
-- Name: assessments_dimension_competency_id_42d84c3a274386b1_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_dimension_competency_id_42d84c3a274386b1_like ON assessments_dimension USING btree (competency_id varchar_pattern_ops);


--
-- Name: assessments_dimension_first_update_id_22f89df5afa292d2_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_dimension_first_update_id_22f89df5afa292d2_like ON assessments_dimension USING btree (first_update_id varchar_pattern_ops);


--
-- Name: assessments_dimension_id_1f71abd584140254_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_dimension_id_1f71abd584140254_like ON assessments_dimension USING btree (id varchar_pattern_ops);


--
-- Name: assessments_dimension_last_update_id_234f8a8163b85396_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_dimension_last_update_id_234f8a8163b85396_like ON assessments_dimension USING btree (last_update_id varchar_pattern_ops);


--
-- Name: assessments_dimensiontrai_first_update_id_260f6c4b41f98148_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_dimensiontrai_first_update_id_260f6c4b41f98148_like ON assessments_dimensiontrainingweight USING btree (first_update_id varchar_pattern_ops);


--
-- Name: assessments_dimensiontraini_last_update_id_4a28c497685767c_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_dimensiontraini_last_update_id_4a28c497685767c_like ON assessments_dimensiontrainingweight USING btree (last_update_id varchar_pattern_ops);


--
-- Name: assessments_dimensiontrainin_dimension_id_663dd5bb47172425_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_dimensiontrainin_dimension_id_663dd5bb47172425_like ON assessments_dimensiontrainingweight USING btree (dimension_id varchar_pattern_ops);


--
-- Name: assessments_dimensiontraining_training_id_7ef66c185a36110c_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_dimensiontraining_training_id_7ef66c185a36110c_like ON assessments_dimensiontrainingweight USING btree (training_id varchar_pattern_ops);


--
-- Name: assessments_dimensiontrainingweight_2401be38; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_dimensiontrainingweight_2401be38 ON assessments_dimensiontrainingweight USING btree (first_update_id);


--
-- Name: assessments_dimensiontrainingweight_6cac0549; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_dimensiontrainingweight_6cac0549 ON assessments_dimensiontrainingweight USING btree (last_update_id);


--
-- Name: assessments_dimensiontrainingweight_b46ef2c7; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_dimensiontrainingweight_b46ef2c7 ON assessments_dimensiontrainingweight USING btree (dimension_id);


--
-- Name: assessments_dimensiontrainingweight_e160a0b9; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_dimensiontrainingweight_e160a0b9 ON assessments_dimensiontrainingweight USING btree (training_id);


--
-- Name: assessments_dimensiontrainingweight_id_56329a4455b0473a_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_dimensiontrainingweight_id_56329a4455b0473a_like ON assessments_dimensiontrainingweight USING btree (id varchar_pattern_ops);


--
-- Name: assessments_dimensionusersco_dimension_id_7ddb30e424a82d02_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_dimensionusersco_dimension_id_7ddb30e424a82d02_like ON assessments_dimensionuserscore USING btree (dimension_id varchar_pattern_ops);


--
-- Name: assessments_dimensionuserscore_7fc8ef54; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_dimensionuserscore_7fc8ef54 ON assessments_dimensionuserscore USING btree (session_id);


--
-- Name: assessments_dimensionuserscore_b46ef2c7; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_dimensionuserscore_b46ef2c7 ON assessments_dimensionuserscore USING btree (dimension_id);


--
-- Name: assessments_dimensionuserscore_e8701ad4; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_dimensionuserscore_e8701ad4 ON assessments_dimensionuserscore USING btree (user_id);


--
-- Name: assessments_dimensionuserscore_id_671adc417bba6ced_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_dimensionuserscore_id_671adc417bba6ced_like ON assessments_dimensionuserscore USING btree (id varchar_pattern_ops);


--
-- Name: assessments_dimensionuserscore_session_id_1afbece56f4023b7_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_dimensionuserscore_session_id_1afbece56f4023b7_like ON assessments_dimensionuserscore USING btree (session_id varchar_pattern_ops);


--
-- Name: assessments_dimensionuserscore_user_id_3152024676f75d7b_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_dimensionuserscore_user_id_3152024676f75d7b_like ON assessments_dimensionuserscore USING btree (user_id varchar_pattern_ops);


--
-- Name: assessments_lesson_10d1a950; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_lesson_10d1a950 ON assessments_lesson USING btree (reference_id);


--
-- Name: assessments_lesson_19b4d727; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_lesson_19b4d727 ON assessments_lesson USING btree (topic_id);


--
-- Name: assessments_lesson_2401be38; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_lesson_2401be38 ON assessments_lesson USING btree (first_update_id);


--
-- Name: assessments_lesson_64feaa2f; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_lesson_64feaa2f ON assessments_lesson USING btree (curriculum_id);


--
-- Name: assessments_lesson_6cac0549; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_lesson_6cac0549 ON assessments_lesson USING btree (last_update_id);


--
-- Name: assessments_lesson_a73f1f77; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_lesson_a73f1f77 ON assessments_lesson USING btree (sort_order);


--
-- Name: assessments_lesson_curriculum_id_7a025f64ab510e0e_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_lesson_curriculum_id_7a025f64ab510e0e_like ON assessments_lesson USING btree (curriculum_id varchar_pattern_ops);


--
-- Name: assessments_lesson_id_19c0ef55a46c65a8_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_lesson_id_19c0ef55a46c65a8_like ON assessments_lesson USING btree (id varchar_pattern_ops);


--
-- Name: assessments_lessondimensi_first_update_id_4957dd3599870194_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_lessondimensi_first_update_id_4957dd3599870194_like ON assessments_lessondimensionweight USING btree (first_update_id varchar_pattern_ops);


--
-- Name: assessments_lessondimensio_last_update_id_53d3478136870290_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_lessondimensio_last_update_id_53d3478136870290_like ON assessments_lessondimensionweight USING btree (last_update_id varchar_pattern_ops);


--
-- Name: assessments_lessondimensionw_dimension_id_531daf025e7cafb7_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_lessondimensionw_dimension_id_531daf025e7cafb7_like ON assessments_lessondimensionweight USING btree (dimension_id varchar_pattern_ops);


--
-- Name: assessments_lessondimensionweig_lesson_id_1d20dc1f0b3fd5fa_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_lessondimensionweig_lesson_id_1d20dc1f0b3fd5fa_like ON assessments_lessondimensionweight USING btree (lesson_id varchar_pattern_ops);


--
-- Name: assessments_lessondimensionweight_2401be38; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_lessondimensionweight_2401be38 ON assessments_lessondimensionweight USING btree (first_update_id);


--
-- Name: assessments_lessondimensionweight_55174b7b; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_lessondimensionweight_55174b7b ON assessments_lessondimensionweight USING btree (lesson_id);


--
-- Name: assessments_lessondimensionweight_6cac0549; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_lessondimensionweight_6cac0549 ON assessments_lessondimensionweight USING btree (last_update_id);


--
-- Name: assessments_lessondimensionweight_b46ef2c7; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_lessondimensionweight_b46ef2c7 ON assessments_lessondimensionweight USING btree (dimension_id);


--
-- Name: assessments_lessondimensionweight_id_5a9dc4f27492b2ba_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_lessondimensionweight_id_5a9dc4f27492b2ba_like ON assessments_lessondimensionweight USING btree (id varchar_pattern_ops);


--
-- Name: assessments_lessonrecomme_first_update_id_33fa33213913c5a4_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_lessonrecomme_first_update_id_33fa33213913c5a4_like ON assessments_lessonrecommendationthreshold USING btree (first_update_id varchar_pattern_ops);


--
-- Name: assessments_lessonrecommen_last_update_id_1148742dc55f3220_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_lessonrecommen_last_update_id_1148742dc55f3220_like ON assessments_lessonrecommendationthreshold USING btree (last_update_id varchar_pattern_ops);


--
-- Name: assessments_lessonrecommendatio_lesson_id_6f4987498753eb8a_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_lessonrecommendatio_lesson_id_6f4987498753eb8a_like ON assessments_lessonrecommendationthreshold USING btree (lesson_id varchar_pattern_ops);


--
-- Name: assessments_lessonrecommendationthresh_id_4efb918be73a0936_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_lessonrecommendationthresh_id_4efb918be73a0936_like ON assessments_lessonrecommendationthreshold USING btree (id varchar_pattern_ops);


--
-- Name: assessments_lessonrecommendationthreshold_2401be38; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_lessonrecommendationthreshold_2401be38 ON assessments_lessonrecommendationthreshold USING btree (first_update_id);


--
-- Name: assessments_lessonrecommendationthreshold_55174b7b; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_lessonrecommendationthreshold_55174b7b ON assessments_lessonrecommendationthreshold USING btree (lesson_id);


--
-- Name: assessments_lessonrecommendationthreshold_6cac0549; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_lessonrecommendationthreshold_6cac0549 ON assessments_lessonrecommendationthreshold USING btree (last_update_id);


--
-- Name: assessments_lessonrecommendationthreshold_80e0bd5f; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_lessonrecommendationthreshold_80e0bd5f ON assessments_lessonrecommendationthreshold USING btree (level_id);


--
-- Name: assessments_lessonreferen_first_update_id_7f784e8ff35b3ec6_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_lessonreferen_first_update_id_7f784e8ff35b3ec6_like ON assessments_lessonreference USING btree (first_update_id varchar_pattern_ops);


--
-- Name: assessments_lessonreferenc_last_update_id_3f57fb9a445ee8fe_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_lessonreferenc_last_update_id_3f57fb9a445ee8fe_like ON assessments_lessonreference USING btree (last_update_id varchar_pattern_ops);


--
-- Name: assessments_lessonreference_2401be38; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_lessonreference_2401be38 ON assessments_lessonreference USING btree (first_update_id);


--
-- Name: assessments_lessonreference_6cac0549; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_lessonreference_6cac0549 ON assessments_lessonreference USING btree (last_update_id);


--
-- Name: assessments_lessonreference_id_9a6b02418fc6fec_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_lessonreference_id_9a6b02418fc6fec_like ON assessments_lessonreference USING btree (id varchar_pattern_ops);


--
-- Name: assessments_recommendation_first_update_id_9fdc178820a72b0_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_recommendation_first_update_id_9fdc178820a72b0_like ON assessments_recommendationlevel USING btree (first_update_id varchar_pattern_ops);


--
-- Name: assessments_recommendationl_last_update_id_9a43d1e210de52c_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_recommendationl_last_update_id_9a43d1e210de52c_like ON assessments_recommendationlevel USING btree (last_update_id varchar_pattern_ops);


--
-- Name: assessments_recommendationlevel_2401be38; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_recommendationlevel_2401be38 ON assessments_recommendationlevel USING btree (first_update_id);


--
-- Name: assessments_recommendationlevel_6cac0549; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_recommendationlevel_6cac0549 ON assessments_recommendationlevel USING btree (last_update_id);


--
-- Name: assessments_recommendationlevel_a73f1f77; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_recommendationlevel_a73f1f77 ON assessments_recommendationlevel USING btree (sort_order);


--
-- Name: assessments_recommendationlevel_id_55f267612afcdf42_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_recommendationlevel_id_55f267612afcdf42_like ON assessments_recommendationlevel USING btree (id varchar_pattern_ops);


--
-- Name: assessments_topic_2401be38; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_topic_2401be38 ON assessments_topic USING btree (first_update_id);


--
-- Name: assessments_topic_64feaa2f; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_topic_64feaa2f ON assessments_topic USING btree (curriculum_id);


--
-- Name: assessments_topic_6cac0549; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_topic_6cac0549 ON assessments_topic USING btree (last_update_id);


--
-- Name: assessments_topic_a73f1f77; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_topic_a73f1f77 ON assessments_topic USING btree (sort_order);


--
-- Name: assessments_topic_first_update_id_26fcc6afc58014b7_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_topic_first_update_id_26fcc6afc58014b7_like ON assessments_topic USING btree (first_update_id varchar_pattern_ops);


--
-- Name: assessments_topic_id_492ce313ac532a05_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_topic_id_492ce313ac532a05_like ON assessments_topic USING btree (id varchar_pattern_ops);


--
-- Name: assessments_topic_last_update_id_13c74eccf0f31325_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_topic_last_update_id_13c74eccf0f31325_like ON assessments_topic USING btree (last_update_id varchar_pattern_ops);


--
-- Name: assessments_userlessonrec_first_update_id_4fa212a470a0f8c9_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_userlessonrec_first_update_id_4fa212a470a0f8c9_like ON assessments_userlessonrecommendation USING btree (first_update_id varchar_pattern_ops);


--
-- Name: assessments_userlessonreco_last_update_id_4c85f55b6c16fced_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_userlessonreco_last_update_id_4c85f55b6c16fced_like ON assessments_userlessonrecommendation USING btree (last_update_id varchar_pattern_ops);


--
-- Name: assessments_userlessonrecommend_lesson_id_54c2ef6ea2a58d1d_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_userlessonrecommend_lesson_id_54c2ef6ea2a58d1d_like ON assessments_userlessonrecommendation USING btree (lesson_id varchar_pattern_ops);


--
-- Name: assessments_userlessonrecommenda_level_id_544df969a1e63998_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_userlessonrecommenda_level_id_544df969a1e63998_like ON assessments_userlessonrecommendation USING btree (level_id varchar_pattern_ops);


--
-- Name: assessments_userlessonrecommendation_22980fc6; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_userlessonrecommendation_22980fc6 ON assessments_userlessonrecommendation USING btree (certification_id);


--
-- Name: assessments_userlessonrecommendation_2401be38; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_userlessonrecommendation_2401be38 ON assessments_userlessonrecommendation USING btree (first_update_id);


--
-- Name: assessments_userlessonrecommendation_55174b7b; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_userlessonrecommendation_55174b7b ON assessments_userlessonrecommendation USING btree (lesson_id);


--
-- Name: assessments_userlessonrecommendation_6cac0549; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_userlessonrecommendation_6cac0549 ON assessments_userlessonrecommendation USING btree (last_update_id);


--
-- Name: assessments_userlessonrecommendation_80e0bd5f; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_userlessonrecommendation_80e0bd5f ON assessments_userlessonrecommendation USING btree (level_id);


--
-- Name: assessments_userlessonrecommendation_id_4a9026ac8282b85d_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX assessments_userlessonrecommendation_id_4a9026ac8282b85d_like ON assessments_userlessonrecommendation USING btree (id varchar_pattern_ops);


--
-- Name: auth_group_name_68fe5461baf761b9_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX auth_group_name_68fe5461baf761b9_like ON auth_group USING btree (name varchar_pattern_ops);


--
-- Name: auth_group_permissions_0e939a4f; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX auth_group_permissions_0e939a4f ON auth_group_permissions USING btree (group_id);


--
-- Name: auth_group_permissions_8373b171; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX auth_group_permissions_8373b171 ON auth_group_permissions USING btree (permission_id);


--
-- Name: auth_permission_417f1b1c; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX auth_permission_417f1b1c ON auth_permission USING btree (content_type_id);


--
-- Name: brainstormers_bra_brainstormeractivity_id_5e882441ae964382_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX brainstormers_bra_brainstormeractivity_id_5e882441ae964382_like ON brainstormers_brainstormeractivity_trainings USING btree (brainstormeractivity_id varchar_pattern_ops);


--
-- Name: brainstormers_brainstorme_brainstormer_id_45bc53b3eddeb0ca_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX brainstormers_brainstorme_brainstormer_id_45bc53b3eddeb0ca_like ON brainstormers_brainstormerpropositiongroup USING btree (brainstormer_id varchar_pattern_ops);


--
-- Name: brainstormers_brainstorme_first_update_id_35ca853bf1226fe7_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX brainstormers_brainstorme_first_update_id_35ca853bf1226fe7_like ON brainstormers_brainstormerproposition USING btree (first_update_id varchar_pattern_ops);


--
-- Name: brainstormers_brainstorme_first_update_id_51d8033344ed1835_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX brainstormers_brainstorme_first_update_id_51d8033344ed1835_like ON brainstormers_brainstormer USING btree (first_update_id varchar_pattern_ops);


--
-- Name: brainstormers_brainstorme_first_update_id_5bf453a933a50704_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX brainstormers_brainstorme_first_update_id_5bf453a933a50704_like ON brainstormers_brainstormeractivity USING btree (first_update_id varchar_pattern_ops);


--
-- Name: brainstormers_brainstorme_first_update_id_64af6c56fbe4a4b6_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX brainstormers_brainstorme_first_update_id_64af6c56fbe4a4b6_like ON brainstormers_brainstormerpropositiongroup USING btree (first_update_id varchar_pattern_ops);


--
-- Name: brainstormers_brainstormer_2401be38; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX brainstormers_brainstormer_2401be38 ON brainstormers_brainstormer USING btree (first_update_id);


--
-- Name: brainstormers_brainstormer_57c1a063; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX brainstormers_brainstormer_57c1a063 ON brainstormers_brainstormer USING btree (session_id);


--
-- Name: brainstormers_brainstormer_6cac0549; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX brainstormers_brainstormer_6cac0549 ON brainstormers_brainstormer USING btree (last_update_id);


--
-- Name: brainstormers_brainstormer_a73f1f77; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX brainstormers_brainstormer_a73f1f77 ON brainstormers_brainstormer USING btree (sort_order);


--
-- Name: brainstormers_brainstormer_f8a3193a; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX brainstormers_brainstormer_f8a3193a ON brainstormers_brainstormer USING btree (activity_id);


--
-- Name: brainstormers_brainstormer_id_5a109cb699bf0f1_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX brainstormers_brainstormer_id_5a109cb699bf0f1_like ON brainstormers_brainstormer USING btree (id varchar_pattern_ops);


--
-- Name: brainstormers_brainstormer_last_update_id_329cd95ce36a83c8_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX brainstormers_brainstormer_last_update_id_329cd95ce36a83c8_like ON brainstormers_brainstormeractivity USING btree (last_update_id varchar_pattern_ops);


--
-- Name: brainstormers_brainstormer_last_update_id_5b07ad52f0dcc4f9_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX brainstormers_brainstormer_last_update_id_5b07ad52f0dcc4f9_like ON brainstormers_brainstormer USING btree (last_update_id varchar_pattern_ops);


--
-- Name: brainstormers_brainstormeract_training_id_4125b6a102ef123c_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX brainstormers_brainstormeract_training_id_4125b6a102ef123c_like ON brainstormers_brainstormeractivity_trainings USING btree (training_id varchar_pattern_ops);


--
-- Name: brainstormers_brainstormeractivity_2401be38; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX brainstormers_brainstormeractivity_2401be38 ON brainstormers_brainstormeractivity USING btree (first_update_id);


--
-- Name: brainstormers_brainstormeractivity_6cac0549; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX brainstormers_brainstormeractivity_6cac0549 ON brainstormers_brainstormeractivity USING btree (last_update_id);


--
-- Name: brainstormers_brainstormeractivity_id_17d38e6a71980222_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX brainstormers_brainstormeractivity_id_17d38e6a71980222_like ON brainstormers_brainstormeractivity USING btree (id varchar_pattern_ops);


--
-- Name: brainstormers_brainstormeractivity_trainings_7d86b572; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX brainstormers_brainstormeractivity_trainings_7d86b572 ON brainstormers_brainstormeractivity_trainings USING btree (brainstormeractivity_id);


--
-- Name: brainstormers_brainstormeractivity_trainings_e160a0b9; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX brainstormers_brainstormeractivity_trainings_e160a0b9 ON brainstormers_brainstormeractivity_trainings USING btree (training_id);


--
-- Name: brainstormers_brainstormerpr_last_update_id_a1413df9d7636e_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX brainstormers_brainstormerpr_last_update_id_a1413df9d7636e_like ON brainstormers_brainstormerpropositiongroup USING btree (last_update_id varchar_pattern_ops);


--
-- Name: brainstormers_brainstormerproposition_0e939a4f; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX brainstormers_brainstormerproposition_0e939a4f ON brainstormers_brainstormerproposition USING btree (group_id);


--
-- Name: brainstormers_brainstormerproposition_2401be38; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX brainstormers_brainstormerproposition_2401be38 ON brainstormers_brainstormerproposition USING btree (first_update_id);


--
-- Name: brainstormers_brainstormerproposition_6cac0549; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX brainstormers_brainstormerproposition_6cac0549 ON brainstormers_brainstormerproposition USING btree (last_update_id);


--
-- Name: brainstormers_brainstormerproposition_a73f1f77; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX brainstormers_brainstormerproposition_a73f1f77 ON brainstormers_brainstormerproposition USING btree (sort_order);


--
-- Name: brainstormers_brainstormerproposition_e8701ad4; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX brainstormers_brainstormerproposition_e8701ad4 ON brainstormers_brainstormerproposition USING btree (user_id);


--
-- Name: brainstormers_brainstormerproposition_id_666f043b596f1fb3_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX brainstormers_brainstormerproposition_id_666f043b596f1fb3_like ON brainstormers_brainstormerproposition USING btree (id varchar_pattern_ops);


--
-- Name: brainstormers_brainstormerpropositiong_id_7e77d772a7cc9e24_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX brainstormers_brainstormerpropositiong_id_7e77d772a7cc9e24_like ON brainstormers_brainstormerpropositiongroup USING btree (id varchar_pattern_ops);


--
-- Name: brainstormers_brainstormerpropositiongroup_2401be38; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX brainstormers_brainstormerpropositiongroup_2401be38 ON brainstormers_brainstormerpropositiongroup USING btree (first_update_id);


--
-- Name: brainstormers_brainstormerpropositiongroup_6cac0549; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX brainstormers_brainstormerpropositiongroup_6cac0549 ON brainstormers_brainstormerpropositiongroup USING btree (last_update_id);


--
-- Name: brainstormers_brainstormerpropositiongroup_7de8b978; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX brainstormers_brainstormerpropositiongroup_7de8b978 ON brainstormers_brainstormerpropositiongroup USING btree (brainstormer_id);


--
-- Name: brainstormers_brainstormerpropositiongroup_a73f1f77; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX brainstormers_brainstormerpropositiongroup_a73f1f77 ON brainstormers_brainstormerpropositiongroup USING btree (sort_order);


--
-- Name: brainstormers_brainstormertem_activity_id_2fe331993fe404e9_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX brainstormers_brainstormertem_activity_id_2fe331993fe404e9_like ON brainstormers_brainstormertemplate USING btree (activity_id varchar_pattern_ops);


--
-- Name: brainstormers_brainstormertemplate_f8a3193a; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX brainstormers_brainstormertemplate_f8a3193a ON brainstormers_brainstormertemplate USING btree (activity_id);


--
-- Name: django_admin_log_417f1b1c; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX django_admin_log_417f1b1c ON django_admin_log USING btree (content_type_id);


--
-- Name: django_admin_log_e8701ad4; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX django_admin_log_e8701ad4 ON django_admin_log USING btree (user_id);


--
-- Name: django_admin_log_user_id_3ba3cc7b98237ff_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX django_admin_log_user_id_3ba3cc7b98237ff_like ON django_admin_log USING btree (user_id varchar_pattern_ops);


--
-- Name: django_session_de54fa62; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX django_session_de54fa62 ON django_session USING btree (expire_date);


--
-- Name: django_session_session_key_7b52146610b5796f_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX django_session_session_key_7b52146610b5796f_like ON django_session USING btree (session_key varchar_pattern_ops);


--
-- Name: documents_backgrou_backgroundexecution_id_2394594294120bf0_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX documents_backgrou_backgroundexecution_id_2394594294120bf0_like ON documents_backgroundexecution_mgroups USING btree (backgroundexecution_id varchar_pattern_ops);


--
-- Name: documents_backgrou_backgroundexecution_id_24712e42aba15fa1_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX documents_backgrou_backgroundexecution_id_24712e42aba15fa1_like ON documents_backgroundexecution_auto_mgroups USING btree (backgroundexecution_id varchar_pattern_ops);


--
-- Name: documents_backgroundexecution_2401be38; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX documents_backgroundexecution_2401be38 ON documents_backgroundexecution USING btree (first_update_id);


--
-- Name: documents_backgroundexecution_6cac0549; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX documents_backgroundexecution_6cac0549 ON documents_backgroundexecution USING btree (last_update_id);


--
-- Name: documents_backgroundexecution_aut_group_id_d950e38955d0b03_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX documents_backgroundexecution_aut_group_id_d950e38955d0b03_like ON documents_backgroundexecution_auto_mgroups USING btree (group_id varchar_pattern_ops);


--
-- Name: documents_backgroundexecution_auto_mgroups_0e939a4f; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX documents_backgroundexecution_auto_mgroups_0e939a4f ON documents_backgroundexecution_auto_mgroups USING btree (group_id);


--
-- Name: documents_backgroundexecution_auto_mgroups_e79f1dba; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX documents_backgroundexecution_auto_mgroups_e79f1dba ON documents_backgroundexecution_auto_mgroups USING btree (backgroundexecution_id);


--
-- Name: documents_backgroundexecution_e7fafc10; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX documents_backgroundexecution_e7fafc10 ON documents_backgroundexecution USING btree (document_id);


--
-- Name: documents_backgroundexecution_id_37857374cb21e77e_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX documents_backgroundexecution_id_37857374cb21e77e_like ON documents_backgroundexecution USING btree (id varchar_pattern_ops);


--
-- Name: documents_backgroundexecution_mg_group_id_13f238592c9758a6_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX documents_backgroundexecution_mg_group_id_13f238592c9758a6_like ON documents_backgroundexecution_mgroups USING btree (group_id varchar_pattern_ops);


--
-- Name: documents_backgroundexecution_mgroups_0e939a4f; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX documents_backgroundexecution_mgroups_0e939a4f ON documents_backgroundexecution_mgroups USING btree (group_id);


--
-- Name: documents_backgroundexecution_mgroups_e79f1dba; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX documents_backgroundexecution_mgroups_e79f1dba ON documents_backgroundexecution_mgroups USING btree (backgroundexecution_id);


--
-- Name: documents_note_2401be38; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX documents_note_2401be38 ON documents_note USING btree (first_update_id);


--
-- Name: documents_note_57c1a063; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX documents_note_57c1a063 ON documents_note USING btree (session_id);


--
-- Name: documents_note_6cac0549; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX documents_note_6cac0549 ON documents_note USING btree (last_update_id);


--
-- Name: documents_note_document_id_186b5c3474ad4dd0_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX documents_note_document_id_186b5c3474ad4dd0_like ON documents_note USING btree (document_id varchar_pattern_ops);


--
-- Name: documents_note_e7fafc10; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX documents_note_e7fafc10 ON documents_note USING btree (document_id);


--
-- Name: documents_note_e8701ad4; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX documents_note_e8701ad4 ON documents_note USING btree (user_id);


--
-- Name: documents_note_first_update_id_4a52373605eb8c31_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX documents_note_first_update_id_4a52373605eb8c31_like ON documents_note USING btree (first_update_id varchar_pattern_ops);


--
-- Name: documents_note_id_1b15f54c8b7308f5_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX documents_note_id_1b15f54c8b7308f5_like ON documents_note USING btree (id varchar_pattern_ops);


--
-- Name: documents_note_last_update_id_3d34acffbb88b955_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX documents_note_last_update_id_3d34acffbb88b955_like ON documents_note USING btree (last_update_id varchar_pattern_ops);


--
-- Name: documents_note_user_id_11ab27cf38b314fd_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX documents_note_user_id_11ab27cf38b314fd_like ON documents_note USING btree (user_id varchar_pattern_ops);


--
-- Name: evaluations_criterion_2401be38; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX evaluations_criterion_2401be38 ON evaluations_criterion USING btree (first_update_id);


--
-- Name: evaluations_criterion_657593fa; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX evaluations_criterion_657593fa ON evaluations_criterion USING btree (original_version_id);


--
-- Name: evaluations_criterion_6cac0549; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX evaluations_criterion_6cac0549 ON evaluations_criterion USING btree (last_update_id);


--
-- Name: evaluations_criterion_a73f1f77; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX evaluations_criterion_a73f1f77 ON evaluations_criterion USING btree (sort_order);


--
-- Name: evaluations_criterion_ca88a2a2; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX evaluations_criterion_ca88a2a2 ON evaluations_criterion USING btree (parent_version_id);


--
-- Name: evaluations_criterion_f57b1ff6; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX evaluations_criterion_f57b1ff6 ON evaluations_criterion USING btree (exercise_id);


--
-- Name: evaluations_criterion_id_48e786b3b7955f5d_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX evaluations_criterion_id_48e786b3b7955f5d_like ON evaluations_criterion USING btree (id varchar_pattern_ops);


--
-- Name: evaluations_evalu_trainingactivity_ptr_id_149e2659071ef6cd_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX evaluations_evalu_trainingactivity_ptr_id_149e2659071ef6cd_like ON evaluations_evaluation USING btree (trainingactivity_ptr_id varchar_pattern_ops);


--
-- Name: evaluations_evaluationgro_first_update_id_52171bcc0f69c4de_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX evaluations_evaluationgro_first_update_id_52171bcc0f69c4de_like ON evaluations_evaluationgrouppermission USING btree (first_update_id varchar_pattern_ops);


--
-- Name: evaluations_evaluationgroup_evaluation_id_5a46c4cd94f5c0c4_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX evaluations_evaluationgroup_evaluation_id_5a46c4cd94f5c0c4_like ON evaluations_evaluationgrouppermission USING btree (evaluation_id varchar_pattern_ops);


--
-- Name: evaluations_evaluationgroup_last_update_id_b5e89825f832b46_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX evaluations_evaluationgroup_last_update_id_b5e89825f832b46_like ON evaluations_evaluationgrouppermission USING btree (last_update_id varchar_pattern_ops);


--
-- Name: evaluations_evaluationgrouppermi_group_id_4536383c504e3c3a_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX evaluations_evaluationgrouppermi_group_id_4536383c504e3c3a_like ON evaluations_evaluationgrouppermission USING btree (group_id varchar_pattern_ops);


--
-- Name: evaluations_evaluationgrouppermission_0e939a4f; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX evaluations_evaluationgrouppermission_0e939a4f ON evaluations_evaluationgrouppermission USING btree (group_id);


--
-- Name: evaluations_evaluationgrouppermission_2401be38; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX evaluations_evaluationgrouppermission_2401be38 ON evaluations_evaluationgrouppermission USING btree (first_update_id);


--
-- Name: evaluations_evaluationgrouppermission_6cac0549; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX evaluations_evaluationgrouppermission_6cac0549 ON evaluations_evaluationgrouppermission USING btree (last_update_id);


--
-- Name: evaluations_evaluationgrouppermission_a7f117cb; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX evaluations_evaluationgrouppermission_a7f117cb ON evaluations_evaluationgrouppermission USING btree (evaluation_id);


--
-- Name: evaluations_evaluationgrouppermission_id_49949a725d9125fc_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX evaluations_evaluationgrouppermission_id_49949a725d9125fc_like ON evaluations_evaluationgrouppermission USING btree (id varchar_pattern_ops);


--
-- Name: evaluations_exercise_2401be38; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX evaluations_exercise_2401be38 ON evaluations_exercise USING btree (first_update_id);


--
-- Name: evaluations_exercise_657593fa; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX evaluations_exercise_657593fa ON evaluations_exercise USING btree (original_version_id);


--
-- Name: evaluations_exercise_6cac0549; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX evaluations_exercise_6cac0549 ON evaluations_exercise USING btree (last_update_id);


--
-- Name: evaluations_exercise_a73f1f77; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX evaluations_exercise_a73f1f77 ON evaluations_exercise USING btree (sort_order);


--
-- Name: evaluations_exercise_a7f117cb; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX evaluations_exercise_a7f117cb ON evaluations_exercise USING btree (evaluation_id);


--
-- Name: evaluations_exercise_ca88a2a2; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX evaluations_exercise_ca88a2a2 ON evaluations_exercise USING btree (parent_version_id);


--
-- Name: evaluations_exercise_evaluation_id_3dc89c93de1bd4e2_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX evaluations_exercise_evaluation_id_3dc89c93de1bd4e2_like ON evaluations_exercise USING btree (evaluation_id varchar_pattern_ops);


--
-- Name: evaluations_exercise_first_update_id_135c8a5bd0f9cf0_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX evaluations_exercise_first_update_id_135c8a5bd0f9cf0_like ON evaluations_exercise USING btree (first_update_id varchar_pattern_ops);


--
-- Name: evaluations_exercise_id_2d8e6ce4502d605e_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX evaluations_exercise_id_2d8e6ce4502d605e_like ON evaluations_exercise USING btree (id varchar_pattern_ops);


--
-- Name: evaluations_exercise_last_update_id_5c0ee8bc8c53ccc_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX evaluations_exercise_last_update_id_5c0ee8bc8c53ccc_like ON evaluations_exercise USING btree (last_update_id varchar_pattern_ops);


--
-- Name: evaluations_exercise_original_version_id_210ad7518dbf5729_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX evaluations_exercise_original_version_id_210ad7518dbf5729_like ON evaluations_exercise USING btree (original_version_id varchar_pattern_ops);


--
-- Name: evaluations_exercise_parent_version_id_7302a8cd3d3d18b3_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX evaluations_exercise_parent_version_id_7302a8cd3d3d18b3_like ON evaluations_exercise USING btree (parent_version_id varchar_pattern_ops);


--
-- Name: evaluations_rating_2401be38; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX evaluations_rating_2401be38 ON evaluations_rating USING btree (first_update_id);


--
-- Name: evaluations_rating_385b00a3; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX evaluations_rating_385b00a3 ON evaluations_rating USING btree (criterion_id);


--
-- Name: evaluations_rating_6cac0549; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX evaluations_rating_6cac0549 ON evaluations_rating USING btree (last_update_id);


--
-- Name: evaluations_rating_7fc8ef54; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX evaluations_rating_7fc8ef54 ON evaluations_rating USING btree (session_id);


--
-- Name: evaluations_rating_a12aff71; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX evaluations_rating_a12aff71 ON evaluations_rating USING btree (trainee_id);


--
-- Name: evaluations_rating_criterion_id_653dd5d07c1fabc5_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX evaluations_rating_criterion_id_653dd5d07c1fabc5_like ON evaluations_rating USING btree (criterion_id varchar_pattern_ops);


--
-- Name: evaluations_rating_e7c5d788; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX evaluations_rating_e7c5d788 ON evaluations_rating USING btree (judge_id);


--
-- Name: evaluations_rating_first_update_id_4f91508028d14606_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX evaluations_rating_first_update_id_4f91508028d14606_like ON evaluations_rating USING btree (first_update_id varchar_pattern_ops);


--
-- Name: evaluations_rating_id_504de0713bad48d4_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX evaluations_rating_id_504de0713bad48d4_like ON evaluations_rating USING btree (id varchar_pattern_ops);


--
-- Name: evaluations_rating_judge_id_3a42976bcfe6fe11_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX evaluations_rating_judge_id_3a42976bcfe6fe11_like ON evaluations_rating USING btree (judge_id varchar_pattern_ops);


--
-- Name: evaluations_rating_last_update_id_227ef83b170b8142_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX evaluations_rating_last_update_id_227ef83b170b8142_like ON evaluations_rating USING btree (last_update_id varchar_pattern_ops);


--
-- Name: evaluations_rating_session_id_66fbacd90d13063e_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX evaluations_rating_session_id_66fbacd90d13063e_like ON evaluations_rating USING btree (session_id varchar_pattern_ops);


--
-- Name: evaluations_rating_trainee_id_31b7e9ecb6ddb84c_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX evaluations_rating_trainee_id_31b7e9ecb6ddb84c_like ON evaluations_rating USING btree (trainee_id varchar_pattern_ops);


--
-- Name: eventlog_eventlog_2401be38; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX eventlog_eventlog_2401be38 ON eventlog_eventlog USING btree (first_update_id);


--
-- Name: eventlog_eventlog_418c5509; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX eventlog_eventlog_418c5509 ON eventlog_eventlog USING btree (action);


--
-- Name: eventlog_eventlog_6cac0549; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX eventlog_eventlog_6cac0549 ON eventlog_eventlog USING btree (last_update_id);


--
-- Name: eventlog_eventlog_action_22e10aad6b74506_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX eventlog_eventlog_action_22e10aad6b74506_like ON eventlog_eventlog USING btree (action varchar_pattern_ops);


--
-- Name: eventlog_eventlog_b9258656; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX eventlog_eventlog_b9258656 ON eventlog_eventlog USING btree (subject_type_id);


--
-- Name: eventlog_eventlog_bac75ed4; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX eventlog_eventlog_bac75ed4 ON eventlog_eventlog USING btree (target_type_id);


--
-- Name: eventlog_eventlog_ed5cb66b; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX eventlog_eventlog_ed5cb66b ON eventlog_eventlog USING btree (source_type_id);


--
-- Name: eventlog_eventlog_fde81f11; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX eventlog_eventlog_fde81f11 ON eventlog_eventlog USING btree (created_at);


--
-- Name: eventlog_eventlog_first_update_id_42e88f8f6d44e25d_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX eventlog_eventlog_first_update_id_42e88f8f6d44e25d_like ON eventlog_eventlog USING btree (first_update_id varchar_pattern_ops);


--
-- Name: eventlog_eventlog_id_6bd94ee5d224c10f_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX eventlog_eventlog_id_6bd94ee5d224c10f_like ON eventlog_eventlog USING btree (id varchar_pattern_ops);


--
-- Name: eventlog_eventlog_last_update_id_3cf4caa226f2ba99_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX eventlog_eventlog_last_update_id_3cf4caa226f2ba99_like ON eventlog_eventlog USING btree (last_update_id varchar_pattern_ops);


--
-- Name: likes_like_2401be38; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX likes_like_2401be38 ON likes_like USING btree (first_update_id);


--
-- Name: likes_like_417f1b1c; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX likes_like_417f1b1c ON likes_like USING btree (content_type_id);


--
-- Name: likes_like_4f331e2f; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX likes_like_4f331e2f ON likes_like USING btree (author_id);


--
-- Name: likes_like_6cac0549; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX likes_like_6cac0549 ON likes_like USING btree (last_update_id);


--
-- Name: likes_like_author_id_620cedbae6ba4aff_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX likes_like_author_id_620cedbae6ba4aff_like ON likes_like USING btree (author_id varchar_pattern_ops);


--
-- Name: likes_like_first_update_id_395d50d050b41a24_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX likes_like_first_update_id_395d50d050b41a24_like ON likes_like USING btree (first_update_id varchar_pattern_ops);


--
-- Name: likes_like_id_4eb4d56e87e06f4a_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX likes_like_id_4eb4d56e87e06f4a_like ON likes_like USING btree (id varchar_pattern_ops);


--
-- Name: likes_like_last_update_id_69c60c13654ef960_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX likes_like_last_update_id_69c60c13654ef960_like ON likes_like USING btree (last_update_id varchar_pattern_ops);


--
-- Name: metaplans_metaplan_2401be38; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX metaplans_metaplan_2401be38 ON metaplans_metaplan USING btree (first_update_id);


--
-- Name: metaplans_metaplan_57c1a063; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX metaplans_metaplan_57c1a063 ON metaplans_metaplan USING btree (session_id);


--
-- Name: metaplans_metaplan_6cac0549; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX metaplans_metaplan_6cac0549 ON metaplans_metaplan USING btree (last_update_id);


--
-- Name: metaplans_metaplan_a73f1f77; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX metaplans_metaplan_a73f1f77 ON metaplans_metaplan USING btree (sort_order);


--
-- Name: metaplans_metaplan_first_update_id_2070261b8ee1dd77_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX metaplans_metaplan_first_update_id_2070261b8ee1dd77_like ON metaplans_metaplan USING btree (first_update_id varchar_pattern_ops);


--
-- Name: metaplans_metaplan_id_1e8db07e26148d3b_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX metaplans_metaplan_id_1e8db07e26148d3b_like ON metaplans_metaplan USING btree (id varchar_pattern_ops);


--
-- Name: metaplans_metaplan_last_update_id_3a8ec7f4e7ea559b_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX metaplans_metaplan_last_update_id_3a8ec7f4e7ea559b_like ON metaplans_metaplan USING btree (last_update_id varchar_pattern_ops);


--
-- Name: metaplans_metaplan_training_session_id_5c7782af54d778ce_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX metaplans_metaplan_training_session_id_5c7782af54d778ce_like ON metaplans_metaplan USING btree (session_id varchar_pattern_ops);


--
-- Name: metaplans_metaplanproposi_first_update_id_114e17ea68dc9711_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX metaplans_metaplanproposi_first_update_id_114e17ea68dc9711_like ON metaplans_metaplanproposition USING btree (first_update_id varchar_pattern_ops);


--
-- Name: metaplans_metaplanproposit_last_update_id_66879a1d575adbcb_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX metaplans_metaplanproposit_last_update_id_66879a1d575adbcb_like ON metaplans_metaplanproposition USING btree (last_update_id varchar_pattern_ops);


--
-- Name: metaplans_metaplanproposition_2401be38; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX metaplans_metaplanproposition_2401be38 ON metaplans_metaplanproposition USING btree (first_update_id);


--
-- Name: metaplans_metaplanproposition_2ecd0a0a; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX metaplans_metaplanproposition_2ecd0a0a ON metaplans_metaplanproposition USING btree (metaplan_id);


--
-- Name: metaplans_metaplanproposition_6cac0549; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX metaplans_metaplanproposition_6cac0549 ON metaplans_metaplanproposition USING btree (last_update_id);


--
-- Name: metaplans_metaplanproposition_e8701ad4; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX metaplans_metaplanproposition_e8701ad4 ON metaplans_metaplanproposition USING btree (user_id);


--
-- Name: metaplans_metaplanproposition_id_4faccdcf01dbdaab_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX metaplans_metaplanproposition_id_4faccdcf01dbdaab_like ON metaplans_metaplanproposition USING btree (id varchar_pattern_ops);


--
-- Name: metaplans_metaplanproposition_user_id_173668b84e95d15d_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX metaplans_metaplanproposition_user_id_173668b84e95d15d_like ON metaplans_metaplanproposition USING btree (user_id varchar_pattern_ops);


--
-- Name: notifications_noticesetting_7c4c7fdb; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX notifications_noticesetting_7c4c7fdb ON notifications_noticesetting USING btree (notice_type_id);


--
-- Name: notifications_noticesetting_e8701ad4; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX notifications_noticesetting_e8701ad4 ON notifications_noticesetting USING btree (user_id);


--
-- Name: notifications_noticesetting_f98c15c0; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX notifications_noticesetting_f98c15c0 ON notifications_noticesetting USING btree (scoping_content_type_id);


--
-- Name: oauth2_provider_accesstoken_6bc0a4eb; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX oauth2_provider_accesstoken_6bc0a4eb ON oauth2_provider_accesstoken USING btree (application_id);


--
-- Name: oauth2_provider_accesstoken_94a08da1; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX oauth2_provider_accesstoken_94a08da1 ON oauth2_provider_accesstoken USING btree (token);


--
-- Name: oauth2_provider_accesstoken_e8701ad4; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX oauth2_provider_accesstoken_e8701ad4 ON oauth2_provider_accesstoken USING btree (user_id);


--
-- Name: oauth2_provider_accesstoken_token_2589d0162db4714f_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX oauth2_provider_accesstoken_token_2589d0162db4714f_like ON oauth2_provider_accesstoken USING btree (token varchar_pattern_ops);


--
-- Name: oauth2_provider_accesstoken_user_id_63d515a924666524_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX oauth2_provider_accesstoken_user_id_63d515a924666524_like ON oauth2_provider_accesstoken USING btree (user_id varchar_pattern_ops);


--
-- Name: oauth2_provider_application_9d667c2b; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX oauth2_provider_application_9d667c2b ON oauth2_provider_application USING btree (client_secret);


--
-- Name: oauth2_provider_application_client_id_1f2be6b108a29514_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX oauth2_provider_application_client_id_1f2be6b108a29514_like ON oauth2_provider_application USING btree (client_id varchar_pattern_ops);


--
-- Name: oauth2_provider_application_client_secret_dcfb5d2a2f9d6d4_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX oauth2_provider_application_client_secret_dcfb5d2a2f9d6d4_like ON oauth2_provider_application USING btree (client_secret varchar_pattern_ops);


--
-- Name: oauth2_provider_application_e8701ad4; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX oauth2_provider_application_e8701ad4 ON oauth2_provider_application USING btree (user_id);


--
-- Name: oauth2_provider_application_user_id_f1506a09bd6e74b_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX oauth2_provider_application_user_id_f1506a09bd6e74b_like ON oauth2_provider_application USING btree (user_id varchar_pattern_ops);


--
-- Name: oauth2_provider_grant_6bc0a4eb; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX oauth2_provider_grant_6bc0a4eb ON oauth2_provider_grant USING btree (application_id);


--
-- Name: oauth2_provider_grant_c1336794; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX oauth2_provider_grant_c1336794 ON oauth2_provider_grant USING btree (code);


--
-- Name: oauth2_provider_grant_code_56550d14199a13d_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX oauth2_provider_grant_code_56550d14199a13d_like ON oauth2_provider_grant USING btree (code varchar_pattern_ops);


--
-- Name: oauth2_provider_grant_e8701ad4; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX oauth2_provider_grant_e8701ad4 ON oauth2_provider_grant USING btree (user_id);


--
-- Name: oauth2_provider_grant_user_id_7671ef0bb66827e2_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX oauth2_provider_grant_user_id_7671ef0bb66827e2_like ON oauth2_provider_grant USING btree (user_id varchar_pattern_ops);


--
-- Name: oauth2_provider_refreshtoken_6bc0a4eb; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX oauth2_provider_refreshtoken_6bc0a4eb ON oauth2_provider_refreshtoken USING btree (application_id);


--
-- Name: oauth2_provider_refreshtoken_94a08da1; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX oauth2_provider_refreshtoken_94a08da1 ON oauth2_provider_refreshtoken USING btree (token);


--
-- Name: oauth2_provider_refreshtoken_e8701ad4; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX oauth2_provider_refreshtoken_e8701ad4 ON oauth2_provider_refreshtoken USING btree (user_id);


--
-- Name: oauth2_provider_refreshtoken_token_33fbf1cc803dc884_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX oauth2_provider_refreshtoken_token_33fbf1cc803dc884_like ON oauth2_provider_refreshtoken USING btree (token varchar_pattern_ops);


--
-- Name: oauth2_provider_refreshtoken_user_id_212b5eac9315d2af_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX oauth2_provider_refreshtoken_user_id_212b5eac9315d2af_like ON oauth2_provider_refreshtoken USING btree (user_id varchar_pattern_ops);


--
-- Name: roleplays_criterion_2401be38; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX roleplays_criterion_2401be38 ON roleplays_criterion USING btree (first_update_id);


--
-- Name: roleplays_criterion_657593fa; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX roleplays_criterion_657593fa ON roleplays_criterion USING btree (original_version_id);


--
-- Name: roleplays_criterion_6cac0549; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX roleplays_criterion_6cac0549 ON roleplays_criterion USING btree (last_update_id);


--
-- Name: roleplays_criterion_a73f1f77; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX roleplays_criterion_a73f1f77 ON roleplays_criterion USING btree (sort_order);


--
-- Name: roleplays_criterion_b6159b48; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX roleplays_criterion_b6159b48 ON roleplays_criterion USING btree (activity_type_id);


--
-- Name: roleplays_criterion_bef491d2; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX roleplays_criterion_bef491d2 ON roleplays_criterion USING btree (step_id);


--
-- Name: roleplays_criterion_ca88a2a2; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX roleplays_criterion_ca88a2a2 ON roleplays_criterion USING btree (parent_version_id);


--
-- Name: roleplays_criterion_dimensio_criterion_id_6b910775b2185c17_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX roleplays_criterion_dimensio_criterion_id_6b910775b2185c17_like ON roleplays_criterion_dimensions USING btree (criterion_id varchar_pattern_ops);


--
-- Name: roleplays_criterion_dimensio_dimension_id_7de5c49b35158529_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX roleplays_criterion_dimensio_dimension_id_7de5c49b35158529_like ON roleplays_criterion_dimensions USING btree (dimension_id varchar_pattern_ops);


--
-- Name: roleplays_criterion_dimensions_385b00a3; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX roleplays_criterion_dimensions_385b00a3 ON roleplays_criterion_dimensions USING btree (criterion_id);


--
-- Name: roleplays_criterion_dimensions_b46ef2c7; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX roleplays_criterion_dimensions_b46ef2c7 ON roleplays_criterion_dimensions USING btree (dimension_id);


--
-- Name: roleplays_criterion_e160a0b9; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX roleplays_criterion_e160a0b9 ON roleplays_criterion USING btree (training_id);


--
-- Name: roleplays_criterion_first_update_id_3e422f566a471ff9_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX roleplays_criterion_first_update_id_3e422f566a471ff9_like ON roleplays_criterion USING btree (first_update_id varchar_pattern_ops);


--
-- Name: roleplays_criterion_id_748285c0ad0e71eb_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX roleplays_criterion_id_748285c0ad0e71eb_like ON roleplays_criterion USING btree (id varchar_pattern_ops);


--
-- Name: roleplays_criterion_last_update_id_776cadd260807735_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX roleplays_criterion_last_update_id_776cadd260807735_like ON roleplays_criterion USING btree (last_update_id varchar_pattern_ops);


--
-- Name: roleplays_rating_2401be38; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX roleplays_rating_2401be38 ON roleplays_rating USING btree (first_update_id);


--
-- Name: roleplays_rating_385b00a3; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX roleplays_rating_385b00a3 ON roleplays_rating USING btree (criterion_id);


--
-- Name: roleplays_rating_57c1a063; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX roleplays_rating_57c1a063 ON roleplays_rating USING btree (training_session_id);


--
-- Name: roleplays_rating_6cac0549; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX roleplays_rating_6cac0549 ON roleplays_rating USING btree (last_update_id);


--
-- Name: roleplays_rating_a12aff71; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX roleplays_rating_a12aff71 ON roleplays_rating USING btree (trainee_id);


--
-- Name: roleplays_rating_criterion_id_3a8f7aed1a7a016c_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX roleplays_rating_criterion_id_3a8f7aed1a7a016c_like ON roleplays_rating USING btree (criterion_id varchar_pattern_ops);


--
-- Name: roleplays_rating_first_update_id_68f010963db78a0f_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX roleplays_rating_first_update_id_68f010963db78a0f_like ON roleplays_rating USING btree (first_update_id varchar_pattern_ops);


--
-- Name: roleplays_rating_id_3a39ea8ab5b120a3_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX roleplays_rating_id_3a39ea8ab5b120a3_like ON roleplays_rating USING btree (id varchar_pattern_ops);


--
-- Name: roleplays_rating_last_update_id_380c7fc92cf99f33_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX roleplays_rating_last_update_id_380c7fc92cf99f33_like ON roleplays_rating USING btree (last_update_id varchar_pattern_ops);


--
-- Name: roleplays_step_2401be38; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX roleplays_step_2401be38 ON roleplays_step USING btree (first_update_id);


--
-- Name: roleplays_step_4b35a113; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX roleplays_step_4b35a113 ON roleplays_step USING btree (roleplay_id);


--
-- Name: roleplays_step_657593fa; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX roleplays_step_657593fa ON roleplays_step USING btree (original_version_id);


--
-- Name: roleplays_step_6cac0549; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX roleplays_step_6cac0549 ON roleplays_step USING btree (last_update_id);


--
-- Name: roleplays_step_a73f1f77; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX roleplays_step_a73f1f77 ON roleplays_step USING btree (sort_order);


--
-- Name: roleplays_step_ca88a2a2; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX roleplays_step_ca88a2a2 ON roleplays_step USING btree (parent_version_id);


--
-- Name: roleplays_step_first_update_id_46509500a9cf10f1_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX roleplays_step_first_update_id_46509500a9cf10f1_like ON roleplays_step USING btree (first_update_id varchar_pattern_ops);


--
-- Name: roleplays_step_id_36e50ce5a7ed7ba3_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX roleplays_step_id_36e50ce5a7ed7ba3_like ON roleplays_step USING btree (id varchar_pattern_ops);


--
-- Name: roleplays_step_last_update_id_62073cfc7b0c3433_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX roleplays_step_last_update_id_62073cfc7b0c3433_like ON roleplays_step USING btree (last_update_id varchar_pattern_ops);


--
-- Name: roleplays_step_roleplay_id_28d43223a4d36c1c_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX roleplays_step_roleplay_id_28d43223a4d36c1c_like ON roleplays_step USING btree (roleplay_id varchar_pattern_ops);


--
-- Name: surveys_answer_00b3bd7e; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX surveys_answer_00b3bd7e ON surveys_answer USING btree (survey_id);


--
-- Name: surveys_answer_2401be38; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX surveys_answer_2401be38 ON surveys_answer USING btree (first_update_id);


--
-- Name: surveys_answer_57c1a063; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX surveys_answer_57c1a063 ON surveys_answer USING btree (training_session_id);


--
-- Name: surveys_answer_6cac0549; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX surveys_answer_6cac0549 ON surveys_answer USING btree (last_update_id);


--
-- Name: surveys_answer_7aa0f6ee; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX surveys_answer_7aa0f6ee ON surveys_answer USING btree (question_id);


--
-- Name: surveys_answer_a12aff71; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX surveys_answer_a12aff71 ON surveys_answer USING btree (trainee_id);


--
-- Name: surveys_answer_choices_428bb064; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX surveys_answer_choices_428bb064 ON surveys_answer_choices USING btree (choice_id);


--
-- Name: surveys_answer_choices_answer_id_6dd4e01fd741331f_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX surveys_answer_choices_answer_id_6dd4e01fd741331f_like ON surveys_answer_choices USING btree (answer_id varchar_pattern_ops);


--
-- Name: surveys_answer_choices_choice_id_6609c798ce9d892b_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX surveys_answer_choices_choice_id_6609c798ce9d892b_like ON surveys_answer_choices USING btree (choice_id varchar_pattern_ops);


--
-- Name: surveys_answer_choices_fb12e902; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX surveys_answer_choices_fb12e902 ON surveys_answer_choices USING btree (answer_id);


--
-- Name: surveys_answer_id_95d275b2772672a_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX surveys_answer_id_95d275b2772672a_like ON surveys_answer USING btree (id varchar_pattern_ops);


--
-- Name: surveys_choice_2401be38; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX surveys_choice_2401be38 ON surveys_choice USING btree (first_update_id);


--
-- Name: surveys_choice_6cac0549; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX surveys_choice_6cac0549 ON surveys_choice USING btree (last_update_id);


--
-- Name: surveys_choice_7aa0f6ee; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX surveys_choice_7aa0f6ee ON surveys_choice USING btree (question_id);


--
-- Name: surveys_choice_a73f1f77; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX surveys_choice_a73f1f77 ON surveys_choice USING btree (sort_order);


--
-- Name: surveys_choice_first_update_id_7797257dfcbe5224_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX surveys_choice_first_update_id_7797257dfcbe5224_like ON surveys_choice USING btree (first_update_id varchar_pattern_ops);


--
-- Name: surveys_choice_id_3176685d79d9a74a_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX surveys_choice_id_3176685d79d9a74a_like ON surveys_choice USING btree (id varchar_pattern_ops);


--
-- Name: surveys_choice_last_update_id_938895fc0953ea0_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX surveys_choice_last_update_id_938895fc0953ea0_like ON surveys_choice USING btree (last_update_id varchar_pattern_ops);


--
-- Name: surveys_pool_2401be38; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX surveys_pool_2401be38 ON surveys_pool USING btree (first_update_id);


--
-- Name: surveys_pool_4f331e2f; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX surveys_pool_4f331e2f ON surveys_pool USING btree (author_id);


--
-- Name: surveys_pool_6cac0549; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX surveys_pool_6cac0549 ON surveys_pool USING btree (last_update_id);


--
-- Name: surveys_pool_a73f1f77; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX surveys_pool_a73f1f77 ON surveys_pool USING btree (sort_order);


--
-- Name: surveys_pool_author_id_3e94284286502617_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX surveys_pool_author_id_3e94284286502617_like ON surveys_pool USING btree (author_id varchar_pattern_ops);


--
-- Name: surveys_pool_first_update_id_65554fd705be5494_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX surveys_pool_first_update_id_65554fd705be5494_like ON surveys_pool USING btree (first_update_id varchar_pattern_ops);


--
-- Name: surveys_pool_id_57089a448b45ff6e_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX surveys_pool_id_57089a448b45ff6e_like ON surveys_pool USING btree (id varchar_pattern_ops);


--
-- Name: surveys_pool_last_update_id_990a77fb06e1b8_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX surveys_pool_last_update_id_990a77fb06e1b8_like ON surveys_pool USING btree (last_update_id varchar_pattern_ops);


--
-- Name: surveys_question_2401be38; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX surveys_question_2401be38 ON surveys_question USING btree (first_update_id);


--
-- Name: surveys_question_6cac0549; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX surveys_question_6cac0549 ON surveys_question USING btree (last_update_id);


--
-- Name: surveys_question_a73f1f77; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX surveys_question_a73f1f77 ON surveys_question USING btree (sort_order);


--
-- Name: surveys_question_ff383e3c; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX surveys_question_ff383e3c ON surveys_question USING btree (pool_id);


--
-- Name: surveys_question_first_update_id_1343e67ba660ca22_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX surveys_question_first_update_id_1343e67ba660ca22_like ON surveys_question USING btree (first_update_id varchar_pattern_ops);


--
-- Name: surveys_question_id_10787a955d69ff04_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX surveys_question_id_10787a955d69ff04_like ON surveys_question USING btree (id varchar_pattern_ops);


--
-- Name: surveys_question_last_update_id_f941d4649dc1646_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX surveys_question_last_update_id_f941d4649dc1646_like ON surveys_question USING btree (last_update_id varchar_pattern_ops);


--
-- Name: surveys_question_pool_id_ca142372b2370b_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX surveys_question_pool_id_ca142372b2370b_like ON surveys_question USING btree (pool_id varchar_pattern_ops);


--
-- Name: surveys_survey_2401be38; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX surveys_survey_2401be38 ON surveys_survey USING btree (first_update_id);


--
-- Name: surveys_survey_68153311; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX surveys_survey_68153311 ON surveys_survey USING btree (trainer_id);


--
-- Name: surveys_survey_6cac0549; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX surveys_survey_6cac0549 ON surveys_survey USING btree (last_update_id);


--
-- Name: surveys_survey_e160a0b9; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX surveys_survey_e160a0b9 ON surveys_survey USING btree (training_id);


--
-- Name: surveys_survey_first_update_id_20ffd153ba0de529_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX surveys_survey_first_update_id_20ffd153ba0de529_like ON surveys_survey USING btree (first_update_id varchar_pattern_ops);


--
-- Name: surveys_survey_id_5a257d13827e0cc3_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX surveys_survey_id_5a257d13827e0cc3_like ON surveys_survey USING btree (id varchar_pattern_ops);


--
-- Name: surveys_survey_last_update_id_294d184be53d864d_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX surveys_survey_last_update_id_294d184be53d864d_like ON surveys_survey USING btree (last_update_id varchar_pattern_ops);


--
-- Name: surveys_surveypool_00b3bd7e; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX surveys_surveypool_00b3bd7e ON surveys_surveypool USING btree (survey_id);


--
-- Name: surveys_surveypool_2401be38; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX surveys_surveypool_2401be38 ON surveys_surveypool USING btree (first_update_id);


--
-- Name: surveys_surveypool_6cac0549; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX surveys_surveypool_6cac0549 ON surveys_surveypool USING btree (last_update_id);


--
-- Name: surveys_surveypool_ff383e3c; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX surveys_surveypool_ff383e3c ON surveys_surveypool USING btree (pool_id);


--
-- Name: surveys_surveypool_first_update_id_241679c230458c1a_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX surveys_surveypool_first_update_id_241679c230458c1a_like ON surveys_surveypool USING btree (first_update_id varchar_pattern_ops);


--
-- Name: surveys_surveypool_id_40823e4addd6f698_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX surveys_surveypool_id_40823e4addd6f698_like ON surveys_surveypool USING btree (id varchar_pattern_ops);


--
-- Name: surveys_surveypool_last_update_id_c847915145813c2_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX surveys_surveypool_last_update_id_c847915145813c2_like ON surveys_surveypool USING btree (last_update_id varchar_pattern_ops);


--
-- Name: surveys_surveypool_pool_id_5190aae92ffc79a7_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX surveys_surveypool_pool_id_5190aae92ffc79a7_like ON surveys_surveypool USING btree (pool_id varchar_pattern_ops);


--
-- Name: surveys_surveypool_survey_id_1e6e9b057f5f640f_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX surveys_surveypool_survey_id_1e6e9b057f5f640f_like ON surveys_surveypool USING btree (survey_id varchar_pattern_ops);


--
-- Name: sync_clientversion_2401be38; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX sync_clientversion_2401be38 ON sync_clientversion USING btree (first_update_id);


--
-- Name: sync_clientversion_2af72f10; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX sync_clientversion_2af72f10 ON sync_clientversion USING btree (version);


--
-- Name: sync_clientversion_6cac0549; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX sync_clientversion_6cac0549 ON sync_clientversion USING btree (last_update_id);


--
-- Name: sync_clientversion_b068931c; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX sync_clientversion_b068931c ON sync_clientversion USING btree (name);


--
-- Name: sync_clientversion_id_1fffbd3e3047dfda_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX sync_clientversion_id_1fffbd3e3047dfda_like ON sync_clientversion USING btree (id varchar_pattern_ops);


--
-- Name: sync_clientversion_name_2da302afd642a900_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX sync_clientversion_name_2da302afd642a900_like ON sync_clientversion USING btree (name varchar_pattern_ops);


--
-- Name: sync_clientversion_name_56146dc7f84a39fc_idx; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX sync_clientversion_name_56146dc7f84a39fc_idx ON sync_clientversion USING btree (name, version);


--
-- Name: sync_localserver_2401be38; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX sync_localserver_2401be38 ON sync_localserver USING btree (first_update_id);


--
-- Name: sync_localserver_6cac0549; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX sync_localserver_6cac0549 ON sync_localserver USING btree (last_update_id);


--
-- Name: sync_localserver_id_3839c5aede5b1dc_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX sync_localserver_id_3839c5aede5b1dc_like ON sync_localserver USING btree (id varchar_pattern_ops);


--
-- Name: sync_localserver_mac_46b4c312bd245521_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX sync_localserver_mac_46b4c312bd245521_like ON sync_localserver USING btree (mac varchar_pattern_ops);


--
-- Name: sync_localserverconnectio_local_server_id_5d5bc82c279e54e3_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX sync_localserverconnectio_local_server_id_5d5bc82c279e54e3_like ON sync_localserverconnection USING btree (local_server_id varchar_pattern_ops);


--
-- Name: sync_localserverconnection_45756caf; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX sync_localserverconnection_45756caf ON sync_localserverconnection USING btree (local_server_id);


--
-- Name: sync_localserverconnection_5fc73231; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX sync_localserverconnection_5fc73231 ON sync_localserverconnection USING btree (date);


--
-- Name: sync_serverversion_2401be38; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX sync_serverversion_2401be38 ON sync_serverversion USING btree (first_update_id);


--
-- Name: sync_serverversion_2af72f10; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX sync_serverversion_2af72f10 ON sync_serverversion USING btree (version);


--
-- Name: sync_serverversion_6cac0549; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX sync_serverversion_6cac0549 ON sync_serverversion USING btree (last_update_id);


--
-- Name: sync_serverversion_b068931c; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX sync_serverversion_b068931c ON sync_serverversion USING btree (name);


--
-- Name: sync_serverversion_id_5154ee12519fa177_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX sync_serverversion_id_5154ee12519fa177_like ON sync_serverversion USING btree (id varchar_pattern_ops);


--
-- Name: sync_serverversion_name_6d9fe85fbccc1851_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX sync_serverversion_name_6d9fe85fbccc1851_like ON sync_serverversion USING btree (name varchar_pattern_ops);


--
-- Name: sync_serverversion_name_7884e506719ad1b5_idx; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX sync_serverversion_name_7884e506719ad1b5_idx ON sync_serverversion USING btree (name, version);


--
-- Name: sync_task_5fc73231; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX sync_task_5fc73231 ON sync_task USING btree (date);


--
-- Name: sync_task_6b2ded51; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX sync_task_6b2ded51 ON sync_task USING btree (done);


--
-- Name: sync_task_done_2e421f56d3d7d232_idx; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX sync_task_done_2e421f56d3d7d232_idx ON sync_task USING btree (done, date);


--
-- Name: sync_update_5fc73231; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX sync_update_5fc73231 ON sync_update USING btree (date);


--
-- Name: sync_update_id_3ed04ad8e20ed372_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX sync_update_id_3ed04ad8e20ed372_like ON sync_update USING btree (id varchar_pattern_ops);


--
-- Name: themes_theme_2401be38; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX themes_theme_2401be38 ON themes_theme USING btree (first_update_id);


--
-- Name: themes_theme_6cac0549; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX themes_theme_6cac0549 ON themes_theme USING btree (last_update_id);


--
-- Name: themes_theme_first_update_id_6cade5ac1ef1f316_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX themes_theme_first_update_id_6cade5ac1ef1f316_like ON themes_theme USING btree (first_update_id varchar_pattern_ops);


--
-- Name: themes_theme_id_22d9f506b87a1c84_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX themes_theme_id_22d9f506b87a1c84_like ON themes_theme USING btree (id varchar_pattern_ops);


--
-- Name: themes_theme_last_update_id_fa2faee4121590e_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX themes_theme_last_update_id_fa2faee4121590e_like ON themes_theme USING btree (last_update_id varchar_pattern_ops);


--
-- Name: trainings_action_2401be38; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX trainings_action_2401be38 ON trainings_action USING btree (first_update_id);


--
-- Name: trainings_action_6cac0549; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX trainings_action_6cac0549 ON trainings_action USING btree (last_update_id);


--
-- Name: trainings_action_e160a0b9; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX trainings_action_e160a0b9 ON trainings_action USING btree (training_id);


--
-- Name: trainings_action_e8701ad4; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX trainings_action_e8701ad4 ON trainings_action USING btree (user_id);


--
-- Name: trainings_action_first_update_id_86c8c62fcc8ccae_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX trainings_action_first_update_id_86c8c62fcc8ccae_like ON trainings_action USING btree (first_update_id varchar_pattern_ops);


--
-- Name: trainings_action_id_1b3f2e16a772aaa0_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX trainings_action_id_1b3f2e16a772aaa0_like ON trainings_action USING btree (id varchar_pattern_ops);


--
-- Name: trainings_action_last_update_id_78fbe1912348e38a_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX trainings_action_last_update_id_78fbe1912348e38a_like ON trainings_action USING btree (last_update_id varchar_pattern_ops);


--
-- Name: trainings_action_mgroups_0e939a4f; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX trainings_action_mgroups_0e939a4f ON trainings_action_mgroups USING btree (group_id);


--
-- Name: trainings_action_mgroups_909acdf2; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX trainings_action_mgroups_909acdf2 ON trainings_action_mgroups USING btree (action_id);


--
-- Name: trainings_action_mgroups_action_id_66bddc2029cd9f7b_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX trainings_action_mgroups_action_id_66bddc2029cd9f7b_like ON trainings_action_mgroups USING btree (action_id varchar_pattern_ops);


--
-- Name: trainings_action_mgroups_group_id_3b965b3b6c24f3a3_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX trainings_action_mgroups_group_id_3b965b3b6c24f3a3_like ON trainings_action_mgroups USING btree (group_id varchar_pattern_ops);


--
-- Name: trainings_currentsession_7fc8ef54; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX trainings_currentsession_7fc8ef54 ON trainings_currentsession USING btree (session_id);


--
-- Name: trainings_training_0e83bf95; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX trainings_training_0e83bf95 ON trainings_training USING btree (job_profile_id);


--
-- Name: trainings_training_2401be38; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX trainings_training_2401be38 ON trainings_training USING btree (first_update_id);


--
-- Name: trainings_training_5e7b1936; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX trainings_training_5e7b1936 ON trainings_training USING btree (owner_id);


--
-- Name: trainings_training_657593fa; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX trainings_training_657593fa ON trainings_training USING btree (original_version_id);


--
-- Name: trainings_training_6cac0549; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX trainings_training_6cac0549 ON trainings_training USING btree (last_update_id);


--
-- Name: trainings_training_6db76173; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX trainings_training_6db76173 ON trainings_training USING btree (default_group_set_id);


--
-- Name: trainings_training_a9fd70f9; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX trainings_training_a9fd70f9 ON trainings_training USING btree (theme_id);


--
-- Name: trainings_training_ca88a2a2; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX trainings_training_ca88a2a2 ON trainings_training USING btree (parent_version_id);


--
-- Name: trainings_training_default_group_set_id_7e8b0bc5b03cf4_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX trainings_training_default_group_set_id_7e8b0bc5b03cf4_like ON trainings_training USING btree (default_group_set_id varchar_pattern_ops);


--
-- Name: trainings_training_e687153b; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX trainings_training_e687153b ON trainings_training USING btree (version_state);


--
-- Name: trainings_training_f6f7f63d; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX trainings_training_f6f7f63d ON trainings_training USING btree (business_unit_id);


--
-- Name: trainings_training_first_update_id_75d8e7dd386e2056_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX trainings_training_first_update_id_75d8e7dd386e2056_like ON trainings_training USING btree (first_update_id varchar_pattern_ops);


--
-- Name: trainings_training_id_30add0e5c80604bc_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX trainings_training_id_30add0e5c80604bc_like ON trainings_training USING btree (id varchar_pattern_ops);


--
-- Name: trainings_training_last_update_id_43f34cc9f2afb7ce_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX trainings_training_last_update_id_43f34cc9f2afb7ce_like ON trainings_training USING btree (last_update_id varchar_pattern_ops);


--
-- Name: trainings_training_theme_id_5938ba9fbbe567a2_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX trainings_training_theme_id_5938ba9fbbe567a2_like ON trainings_training USING btree (theme_id varchar_pattern_ops);


--
-- Name: trainings_trainingact_original_version_id_6310492237f73e65_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX trainings_trainingact_original_version_id_6310492237f73e65_like ON trainings_trainingactivity USING btree (original_version_id varchar_pattern_ops);


--
-- Name: trainings_trainingactiv_parent_version_id_1b67b45006b877b9_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX trainings_trainingactiv_parent_version_id_1b67b45006b877b9_like ON trainings_trainingactivity USING btree (parent_version_id varchar_pattern_ops);


--
-- Name: trainings_trainingactivity_2401be38; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX trainings_trainingactivity_2401be38 ON trainings_trainingactivity USING btree (first_update_id);


--
-- Name: trainings_trainingactivity_657593fa; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX trainings_trainingactivity_657593fa ON trainings_trainingactivity USING btree (original_version_id);


--
-- Name: trainings_trainingactivity_6cac0549; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX trainings_trainingactivity_6cac0549 ON trainings_trainingactivity USING btree (last_update_id);


--
-- Name: trainings_trainingactivity_a73f1f77; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX trainings_trainingactivity_a73f1f77 ON trainings_trainingactivity USING btree (sort_order);


--
-- Name: trainings_trainingactivity_ca88a2a2; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX trainings_trainingactivity_ca88a2a2 ON trainings_trainingactivity USING btree (parent_version_id);


--
-- Name: trainings_trainingactivity_d3e32c49; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX trainings_trainingactivity_d3e32c49 ON trainings_trainingactivity USING btree (polymorphic_ctype_id);


--
-- Name: trainings_trainingactivity_e160a0b9; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX trainings_trainingactivity_e160a0b9 ON trainings_trainingactivity USING btree (training_id);


--
-- Name: trainings_trainingactivity_first_update_id_99f1d85b91c0abc_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX trainings_trainingactivity_first_update_id_99f1d85b91c0abc_like ON trainings_trainingactivity USING btree (first_update_id varchar_pattern_ops);


--
-- Name: trainings_trainingactivity_id_169a2255456f07e2_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX trainings_trainingactivity_id_169a2255456f07e2_like ON trainings_trainingactivity USING btree (id varchar_pattern_ops);


--
-- Name: trainings_trainingactivity_last_update_id_414738e97b8efef8_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX trainings_trainingactivity_last_update_id_414738e97b8efef8_like ON trainings_trainingactivity USING btree (last_update_id varchar_pattern_ops);


--
-- Name: trainings_trainingactivity_training_id_142df6da2e4afd28_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX trainings_trainingactivity_training_id_142df6da2e4afd28_like ON trainings_trainingactivity USING btree (training_id varchar_pattern_ops);


--
-- Name: trainings_trainingcli_original_version_id_42547752ddb2d566_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX trainings_trainingcli_original_version_id_42547752ddb2d566_like ON trainings_trainingclientoptions USING btree (original_version_id varchar_pattern_ops);


--
-- Name: trainings_trainingclien_parent_version_id_740e9ebb1d3f863c_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX trainings_trainingclien_parent_version_id_740e9ebb1d3f863c_like ON trainings_trainingclientoptions USING btree (parent_version_id varchar_pattern_ops);


--
-- Name: trainings_trainingcliento_first_update_id_44b278d7830d81ff_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX trainings_trainingcliento_first_update_id_44b278d7830d81ff_like ON trainings_trainingclientoptions USING btree (first_update_id varchar_pattern_ops);


--
-- Name: trainings_trainingclientop_last_update_id_411a997437d775c3_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX trainings_trainingclientop_last_update_id_411a997437d775c3_like ON trainings_trainingclientoptions USING btree (last_update_id varchar_pattern_ops);


--
-- Name: trainings_trainingclientoptio_training_id_462c6947f0833793_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX trainings_trainingclientoptio_training_id_462c6947f0833793_like ON trainings_trainingclientoptions USING btree (training_id varchar_pattern_ops);


--
-- Name: trainings_trainingclientoptions_2401be38; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX trainings_trainingclientoptions_2401be38 ON trainings_trainingclientoptions USING btree (first_update_id);


--
-- Name: trainings_trainingclientoptions_657593fa; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX trainings_trainingclientoptions_657593fa ON trainings_trainingclientoptions USING btree (original_version_id);


--
-- Name: trainings_trainingclientoptions_6cac0549; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX trainings_trainingclientoptions_6cac0549 ON trainings_trainingclientoptions USING btree (last_update_id);


--
-- Name: trainings_trainingclientoptions_ca88a2a2; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX trainings_trainingclientoptions_ca88a2a2 ON trainings_trainingclientoptions USING btree (parent_version_id);


--
-- Name: trainings_trainingclientoptions_id_7bfef6600650c0b3_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX trainings_trainingclientoptions_id_7bfef6600650c0b3_like ON trainings_trainingclientoptions USING btree (id varchar_pattern_ops);


--
-- Name: trainings_trainingsess_trainingsession_id_117afb6b7eb94557_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX trainings_trainingsess_trainingsession_id_117afb6b7eb94557_like ON trainings_trainingsession_users USING btree (trainingsession_id varchar_pattern_ops);


--
-- Name: trainings_trainingsession_2401be38; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX trainings_trainingsession_2401be38 ON trainings_trainingsession USING btree (first_update_id);


--
-- Name: trainings_trainingsession_41275a53; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX trainings_trainingsession_41275a53 ON trainings_trainingsession USING btree (permissions);


--
-- Name: trainings_trainingsession_5fc73231; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX trainings_trainingsession_5fc73231 ON trainings_trainingsession USING btree (start_date);


--
-- Name: trainings_trainingsession_68153311; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX trainings_trainingsession_68153311 ON trainings_trainingsession USING btree (trainer_id);


--
-- Name: trainings_trainingsession_6cac0549; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX trainings_trainingsession_6cac0549 ON trainings_trainingsession USING btree (last_update_id);


--
-- Name: trainings_trainingsession_9ed39e2e; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX trainings_trainingsession_9ed39e2e ON trainings_trainingsession USING btree (state);


--
-- Name: trainings_trainingsession_e160a0b9; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX trainings_trainingsession_e160a0b9 ON trainings_trainingsession USING btree (training_id);


--
-- Name: trainings_trainingsession_first_update_id_660853f81d13cd96_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX trainings_trainingsession_first_update_id_660853f81d13cd96_like ON trainings_trainingsession USING btree (first_update_id varchar_pattern_ops);


--
-- Name: trainings_trainingsession_id_505d31be5e98a5fc_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX trainings_trainingsession_id_505d31be5e98a5fc_like ON trainings_trainingsession USING btree (id varchar_pattern_ops);


--
-- Name: trainings_trainingsession_last_update_id_78409f2d3053338e_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX trainings_trainingsession_last_update_id_78409f2d3053338e_like ON trainings_trainingsession USING btree (last_update_id varchar_pattern_ops);


--
-- Name: trainings_trainingsession_permissions_6a0045be66ae97d_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX trainings_trainingsession_permissions_6a0045be66ae97d_like ON trainings_trainingsession USING btree (permissions varchar_pattern_ops);


--
-- Name: trainings_trainingsession_state_62cd9f262c4be9b9_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX trainings_trainingsession_state_62cd9f262c4be9b9_like ON trainings_trainingsession USING btree (state varchar_pattern_ops);


--
-- Name: trainings_trainingsession_trainer_id_5dcea450bc8fcbeb_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX trainings_trainingsession_trainer_id_5dcea450bc8fcbeb_like ON trainings_trainingsession USING btree (trainer_id varchar_pattern_ops);


--
-- Name: trainings_trainingsession_training_id_6550006a7e8f9e42_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX trainings_trainingsession_training_id_6550006a7e8f9e42_like ON trainings_trainingsession USING btree (training_id varchar_pattern_ops);


--
-- Name: trainings_trainingsession_user_mtpuser_id_30646c292c4be213_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX trainings_trainingsession_user_mtpuser_id_30646c292c4be213_like ON trainings_trainingsession_users USING btree (mtpuser_id varchar_pattern_ops);


--
-- Name: trainings_trainingsession_users_31d3aa5c; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX trainings_trainingsession_users_31d3aa5c ON trainings_trainingsession_users USING btree (trainingsession_id);


--
-- Name: trainings_trainingsession_users_ae3d8976; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX trainings_trainingsession_users_ae3d8976 ON trainings_trainingsession_users USING btree (mtpuser_id);


--
-- Name: translation_translatablel_first_update_id_5969daa058b43626_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX translation_translatablel_first_update_id_5969daa058b43626_like ON translation_translatablelanguage USING btree (first_update_id varchar_pattern_ops);


--
-- Name: translation_translatablela_last_update_id_44a0925b99e14d9e_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX translation_translatablela_last_update_id_44a0925b99e14d9e_like ON translation_translatablelanguage USING btree (last_update_id varchar_pattern_ops);


--
-- Name: translation_translatablelanguage_2401be38; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX translation_translatablelanguage_2401be38 ON translation_translatablelanguage USING btree (first_update_id);


--
-- Name: translation_translatablelanguage_6cac0549; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX translation_translatablelanguage_6cac0549 ON translation_translatablelanguage USING btree (last_update_id);


--
-- Name: translation_translatablelanguage_id_37d62957f44cb28c_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX translation_translatablelanguage_id_37d62957f44cb28c_like ON translation_translatablelanguage USING btree (id varchar_pattern_ops);


--
-- Name: translation_translatablelanguage_language_5739fdc22acc2177_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX translation_translatablelanguage_language_5739fdc22acc2177_like ON translation_translatablelanguage USING btree (language varchar_pattern_ops);


--
-- Name: translation_translation_2401be38; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX translation_translation_2401be38 ON translation_translation USING btree (first_update_id);


--
-- Name: translation_translation_6cac0549; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX translation_translation_6cac0549 ON translation_translation USING btree (last_update_id);


--
-- Name: translation_translation_first_update_id_43d19c0a336be3b0_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX translation_translation_first_update_id_43d19c0a336be3b0_like ON translation_translation USING btree (first_update_id varchar_pattern_ops);


--
-- Name: translation_translation_id_181601f557b3ba42_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX translation_translation_id_181601f557b3ba42_like ON translation_translation USING btree (id varchar_pattern_ops);


--
-- Name: translation_translation_last_update_id_29595a128c672fd4_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX translation_translation_last_update_id_29595a128c672fd4_like ON translation_translation USING btree (last_update_id varchar_pattern_ops);


--
-- Name: waffle_flag_e2fa5388; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX waffle_flag_e2fa5388 ON waffle_flag USING btree (created);


--
-- Name: waffle_flag_groups_0e939a4f; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX waffle_flag_groups_0e939a4f ON waffle_flag_groups USING btree (group_id);


--
-- Name: waffle_flag_groups_6b31b6fd; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX waffle_flag_groups_6b31b6fd ON waffle_flag_groups USING btree (flag_id);


--
-- Name: waffle_flag_name_177afea7b25feac4_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX waffle_flag_name_177afea7b25feac4_like ON waffle_flag USING btree (name varchar_pattern_ops);


--
-- Name: waffle_flag_users_6b31b6fd; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX waffle_flag_users_6b31b6fd ON waffle_flag_users USING btree (flag_id);


--
-- Name: waffle_flag_users_ae3d8976; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX waffle_flag_users_ae3d8976 ON waffle_flag_users USING btree (mtpuser_id);


--
-- Name: waffle_flag_users_mtpuser_id_4a3f741e2a5aa516_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX waffle_flag_users_mtpuser_id_4a3f741e2a5aa516_like ON waffle_flag_users USING btree (mtpuser_id varchar_pattern_ops);


--
-- Name: waffle_sample_e2fa5388; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX waffle_sample_e2fa5388 ON waffle_sample USING btree (created);


--
-- Name: waffle_sample_name_52614fa4d7866167_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX waffle_sample_name_52614fa4d7866167_like ON waffle_sample USING btree (name varchar_pattern_ops);


--
-- Name: waffle_switch_e2fa5388; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX waffle_switch_e2fa5388 ON waffle_switch USING btree (created);


--
-- Name: waffle_switch_name_2dd981224ad20ebe_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX waffle_switch_name_2dd981224ad20ebe_like ON waffle_switch USING btree (name varchar_pattern_ops);


--
-- Name: workshops_worksho_workshopstepquestion_id_2464399d252a5812_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX workshops_worksho_workshopstepquestion_id_2464399d252a5812_like ON workshops_workshopstepquestion_dimensions USING btree (workshopstepquestion_id varchar_pattern_ops);


--
-- Name: workshops_workshopste_training_session_id_576face1d59c7d22_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX workshops_workshopste_training_session_id_576face1d59c7d22_like ON workshops_workshopstepquestionuseranswer USING btree (training_session_id varchar_pattern_ops);


--
-- Name: workshops_workshopste_workshopstep_ptr_id_4c3faa2666064b0f_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX workshops_workshopste_workshopstep_ptr_id_4c3faa2666064b0f_like ON workshops_workshopstepquestion USING btree (workshopstep_ptr_id varchar_pattern_ops);


--
-- Name: workshops_workshopste_workshopstep_ptr_id_5dae05b793f3a143_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX workshops_workshopste_workshopstep_ptr_id_5dae05b793f3a143_like ON workshops_workshopstepimage USING btree (workshopstep_ptr_id varchar_pattern_ops);


--
-- Name: workshops_workshopstep_2401be38; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX workshops_workshopstep_2401be38 ON workshops_workshopstep USING btree (first_update_id);


--
-- Name: workshops_workshopstep_657593fa; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX workshops_workshopstep_657593fa ON workshops_workshopstep USING btree (original_version_id);


--
-- Name: workshops_workshopstep_6cac0549; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX workshops_workshopstep_6cac0549 ON workshops_workshopstep USING btree (last_update_id);


--
-- Name: workshops_workshopstep_a73f1f77; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX workshops_workshopstep_a73f1f77 ON workshops_workshopstep USING btree (sort_order);


--
-- Name: workshops_workshopstep_ca88a2a2; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX workshops_workshopstep_ca88a2a2 ON workshops_workshopstep USING btree (parent_version_id);


--
-- Name: workshops_workshopstep_d3e32c49; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX workshops_workshopstep_d3e32c49 ON workshops_workshopstep USING btree (polymorphic_ctype_id);


--
-- Name: workshops_workshopstep_ebd75ffe; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX workshops_workshopstep_ebd75ffe ON workshops_workshopstep USING btree (workshop_id);


--
-- Name: workshops_workshopstep_id_56785bce98de2a30_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX workshops_workshopstep_id_56785bce98de2a30_like ON workshops_workshopstep USING btree (id varchar_pattern_ops);


--
-- Name: workshops_workshopstep_original_version_id_9e635abb2be421e_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX workshops_workshopstep_original_version_id_9e635abb2be421e_like ON workshops_workshopstepquestionanswer USING btree (original_version_id varchar_pattern_ops);


--
-- Name: workshops_workshopstepq_parent_version_id_4c24a8a4d69d6cac_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX workshops_workshopstepq_parent_version_id_4c24a8a4d69d6cac_like ON workshops_workshopstepquestionanswer USING btree (parent_version_id varchar_pattern_ops);


--
-- Name: workshops_workshopstepque_first_update_id_47aa3ef4e70d0657_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX workshops_workshopstepque_first_update_id_47aa3ef4e70d0657_like ON workshops_workshopstepquestionanswer USING btree (first_update_id varchar_pattern_ops);


--
-- Name: workshops_workshopstepques_first_update_id_51458d8f97b964d_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX workshops_workshopstepques_first_update_id_51458d8f97b964d_like ON workshops_workshopstepquestionuseranswer USING btree (first_update_id varchar_pattern_ops);


--
-- Name: workshops_workshopstepques_last_update_id_19424f4986e88671_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX workshops_workshopstepques_last_update_id_19424f4986e88671_like ON workshops_workshopstepquestionuseranswer USING btree (last_update_id varchar_pattern_ops);


--
-- Name: workshops_workshopstepques_last_update_id_4bd2a84fbc07227b_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX workshops_workshopstepques_last_update_id_4bd2a84fbc07227b_like ON workshops_workshopstepquestionanswer USING btree (last_update_id varchar_pattern_ops);


--
-- Name: workshops_workshopstepquesti_dimension_id_77db8c97dd0ccdd5_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX workshops_workshopstepquesti_dimension_id_77db8c97dd0ccdd5_like ON workshops_workshopstepquestion_dimensions USING btree (dimension_id varchar_pattern_ops);


--
-- Name: workshops_workshopstepquestio_question_id_6191657b1a6e2354_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX workshops_workshopstepquestio_question_id_6191657b1a6e2354_like ON workshops_workshopstepquestionuseranswer USING btree (question_id varchar_pattern_ops);


--
-- Name: workshops_workshopstepquestio_question_id_6927f93f8dfc9c98_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX workshops_workshopstepquestio_question_id_6927f93f8dfc9c98_like ON workshops_workshopstepquestionanswer USING btree (question_id varchar_pattern_ops);


--
-- Name: workshops_workshopstepquestio_training_id_4a36c30d5c7a80b6_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX workshops_workshopstepquestio_training_id_4a36c30d5c7a80b6_like ON workshops_workshopstepquestion USING btree (training_id varchar_pattern_ops);


--
-- Name: workshops_workshopstepquestion_b6159b48; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX workshops_workshopstepquestion_b6159b48 ON workshops_workshopstepquestion USING btree (activity_type_id);


--
-- Name: workshops_workshopstepquestion_dimensions_b46ef2c7; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX workshops_workshopstepquestion_dimensions_b46ef2c7 ON workshops_workshopstepquestion_dimensions USING btree (dimension_id);


--
-- Name: workshops_workshopstepquestion_dimensions_f7ca8589; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX workshops_workshopstepquestion_dimensions_f7ca8589 ON workshops_workshopstepquestion_dimensions USING btree (workshopstepquestion_id);


--
-- Name: workshops_workshopstepquestion_e160a0b9; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX workshops_workshopstepquestion_e160a0b9 ON workshops_workshopstepquestion USING btree (training_id);


--
-- Name: workshops_workshopstepquestionanswer_2401be38; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX workshops_workshopstepquestionanswer_2401be38 ON workshops_workshopstepquestionanswer USING btree (first_update_id);


--
-- Name: workshops_workshopstepquestionanswer_657593fa; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX workshops_workshopstepquestionanswer_657593fa ON workshops_workshopstepquestionanswer USING btree (original_version_id);


--
-- Name: workshops_workshopstepquestionanswer_6cac0549; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX workshops_workshopstepquestionanswer_6cac0549 ON workshops_workshopstepquestionanswer USING btree (last_update_id);


--
-- Name: workshops_workshopstepquestionanswer_7aa0f6ee; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX workshops_workshopstepquestionanswer_7aa0f6ee ON workshops_workshopstepquestionanswer USING btree (question_id);


--
-- Name: workshops_workshopstepquestionanswer_a73f1f77; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX workshops_workshopstepquestionanswer_a73f1f77 ON workshops_workshopstepquestionanswer USING btree (sort_order);


--
-- Name: workshops_workshopstepquestionanswer_ca88a2a2; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX workshops_workshopstepquestionanswer_ca88a2a2 ON workshops_workshopstepquestionanswer USING btree (parent_version_id);


--
-- Name: workshops_workshopstepquestionanswer_id_59828acd02e26865_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX workshops_workshopstepquestionanswer_id_59828acd02e26865_like ON workshops_workshopstepquestionanswer USING btree (id varchar_pattern_ops);


--
-- Name: workshops_workshopstepquestionu_answer_id_406b4a15657374ab_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX workshops_workshopstepquestionu_answer_id_406b4a15657374ab_like ON workshops_workshopstepquestionuseranswer USING btree (answer_id varchar_pattern_ops);


--
-- Name: workshops_workshopstepquestionuse_user_id_76a41909473f2f67_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX workshops_workshopstepquestionuse_user_id_76a41909473f2f67_like ON workshops_workshopstepquestionuseranswer USING btree (user_id varchar_pattern_ops);


--
-- Name: workshops_workshopstepquestionuseransw_id_2598927b3f5559e7_like; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX workshops_workshopstepquestionuseransw_id_2598927b3f5559e7_like ON workshops_workshopstepquestionuseranswer USING btree (id varchar_pattern_ops);


--
-- Name: workshops_workshopstepquestionuseranswer_2401be38; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX workshops_workshopstepquestionuseranswer_2401be38 ON workshops_workshopstepquestionuseranswer USING btree (first_update_id);


--
-- Name: workshops_workshopstepquestionuseranswer_57c1a063; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX workshops_workshopstepquestionuseranswer_57c1a063 ON workshops_workshopstepquestionuseranswer USING btree (training_session_id);


--
-- Name: workshops_workshopstepquestionuseranswer_6cac0549; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX workshops_workshopstepquestionuseranswer_6cac0549 ON workshops_workshopstepquestionuseranswer USING btree (last_update_id);


--
-- Name: workshops_workshopstepquestionuseranswer_7aa0f6ee; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX workshops_workshopstepquestionuseranswer_7aa0f6ee ON workshops_workshopstepquestionuseranswer USING btree (question_id);


--
-- Name: workshops_workshopstepquestionuseranswer_e8701ad4; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX workshops_workshopstepquestionuseranswer_e8701ad4 ON workshops_workshopstepquestionuseranswer USING btree (user_id);


--
-- Name: workshops_workshopstepquestionuseranswer_fb12e902; Type: INDEX; Schema: public; Owner: magency
--

CREATE INDEX workshops_workshopstepquestionuseranswer_fb12e902 ON workshops_workshopstepquestionuseranswer USING btree (answer_id);


--
-- Name: D006b55978a3e34621df0aa4d4967840; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY oauth2_provider_grant
    ADD CONSTRAINT "D006b55978a3e34621df0aa4d4967840" FOREIGN KEY (application_id) REFERENCES oauth2_provider_application(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: D02edd8661518ce3819bcedb005cd0b8; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_lessonrecommendationthreshold
    ADD CONSTRAINT "D02edd8661518ce3819bcedb005cd0b8" FOREIGN KEY (level_id) REFERENCES assessments_recommendationlevel(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: D15bcf01c654e6ab78e1e764806aa1db; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY workshops_workshopstepquestionuseranswer
    ADD CONSTRAINT "D15bcf01c654e6ab78e1e764806aa1db" FOREIGN KEY (training_session_id) REFERENCES trainings_trainingsession(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: D1bb1ac5de7ccbbe3a562f19ee1cf112; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY oauth2_provider_accesstoken
    ADD CONSTRAINT "D1bb1ac5de7ccbbe3a562f19ee1cf112" FOREIGN KEY (application_id) REFERENCES oauth2_provider_application(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: D22ed7a77a2cdfb8869e51303dcf4251; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY evaluations_exercise
    ADD CONSTRAINT "D22ed7a77a2cdfb8869e51303dcf4251" FOREIGN KEY (original_version_id) REFERENCES evaluations_exercise(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: D29df846c3a1ff78ee8441cad4d5bfc0; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY metaplans_metaplantemplate
    ADD CONSTRAINT "D29df846c3a1ff78ee8441cad4d5bfc0" FOREIGN KEY (trainingactivity_ptr_id) REFERENCES trainings_trainingactivity(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: D2cfea3fc9e551dc8ba63837fc86f3c6; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY workshops_workshop
    ADD CONSTRAINT "D2cfea3fc9e551dc8ba63837fc86f3c6" FOREIGN KEY (trainingactivity_ptr_id) REFERENCES trainings_trainingactivity(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: D2fab586d97e27f0b26171446a02cd8e; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_certificationprogramuserstatus
    ADD CONSTRAINT "D2fab586d97e27f0b26171446a02cd8e" FOREIGN KEY (program_id) REFERENCES assessments_certificationprogram(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: D32ff506e030d44c294b9e53407d7458; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY workshops_workshopstepimage
    ADD CONSTRAINT "D32ff506e030d44c294b9e53407d7458" FOREIGN KEY (workshopstep_ptr_id) REFERENCES workshops_workshopstep(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: D3564507fcbb1046c518817fd9d015a8; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY trainings_trainingactivity
    ADD CONSTRAINT "D3564507fcbb1046c518817fd9d015a8" FOREIGN KEY (polymorphic_ctype_id) REFERENCES django_content_type(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: D356720d8168dfb561ffef09c72ce9b1; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY roleplays_rating
    ADD CONSTRAINT "D356720d8168dfb561ffef09c72ce9b1" FOREIGN KEY (training_session_id) REFERENCES trainings_trainingsession(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: D3af35d77e9b41bbd8f6dba715eed3c4; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY brainstormers_brainstormer
    ADD CONSTRAINT "D3af35d77e9b41bbd8f6dba715eed3c4" FOREIGN KEY (activity_id) REFERENCES brainstormers_brainstormeractivity(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: D3b46318852cffd89a4cb8444eeea569; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY workshops_workshopstepquestionanswer
    ADD CONSTRAINT "D3b46318852cffd89a4cb8444eeea569" FOREIGN KEY (original_version_id) REFERENCES workshops_workshopstepquestionanswer(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: D426b3691896d773baafe043628346ec; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY evaluations_criterion
    ADD CONSTRAINT "D426b3691896d773baafe043628346ec" FOREIGN KEY (original_version_id) REFERENCES evaluations_criterion(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: D4466fda5541cc78618e6bee6a82c7a5; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY trainings_trainingclientoptions
    ADD CONSTRAINT "D4466fda5541cc78618e6bee6a82c7a5" FOREIGN KEY (original_version_id) REFERENCES trainings_trainingclientoptions(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: D4aa1408fd8e51d860f4bc75442a08ab; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY workshops_workshopstepquestionanswer
    ADD CONSTRAINT "D4aa1408fd8e51d860f4bc75442a08ab" FOREIGN KEY (question_id) REFERENCES workshops_workshopstepquestion(workshopstep_ptr_id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: D520a865331109840b9679cea8e8c637; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_competencytree
    ADD CONSTRAINT "D520a865331109840b9679cea8e8c637" FOREIGN KEY (parent_version_id) REFERENCES assessments_competencytree(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: D559dfb3af788f6a1f0f45bfa73bbda9; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY workshops_workshopstep
    ADD CONSTRAINT "D559dfb3af788f6a1f0f45bfa73bbda9" FOREIGN KEY (parent_version_id) REFERENCES workshops_workshopstep(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: D658e1fc80f2206e1247b49ec33ca320; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY brainstormers_brainstormerpropositiongroup
    ADD CONSTRAINT "D658e1fc80f2206e1247b49ec33ca320" FOREIGN KEY (brainstormer_id) REFERENCES brainstormers_brainstormer(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: D69171f510da4a09b4adf4ce4b178861; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY evaluations_evaluation
    ADD CONSTRAINT "D69171f510da4a09b4adf4ce4b178861" FOREIGN KEY (trainingactivity_ptr_id) REFERENCES trainings_trainingactivity(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: D6a1c49f153438f32c61077c29bb48c1; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_assessableactivitypartuserscore
    ADD CONSTRAINT "D6a1c49f153438f32c61077c29bb48c1" FOREIGN KEY (activity_part_type_id) REFERENCES django_content_type(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: D6a1eec28d9526a8aaf68b967dbf1ff0; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY trainings_trainingsession_users
    ADD CONSTRAINT "D6a1eec28d9526a8aaf68b967dbf1ff0" FOREIGN KEY (trainingsession_id) REFERENCES trainings_trainingsession(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: D6b04c53822e545e680e79e4a90aa391; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_competencytree
    ADD CONSTRAINT "D6b04c53822e545e680e79e4a90aa391" FOREIGN KEY (original_version_id) REFERENCES assessments_competencytree(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: D77b314ed4ebb2d31297dfcf6170b920; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY oauth2_provider_refreshtoken
    ADD CONSTRAINT "D77b314ed4ebb2d31297dfcf6170b920" FOREIGN KEY (application_id) REFERENCES oauth2_provider_application(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: D82b161c420762df768de2603a462948; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY workshops_workshopstep
    ADD CONSTRAINT "D82b161c420762df768de2603a462948" FOREIGN KEY (polymorphic_ctype_id) REFERENCES django_content_type(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: D84659715169b11a808236c0635c54be; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY brainstormers_brainstormerproposition
    ADD CONSTRAINT "D84659715169b11a808236c0635c54be" FOREIGN KEY (group_id) REFERENCES brainstormers_brainstormerpropositiongroup(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: D85bca9efc6b5c58eabc4f0d391d5ec0; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_userlessonrecommendation
    ADD CONSTRAINT "D85bca9efc6b5c58eabc4f0d391d5ec0" FOREIGN KEY (level_id) REFERENCES assessments_recommendationlevel(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: D8954bd786c77ff0663342bd1a66a5a8; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY surveys_answer
    ADD CONSTRAINT "D8954bd786c77ff0663342bd1a66a5a8" FOREIGN KEY (training_session_id) REFERENCES trainings_trainingsession(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: D91b00dae35696e47a60f9500a20334a; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_dimension
    ADD CONSTRAINT "D91b00dae35696e47a60f9500a20334a" FOREIGN KEY (original_version_id) REFERENCES assessments_dimension(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: a1f6dcd3325a6a6c91fa3a2b6218b147; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY documents_document
    ADD CONSTRAINT a1f6dcd3325a6a6c91fa3a2b6218b147 FOREIGN KEY (trainingactivity_ptr_id) REFERENCES trainings_trainingactivity(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: a227205b2fe15ef575567501dca096dc; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY documents_backgroundexecution_mgroups
    ADD CONSTRAINT a227205b2fe15ef575567501dca096dc FOREIGN KEY (backgroundexecution_id) REFERENCES documents_backgroundexecution(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: a2c229db4094c1dffecd3157bd86ee61; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY roleplays_roleplay
    ADD CONSTRAINT a2c229db4094c1dffecd3157bd86ee61 FOREIGN KEY (trainingactivity_ptr_id) REFERENCES trainings_trainingactivity(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: a8e21e925eff42c93e2e90194ae92fee; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY trainings_trainingactivity
    ADD CONSTRAINT a8e21e925eff42c93e2e90194ae92fee FOREIGN KEY (parent_version_id) REFERENCES trainings_trainingactivity(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: accounts_ava_first_update_id_475d789678f14ad0_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY accounts_avatar
    ADD CONSTRAINT accounts_ava_first_update_id_475d789678f14ad0_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: accounts_avat_last_update_id_1e9eb2656ef161ac_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY accounts_avatar
    ADD CONSTRAINT accounts_avat_last_update_id_1e9eb2656ef161ac_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: accounts_g_groupset_id_4167d4fa136221d1_fk_accounts_groupset_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY accounts_groupset_mgroups
    ADD CONSTRAINT accounts_g_groupset_id_4167d4fa136221d1_fk_accounts_groupset_id FOREIGN KEY (groupset_id) REFERENCES accounts_groupset(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: accounts_gro_first_update_id_113eaaa3a8dbba91_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY accounts_grouptype
    ADD CONSTRAINT accounts_gro_first_update_id_113eaaa3a8dbba91_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: accounts_gro_first_update_id_1462a4bba4591576_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY accounts_group
    ADD CONSTRAINT accounts_gro_first_update_id_1462a4bba4591576_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: accounts_gro_first_update_id_283d7bd122cbb5e6_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY accounts_grouprole
    ADD CONSTRAINT accounts_gro_first_update_id_283d7bd122cbb5e6_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: accounts_gro_first_update_id_397b548bd1cd2bd0_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY accounts_groupset
    ADD CONSTRAINT accounts_gro_first_update_id_397b548bd1cd2bd0_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: accounts_grou_last_update_id_1134f43e21067ab5_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY accounts_grouptype
    ADD CONSTRAINT accounts_grou_last_update_id_1134f43e21067ab5_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: accounts_grou_last_update_id_33d30c646fb3ffae_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY accounts_group
    ADD CONSTRAINT accounts_grou_last_update_id_33d30c646fb3ffae_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: accounts_grou_last_update_id_532196df8d6a55de_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY accounts_grouprole
    ADD CONSTRAINT accounts_grou_last_update_id_532196df8d6a55de_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: accounts_grou_last_update_id_63ebf6478bff7954_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY accounts_groupset
    ADD CONSTRAINT accounts_grou_last_update_id_63ebf6478bff7954_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: accounts_grou_type_id_637eb199b3396ce3_fk_accounts_grouptype_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY accounts_group
    ADD CONSTRAINT accounts_grou_type_id_637eb199b3396ce3_fk_accounts_grouptype_id FOREIGN KEY (type_id) REFERENCES accounts_grouptype(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: accounts_group_parent_id_77b08ea426f8a5e9_fk_accounts_group_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY accounts_group
    ADD CONSTRAINT accounts_group_parent_id_77b08ea426f8a5e9_fk_accounts_group_id FOREIGN KEY (parent_id) REFERENCES accounts_group(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: accounts_groupr_user_id_64b19885e3949c66_fk_accounts_mtpuser_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY accounts_grouprole
    ADD CONSTRAINT accounts_groupr_user_id_64b19885e3949c66_fk_accounts_mtpuser_id FOREIGN KEY (user_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: accounts_groupro_group_id_43bebe5d8528e65e_fk_accounts_group_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY accounts_grouprole
    ADD CONSTRAINT accounts_groupro_group_id_43bebe5d8528e65e_fk_accounts_group_id FOREIGN KEY (group_id) REFERENCES accounts_group(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: accounts_groupse_group_id_223775c477a47aa0_fk_accounts_group_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY accounts_groupset_mgroups
    ADD CONSTRAINT accounts_groupse_group_id_223775c477a47aa0_fk_accounts_group_id FOREIGN KEY (group_id) REFERENCES accounts_group(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: accounts_m_permission_id_2cd8a02f7d6d8118_fk_auth_permission_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY accounts_mtpuser_user_permissions
    ADD CONSTRAINT accounts_m_permission_id_2cd8a02f7d6d8118_fk_auth_permission_id FOREIGN KEY (permission_id) REFERENCES auth_permission(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: accounts_mtp_first_update_id_5d67906303dbb1b1_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY accounts_mtpuser
    ADD CONSTRAINT accounts_mtp_first_update_id_5d67906303dbb1b1_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: accounts_mtp_mtpuser_id_2c379b1954dfacb3_fk_accounts_mtpuser_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY accounts_mtpuser_photos
    ADD CONSTRAINT accounts_mtp_mtpuser_id_2c379b1954dfacb3_fk_accounts_mtpuser_id FOREIGN KEY (mtpuser_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: accounts_mtp_mtpuser_id_2f8eeb555b35a6d9_fk_accounts_mtpuser_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY accounts_mtpuser_user_permissions
    ADD CONSTRAINT accounts_mtp_mtpuser_id_2f8eeb555b35a6d9_fk_accounts_mtpuser_id FOREIGN KEY (mtpuser_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: accounts_mtp_mtpuser_id_5d333f33c7f966f1_fk_accounts_mtpuser_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY accounts_mtpuser_groups
    ADD CONSTRAINT accounts_mtp_mtpuser_id_5d333f33c7f966f1_fk_accounts_mtpuser_id FOREIGN KEY (mtpuser_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: accounts_mtpu_last_update_id_7d078e95dd1e322b_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY accounts_mtpuser
    ADD CONSTRAINT accounts_mtpu_last_update_id_7d078e95dd1e322b_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: accounts_mtpus_avatar_id_6a6c8bd7444d5806_fk_accounts_avatar_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY accounts_mtpuser_photos
    ADD CONSTRAINT accounts_mtpus_avatar_id_6a6c8bd7444d5806_fk_accounts_avatar_id FOREIGN KEY (avatar_id) REFERENCES accounts_avatar(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: accounts_mtpuse_photo_id_44e77796a09bd9aa_fk_accounts_avatar_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY accounts_mtpuser
    ADD CONSTRAINT accounts_mtpuse_photo_id_44e77796a09bd9aa_fk_accounts_avatar_id FOREIGN KEY (photo_id) REFERENCES accounts_avatar(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: accounts_mtpuser_gro_group_id_57844c7348b4da7b_fk_auth_group_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY accounts_mtpuser_groups
    ADD CONSTRAINT accounts_mtpuser_gro_group_id_57844c7348b4da7b_fk_auth_group_id FOREIGN KEY (group_id) REFERENCES auth_group(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: ass_activity_type_id_62557d4b7b348345_fk_django_content_type_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_assessableactivityuserscore
    ADD CONSTRAINT ass_activity_type_id_62557d4b7b348345_fk_django_content_type_id FOREIGN KEY (activity_type_id) REFERENCES django_content_type(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: ass_competency_id_42d84c3a274386b1_fk_assessments_competency_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_dimension
    ADD CONSTRAINT ass_competency_id_42d84c3a274386b1_fk_assessments_competency_id FOREIGN KEY (competency_id) REFERENCES assessments_competency(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: ass_competency_id_4641232d9541d05f_fk_assessments_competency_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_certificationcompetencythreshold
    ADD CONSTRAINT ass_competency_id_4641232d9541d05f_fk_assessments_competency_id FOREIGN KEY (competency_id) REFERENCES assessments_competency(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: ass_competency_id_651587d998e7c5bd_fk_assessments_competency_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_competencyuserscore
    ADD CONSTRAINT ass_competency_id_651587d998e7c5bd_fk_assessments_competency_id FOREIGN KEY (competency_id) REFERENCES assessments_competency(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: ass_curriculum_id_23df279821acf7c2_fk_assessments_curriculum_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_curriculum_mgroups
    ADD CONSTRAINT ass_curriculum_id_23df279821acf7c2_fk_assessments_curriculum_id FOREIGN KEY (curriculum_id) REFERENCES assessments_curriculum(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: ass_curriculum_id_647362c9deb76feb_fk_assessments_curriculum_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_topic
    ADD CONSTRAINT ass_curriculum_id_647362c9deb76feb_fk_assessments_curriculum_id FOREIGN KEY (curriculum_id) REFERENCES assessments_curriculum(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: ass_curriculum_id_7a025f64ab510e0e_fk_assessments_curriculum_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_lesson
    ADD CONSTRAINT ass_curriculum_id_7a025f64ab510e0e_fk_assessments_curriculum_id FOREIGN KEY (curriculum_id) REFERENCES assessments_curriculum(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: ass_session_id_1629fb6d55eab0cb_fk_trainings_trainingsession_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_competencytreeuserscore
    ADD CONSTRAINT ass_session_id_1629fb6d55eab0cb_fk_trainings_trainingsession_id FOREIGN KEY (session_id) REFERENCES trainings_trainingsession(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: ass_session_id_1afbece56f4023b7_fk_trainings_trainingsession_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_dimensionuserscore
    ADD CONSTRAINT ass_session_id_1afbece56f4023b7_fk_trainings_trainingsession_id FOREIGN KEY (session_id) REFERENCES trainings_trainingsession(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: ass_session_id_2b59ed896994f513_fk_trainings_trainingsession_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_assessableactivityuserscore
    ADD CONSTRAINT ass_session_id_2b59ed896994f513_fk_trainings_trainingsession_id FOREIGN KEY (session_id) REFERENCES trainings_trainingsession(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: ass_session_id_2ed6f5ee4d79bbcb_fk_trainings_trainingsession_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_assessableactivitypartuserscore
    ADD CONSTRAINT ass_session_id_2ed6f5ee4d79bbcb_fk_trainings_trainingsession_id FOREIGN KEY (session_id) REFERENCES trainings_trainingsession(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: ass_session_id_4c4cd53aef524795_fk_trainings_trainingsession_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_certificationprogramuserstatus
    ADD CONSTRAINT ass_session_id_4c4cd53aef524795_fk_trainings_trainingsession_id FOREIGN KEY (session_id) REFERENCES trainings_trainingsession(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: ass_session_id_6d1bd2924e083122_fk_trainings_trainingsession_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_competencyuserscore
    ADD CONSTRAINT ass_session_id_6d1bd2924e083122_fk_trainings_trainingsession_id FOREIGN KEY (session_id) REFERENCES trainings_trainingsession(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: asse_curriculum_id_676bae033d02557_fk_assessments_curriculum_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_curriculum_active_recommendation_levels
    ADD CONSTRAINT asse_curriculum_id_676bae033d02557_fk_assessments_curriculum_id FOREIGN KEY (curriculum_id) REFERENCES assessments_curriculum(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: asses_dimension_id_531daf025e7cafb7_fk_assessments_dimension_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_lessondimensionweight
    ADD CONSTRAINT asses_dimension_id_531daf025e7cafb7_fk_assessments_dimension_id FOREIGN KEY (dimension_id) REFERENCES assessments_dimension(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: asses_dimension_id_663dd5bb47172425_fk_assessments_dimension_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_dimensiontrainingweight
    ADD CONSTRAINT asses_dimension_id_663dd5bb47172425_fk_assessments_dimension_id FOREIGN KEY (dimension_id) REFERENCES assessments_dimension(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: asses_dimension_id_7ddb30e424a82d02_fk_assessments_dimension_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_dimensionuserscore
    ADD CONSTRAINT asses_dimension_id_7ddb30e424a82d02_fk_assessments_dimension_id FOREIGN KEY (dimension_id) REFERENCES assessments_dimension(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: asses_tree_id_6af5b3166257d4b9_fk_assessments_competencytree_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_certificationprogram
    ADD CONSTRAINT asses_tree_id_6af5b3166257d4b9_fk_assessments_competencytree_id FOREIGN KEY (tree_id) REFERENCES assessments_competencytree(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assess_tree_id_573e17263a3b021_fk_assessments_competencytree_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_competency
    ADD CONSTRAINT assess_tree_id_573e17263a3b021_fk_assessments_competencytree_id FOREIGN KEY (tree_id) REFERENCES assessments_competencytree(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assess_tree_id_5e6f478e72f6021_fk_assessments_competencytree_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_competencytreeuserscore
    ADD CONSTRAINT assess_tree_id_5e6f478e72f6021_fk_assessments_competencytree_id FOREIGN KEY (tree_id) REFERENCES assessments_competencytree(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessme_business_unit_id_685382b9d3084995_fk_accounts_group_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_curriculum
    ADD CONSTRAINT assessme_business_unit_id_685382b9d3084995_fk_accounts_group_id FOREIGN KEY (business_unit_id) REFERENCES accounts_group(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessmen_training_id_7ef66c185a36110c_fk_trainings_training_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_dimensiontrainingweight
    ADD CONSTRAINT assessmen_training_id_7ef66c185a36110c_fk_trainings_training_id FOREIGN KEY (training_id) REFERENCES trainings_training(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessment_job_profile_id_248464967d354411_fk_accounts_group_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_curriculum
    ADD CONSTRAINT assessment_job_profile_id_248464967d354411_fk_accounts_group_id FOREIGN KEY (job_profile_id) REFERENCES accounts_group(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessment_job_profile_id_262a7087ff36bcd0_fk_accounts_group_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_competencytree
    ADD CONSTRAINT assessment_job_profile_id_262a7087ff36bcd0_fk_accounts_group_id FOREIGN KEY (job_profile_id) REFERENCES accounts_group(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments__first_update_id_1f59942004be5c4d_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_assessableactivitypartuserscore
    ADD CONSTRAINT assessments__first_update_id_1f59942004be5c4d_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments__first_update_id_22f89df5afa292d2_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_dimension
    ADD CONSTRAINT assessments__first_update_id_22f89df5afa292d2_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments__first_update_id_260f6c4b41f98148_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_dimensiontrainingweight
    ADD CONSTRAINT assessments__first_update_id_260f6c4b41f98148_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments__first_update_id_26fcc6afc58014b7_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_topic
    ADD CONSTRAINT assessments__first_update_id_26fcc6afc58014b7_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments__first_update_id_33fa33213913c5a4_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_lessonrecommendationthreshold
    ADD CONSTRAINT assessments__first_update_id_33fa33213913c5a4_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments__first_update_id_4957dd3599870194_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_lessondimensionweight
    ADD CONSTRAINT assessments__first_update_id_4957dd3599870194_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments__first_update_id_4aceeb97cfaa35b0_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_certificationcompetencythreshold
    ADD CONSTRAINT assessments__first_update_id_4aceeb97cfaa35b0_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments__first_update_id_4fa212a470a0f8c9_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_userlessonrecommendation
    ADD CONSTRAINT assessments__first_update_id_4fa212a470a0f8c9_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments__first_update_id_4fe24f327cbdb313_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_certificationprogramuserstatus
    ADD CONSTRAINT assessments__first_update_id_4fe24f327cbdb313_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments__first_update_id_5253bff6c64edf12_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_curriculum
    ADD CONSTRAINT assessments__first_update_id_5253bff6c64edf12_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments__first_update_id_52ea9326a311ab9d_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_certificationprogram
    ADD CONSTRAINT assessments__first_update_id_52ea9326a311ab9d_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments__first_update_id_5469a3aa516c8543_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_competency
    ADD CONSTRAINT assessments__first_update_id_5469a3aa516c8543_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments__first_update_id_559e13b7f552c45f_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_competencytree
    ADD CONSTRAINT assessments__first_update_id_559e13b7f552c45f_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments__first_update_id_796ba56a39febba6_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_lesson
    ADD CONSTRAINT assessments__first_update_id_796ba56a39febba6_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments__first_update_id_7f784e8ff35b3ec6_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_lessonreference
    ADD CONSTRAINT assessments__first_update_id_7f784e8ff35b3ec6_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_a_last_update_id_3c86aae60ed5c071_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_assessableactivitypartuserscore
    ADD CONSTRAINT assessments_a_last_update_id_3c86aae60ed5c071_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_ass_user_id_6992736af40c1069_fk_accounts_mtpuser_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_assessableactivityuserscore
    ADD CONSTRAINT assessments_ass_user_id_6992736af40c1069_fk_accounts_mtpuser_id FOREIGN KEY (user_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_asse_user_id_f392d169f5eae99_fk_accounts_mtpuser_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_assessableactivitypartuserscore
    ADD CONSTRAINT assessments_asse_user_id_f392d169f5eae99_fk_accounts_mtpuser_id FOREIGN KEY (user_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_c_first_update_id_31db17e123d673e_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_certificationstatus
    ADD CONSTRAINT assessments_c_first_update_id_31db17e123d673e_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_c_last_update_id_173a0cc342f7bb61_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_certificationprogram
    ADD CONSTRAINT assessments_c_last_update_id_173a0cc342f7bb61_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_c_last_update_id_1c941132394025ef_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_certificationprogramuserstatus
    ADD CONSTRAINT assessments_c_last_update_id_1c941132394025ef_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_c_last_update_id_28af2879ce4f4b1a_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_certificationstatus
    ADD CONSTRAINT assessments_c_last_update_id_28af2879ce4f4b1a_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_c_last_update_id_2c7971d0ea8f8c23_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_competencytree
    ADD CONSTRAINT assessments_c_last_update_id_2c7971d0ea8f8c23_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_c_last_update_id_41eee4d2e84d0507_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_competency
    ADD CONSTRAINT assessments_c_last_update_id_41eee4d2e84d0507_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_c_last_update_id_79a6f11f78015374_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_certificationcompetencythreshold
    ADD CONSTRAINT assessments_c_last_update_id_79a6f11f78015374_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_cer_user_id_44a29f86e81dd5b9_fk_accounts_mtpuser_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_certificationprogramuserstatus
    ADD CONSTRAINT assessments_cer_user_id_44a29f86e81dd5b9_fk_accounts_mtpuser_id FOREIGN KEY (user_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_com_user_id_7cf9a1ab5cc82f8f_fk_accounts_mtpuser_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_competencytreeuserscore
    ADD CONSTRAINT assessments_com_user_id_7cf9a1ab5cc82f8f_fk_accounts_mtpuser_id FOREIGN KEY (user_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_comp_group_id_733b10002fb8e0a3_fk_accounts_group_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_competencytree
    ADD CONSTRAINT assessments_comp_group_id_733b10002fb8e0a3_fk_accounts_group_id FOREIGN KEY (group_id) REFERENCES accounts_group(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_comp_user_id_dbd846d995bfe86_fk_accounts_mtpuser_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_competencyuserscore
    ADD CONSTRAINT assessments_comp_user_id_dbd846d995bfe86_fk_accounts_mtpuser_id FOREIGN KEY (user_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_cu_last_update_id_bb72b4ee8f1302a_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_curriculum
    ADD CONSTRAINT assessments_cu_last_update_id_bb72b4ee8f1302a_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_curr_group_id_6f514474e7c27ace_fk_accounts_group_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_curriculum_mgroups
    ADD CONSTRAINT assessments_curr_group_id_6f514474e7c27ace_fk_accounts_group_id FOREIGN KEY (group_id) REFERENCES accounts_group(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_d_last_update_id_234f8a8163b85396_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_dimension
    ADD CONSTRAINT assessments_d_last_update_id_234f8a8163b85396_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_di_last_update_id_4a28c497685767c_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_dimensiontrainingweight
    ADD CONSTRAINT assessments_di_last_update_id_4a28c497685767c_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_dim_user_id_3152024676f75d7b_fk_accounts_mtpuser_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_dimensionuserscore
    ADD CONSTRAINT assessments_dim_user_id_3152024676f75d7b_fk_accounts_mtpuser_id FOREIGN KEY (user_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_l_last_update_id_1148742dc55f3220_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_lessonrecommendationthreshold
    ADD CONSTRAINT assessments_l_last_update_id_1148742dc55f3220_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_l_last_update_id_3f57fb9a445ee8fe_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_lessonreference
    ADD CONSTRAINT assessments_l_last_update_id_3f57fb9a445ee8fe_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_l_last_update_id_53d3478136870290_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_lessondimensionweight
    ADD CONSTRAINT assessments_l_last_update_id_53d3478136870290_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_l_topic_id_51eea8f62b322e9f_fk_assessments_topic_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_lesson
    ADD CONSTRAINT assessments_l_topic_id_51eea8f62b322e9f_fk_assessments_topic_id FOREIGN KEY (topic_id) REFERENCES assessments_topic(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_le_last_update_id_9321fde446fe57e_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_lesson
    ADD CONSTRAINT assessments_le_last_update_id_9321fde446fe57e_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_lesson_id_1d20dc1f0b3fd5fa_fk_assessments_lesson_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_lessondimensionweight
    ADD CONSTRAINT assessments_lesson_id_1d20dc1f0b3fd5fa_fk_assessments_lesson_id FOREIGN KEY (lesson_id) REFERENCES assessments_lesson(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_lesson_id_54c2ef6ea2a58d1d_fk_assessments_lesson_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_userlessonrecommendation
    ADD CONSTRAINT assessments_lesson_id_54c2ef6ea2a58d1d_fk_assessments_lesson_id FOREIGN KEY (lesson_id) REFERENCES assessments_lesson(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_lesson_id_6f4987498753eb8a_fk_assessments_lesson_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_lessonrecommendationthreshold
    ADD CONSTRAINT assessments_lesson_id_6f4987498753eb8a_fk_assessments_lesson_id FOREIGN KEY (lesson_id) REFERENCES assessments_lesson(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_r_first_update_id_9fdc178820a72b0_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_recommendationlevel
    ADD CONSTRAINT assessments_r_first_update_id_9fdc178820a72b0_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_re_last_update_id_9a43d1e210de52c_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_recommendationlevel
    ADD CONSTRAINT assessments_re_last_update_id_9a43d1e210de52c_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_t_last_update_id_13c74eccf0f31325_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_topic
    ADD CONSTRAINT assessments_t_last_update_id_13c74eccf0f31325_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_u_last_update_id_4c85f55b6c16fced_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_userlessonrecommendation
    ADD CONSTRAINT assessments_u_last_update_id_4c85f55b6c16fced_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: auth_content_type_id_3c70ba293e72d5d3_fk_django_content_type_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY auth_permission
    ADD CONSTRAINT auth_content_type_id_3c70ba293e72d5d3_fk_django_content_type_id FOREIGN KEY (content_type_id) REFERENCES django_content_type(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: auth_group_permissio_group_id_2a13297d5ca7e70c_fk_auth_group_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY auth_group_permissions
    ADD CONSTRAINT auth_group_permissio_group_id_2a13297d5ca7e70c_fk_auth_group_id FOREIGN KEY (group_id) REFERENCES auth_group(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: auth_group_permission_id_3ae2d1d37ffd35c1_fk_auth_permission_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY auth_group_permissions
    ADD CONSTRAINT auth_group_permission_id_3ae2d1d37ffd35c1_fk_auth_permission_id FOREIGN KEY (permission_id) REFERENCES auth_permission(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: b063dc53f68338d50e82c1a9e8966916; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY brainstormers_brainstormeractivity_trainings
    ADD CONSTRAINT b063dc53f68338d50e82c1a9e8966916 FOREIGN KEY (brainstormeractivity_id) REFERENCES brainstormers_brainstormeractivity(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: b20c20faba9a9e49a4cb5898488be563; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY evaluations_exercise
    ADD CONSTRAINT b20c20faba9a9e49a4cb5898488be563 FOREIGN KEY (evaluation_id) REFERENCES evaluations_evaluation(trainingactivity_ptr_id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: b466cdb85dc9e012b3e9e639fe60da63; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY notifications_noticesetting
    ADD CONSTRAINT b466cdb85dc9e012b3e9e639fe60da63 FOREIGN KEY (scoping_content_type_id) REFERENCES django_content_type(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: b4cbe5281ad6dfbe588f01e95c0c8aab; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY workshops_workshopstepquestion
    ADD CONSTRAINT b4cbe5281ad6dfbe588f01e95c0c8aab FOREIGN KEY (workshopstep_ptr_id) REFERENCES workshops_workshopstep(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: ba067b321e5e6b6e9ebf0f10eb3bd058; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_certificationcompetencythreshold
    ADD CONSTRAINT ba067b321e5e6b6e9ebf0f10eb3bd058 FOREIGN KEY (status_id) REFERENCES assessments_certificationstatus(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: bbd253060f2f1bdf56f435476040cff1; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY workshops_workshopstepquestionanswer
    ADD CONSTRAINT bbd253060f2f1bdf56f435476040cff1 FOREIGN KEY (parent_version_id) REFERENCES workshops_workshopstepquestionanswer(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: be1ef2546a23f30b0d111cbb1196a174; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY workshops_workshopstepquestionuseranswer
    ADD CONSTRAINT be1ef2546a23f30b0d111cbb1196a174 FOREIGN KEY (answer_id) REFERENCES workshops_workshopstepquestionanswer(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: bra_session_id_493ad16b5dfdf04d_fk_trainings_trainingsession_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY brainstormers_brainstormer
    ADD CONSTRAINT bra_session_id_493ad16b5dfdf04d_fk_trainings_trainingsession_id FOREIGN KEY (session_id) REFERENCES trainings_trainingsession(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: brainstor_training_id_4125b6a102ef123c_fk_trainings_training_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY brainstormers_brainstormeractivity_trainings
    ADD CONSTRAINT brainstor_training_id_4125b6a102ef123c_fk_trainings_training_id FOREIGN KEY (training_id) REFERENCES trainings_training(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: brainstormer_first_update_id_35ca853bf1226fe7_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY brainstormers_brainstormerproposition
    ADD CONSTRAINT brainstormer_first_update_id_35ca853bf1226fe7_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: brainstormer_first_update_id_51d8033344ed1835_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY brainstormers_brainstormer
    ADD CONSTRAINT brainstormer_first_update_id_51d8033344ed1835_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: brainstormer_first_update_id_5bf453a933a50704_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY brainstormers_brainstormeractivity
    ADD CONSTRAINT brainstormer_first_update_id_5bf453a933a50704_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: brainstormer_first_update_id_64af6c56fbe4a4b6_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY brainstormers_brainstormerpropositiongroup
    ADD CONSTRAINT brainstormer_first_update_id_64af6c56fbe4a4b6_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: brainstormers_b_last_update_id_a1413df9d7636e_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY brainstormers_brainstormerpropositiongroup
    ADD CONSTRAINT brainstormers_b_last_update_id_a1413df9d7636e_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: brainstormers_b_user_id_457217766c4d62b5_fk_accounts_mtpuser_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY brainstormers_brainstormerproposition
    ADD CONSTRAINT brainstormers_b_user_id_457217766c4d62b5_fk_accounts_mtpuser_id FOREIGN KEY (user_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: brainstormers_last_update_id_329cd95ce36a83c8_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY brainstormers_brainstormeractivity
    ADD CONSTRAINT brainstormers_last_update_id_329cd95ce36a83c8_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: brainstormers_last_update_id_5b07ad52f0dcc4f9_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY brainstormers_brainstormer
    ADD CONSTRAINT brainstormers_last_update_id_5b07ad52f0dcc4f9_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: brainstormers_last_update_id_5e6b4e043585f323_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY brainstormers_brainstormerproposition
    ADD CONSTRAINT brainstormers_last_update_id_5e6b4e043585f323_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: c4dbed06ab29fa0a157fd41590bba118; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_certificationstatus
    ADD CONSTRAINT c4dbed06ab29fa0a157fd41590bba118 FOREIGN KEY (program_id) REFERENCES assessments_certificationprogram(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: c8e2fbdc43fde00e5c00cc7ac45f889a; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY documents_backgroundexecution_auto_mgroups
    ADD CONSTRAINT c8e2fbdc43fde00e5c00cc7ac45f889a FOREIGN KEY (backgroundexecution_id) REFERENCES documents_backgroundexecution(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: ca4c8e15a7a718e28934a8dc21c18132; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY brainstormers_brainstormertemplate
    ADD CONSTRAINT ca4c8e15a7a718e28934a8dc21c18132 FOREIGN KEY (trainingactivity_ptr_id) REFERENCES trainings_trainingactivity(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: d091e6a66b7819d8bbeadb107fea906f; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_competency
    ADD CONSTRAINT d091e6a66b7819d8bbeadb107fea906f FOREIGN KEY (parent_version_id) REFERENCES assessments_competency(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: d2c568b6df6d68be3d237b810dbcd16e; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY workshops_workshopstep
    ADD CONSTRAINT d2c568b6df6d68be3d237b810dbcd16e FOREIGN KEY (original_version_id) REFERENCES workshops_workshopstep(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: d66f105e226086f5ae94cda3f3186861; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_certificationprogramuserstatus
    ADD CONSTRAINT d66f105e226086f5ae94cda3f3186861 FOREIGN KEY (status_id) REFERENCES assessments_certificationstatus(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: djang_content_type_id_f6b24bbd922fc26_fk_django_content_type_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY django_admin_log
    ADD CONSTRAINT djang_content_type_id_f6b24bbd922fc26_fk_django_content_type_id FOREIGN KEY (content_type_id) REFERENCES django_content_type(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: django_admin_log_user_id_3ba3cc7b98237ff_fk_accounts_mtpuser_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY django_admin_log
    ADD CONSTRAINT django_admin_log_user_id_3ba3cc7b98237ff_fk_accounts_mtpuser_id FOREIGN KEY (user_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: doc_session_id_70b505f184a47927_fk_trainings_trainingsession_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY documents_note
    ADD CONSTRAINT doc_session_id_70b505f184a47927_fk_trainings_trainingsession_id FOREIGN KEY (session_id) REFERENCES trainings_trainingsession(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: documents_ba_first_update_id_2740c692b379cbe4_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY documents_backgroundexecution
    ADD CONSTRAINT documents_ba_first_update_id_2740c692b379cbe4_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: documents_bac_last_update_id_1107f5d068bbd7a8_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY documents_backgroundexecution
    ADD CONSTRAINT documents_bac_last_update_id_1107f5d068bbd7a8_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: documents_backgr_group_id_13f238592c9758a6_fk_accounts_group_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY documents_backgroundexecution_mgroups
    ADD CONSTRAINT documents_backgr_group_id_13f238592c9758a6_fk_accounts_group_id FOREIGN KEY (group_id) REFERENCES accounts_group(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: documents_backgro_group_id_d950e38955d0b03_fk_accounts_group_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY documents_backgroundexecution_auto_mgroups
    ADD CONSTRAINT documents_backgro_group_id_d950e38955d0b03_fk_accounts_group_id FOREIGN KEY (group_id) REFERENCES accounts_group(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: documents_no_first_update_id_4a52373605eb8c31_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY documents_note
    ADD CONSTRAINT documents_no_first_update_id_4a52373605eb8c31_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: documents_not_last_update_id_3d34acffbb88b955_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY documents_note
    ADD CONSTRAINT documents_not_last_update_id_3d34acffbb88b955_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: documents_note_user_id_11ab27cf38b314fd_fk_accounts_mtpuser_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY documents_note
    ADD CONSTRAINT documents_note_user_id_11ab27cf38b314fd_fk_accounts_mtpuser_id FOREIGN KEY (user_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: e197c177484b0150dd5ac7d33ed57bae; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY brainstormers_brainstormertemplate
    ADD CONSTRAINT e197c177484b0150dd5ac7d33ed57bae FOREIGN KEY (activity_id) REFERENCES brainstormers_brainstormeractivity(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: e290cf5789e88f2b7dfe2667869916db; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY evaluations_evaluationgrouppermission
    ADD CONSTRAINT e290cf5789e88f2b7dfe2667869916db FOREIGN KEY (evaluation_id) REFERENCES evaluations_evaluation(trainingactivity_ptr_id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: e61dc5b86efdd4b31d7fef4aa3ad029f; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY oauth2_provider_refreshtoken
    ADD CONSTRAINT e61dc5b86efdd4b31d7fef4aa3ad029f FOREIGN KEY (access_token_id) REFERENCES oauth2_provider_accesstoken(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: e7cc0ea8ce978dd9301d0caffbbb8212; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY workshops_workshopstepquestion_dimensions
    ADD CONSTRAINT e7cc0ea8ce978dd9301d0caffbbb8212 FOREIGN KEY (workshopstepquestion_id) REFERENCES workshops_workshopstepquestion(workshopstep_ptr_id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: e84b882e7023b376def3e1ed086a54ab; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY workshops_workshopstepquestionuseranswer
    ADD CONSTRAINT e84b882e7023b376def3e1ed086a54ab FOREIGN KEY (question_id) REFERENCES workshops_workshopstepquestion(workshopstep_ptr_id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: e929b2d74a8cab5c5440ce496f412cc9; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY trainings_trainingactivity
    ADD CONSTRAINT e929b2d74a8cab5c5440ce496f412cc9 FOREIGN KEY (original_version_id) REFERENCES trainings_trainingactivity(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: e_parent_version_id_7302a8cd3d3d18b3_fk_evaluations_exercise_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY evaluations_exercise
    ADD CONSTRAINT e_parent_version_id_7302a8cd3d3d18b3_fk_evaluations_exercise_id FOREIGN KEY (parent_version_id) REFERENCES evaluations_exercise(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: ebec86aadbb0c11860e826aca6998234; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY trainings_trainingclientoptions
    ADD CONSTRAINT ebec86aadbb0c11860e826aca6998234 FOREIGN KEY (parent_version_id) REFERENCES trainings_trainingclientoptions(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: eca8c11d0ad442de228b1f4ac0aa4583; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_userlessonrecommendation
    ADD CONSTRAINT eca8c11d0ad442de228b1f4ac0aa4583 FOREIGN KEY (certification_id) REFERENCES assessments_certificationprogramuserstatus(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: eva_session_id_66fbacd90d13063e_fk_trainings_trainingsession_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY evaluations_rating
    ADD CONSTRAINT eva_session_id_66fbacd90d13063e_fk_trainings_trainingsession_id FOREIGN KEY (session_id) REFERENCES trainings_trainingsession(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: evalu_criterion_id_653dd5d07c1fabc5_fk_evaluations_criterion_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY evaluations_rating
    ADD CONSTRAINT evalu_criterion_id_653dd5d07c1fabc5_fk_evaluations_criterion_id FOREIGN KEY (criterion_id) REFERENCES evaluations_criterion(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: evaluat_exercise_id_49b8e5caf281433d_fk_evaluations_exercise_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY evaluations_criterion
    ADD CONSTRAINT evaluat_exercise_id_49b8e5caf281433d_fk_evaluations_exercise_id FOREIGN KEY (exercise_id) REFERENCES evaluations_exercise(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: evaluations__first_update_id_4f91508028d14606_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY evaluations_rating
    ADD CONSTRAINT evaluations__first_update_id_4f91508028d14606_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: evaluations__first_update_id_52171bcc0f69c4de_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY evaluations_evaluationgrouppermission
    ADD CONSTRAINT evaluations__first_update_id_52171bcc0f69c4de_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: evaluations__first_update_id_568e59270624f5f1_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY evaluations_criterion
    ADD CONSTRAINT evaluations__first_update_id_568e59270624f5f1_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: evaluations__trainee_id_31b7e9ecb6ddb84c_fk_accounts_mtpuser_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY evaluations_rating
    ADD CONSTRAINT evaluations__trainee_id_31b7e9ecb6ddb84c_fk_accounts_mtpuser_id FOREIGN KEY (trainee_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: evaluations_c_last_update_id_360aa962fa801f33_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY evaluations_criterion
    ADD CONSTRAINT evaluations_c_last_update_id_360aa962fa801f33_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: evaluations_e_first_update_id_135c8a5bd0f9cf0_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY evaluations_exercise
    ADD CONSTRAINT evaluations_e_first_update_id_135c8a5bd0f9cf0_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: evaluations_ev_last_update_id_b5e89825f832b46_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY evaluations_evaluationgrouppermission
    ADD CONSTRAINT evaluations_ev_last_update_id_b5e89825f832b46_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: evaluations_eval_group_id_4536383c504e3c3a_fk_accounts_group_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY evaluations_evaluationgrouppermission
    ADD CONSTRAINT evaluations_eval_group_id_4536383c504e3c3a_fk_accounts_group_id FOREIGN KEY (group_id) REFERENCES accounts_group(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: evaluations_ex_last_update_id_5c0ee8bc8c53ccc_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY evaluations_exercise
    ADD CONSTRAINT evaluations_ex_last_update_id_5c0ee8bc8c53ccc_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: evaluations_r_last_update_id_227ef83b170b8142_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY evaluations_rating
    ADD CONSTRAINT evaluations_r_last_update_id_227ef83b170b8142_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: evaluations_ra_judge_id_3a42976bcfe6fe11_fk_accounts_mtpuser_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY evaluations_rating
    ADD CONSTRAINT evaluations_ra_judge_id_3a42976bcfe6fe11_fk_accounts_mtpuser_id FOREIGN KEY (judge_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: even_subject_type_id_12c6a258d0f36079_fk_django_content_type_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY eventlog_eventlog
    ADD CONSTRAINT even_subject_type_id_12c6a258d0f36079_fk_django_content_type_id FOREIGN KEY (subject_type_id) REFERENCES django_content_type(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: event_source_type_id_3a5a35ed26e8c7ac_fk_django_content_type_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY eventlog_eventlog
    ADD CONSTRAINT event_source_type_id_3a5a35ed26e8c7ac_fk_django_content_type_id FOREIGN KEY (source_type_id) REFERENCES django_content_type(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: event_target_type_id_2e65ef3b9b5cddd5_fk_django_content_type_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY eventlog_eventlog
    ADD CONSTRAINT event_target_type_id_2e65ef3b9b5cddd5_fk_django_content_type_id FOREIGN KEY (target_type_id) REFERENCES django_content_type(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: eventlog_eve_first_update_id_42e88f8f6d44e25d_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY eventlog_eventlog
    ADD CONSTRAINT eventlog_eve_first_update_id_42e88f8f6d44e25d_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: eventlog_even_last_update_id_3cf4caa226f2ba99_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY eventlog_eventlog
    ADD CONSTRAINT eventlog_even_last_update_id_3cf4caa226f2ba99_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: f6f3b3da2a1a61036360d5191e434acc; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_competency
    ADD CONSTRAINT f6f3b3da2a1a61036360d5191e434acc FOREIGN KEY (original_version_id) REFERENCES assessments_competency(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: fe0820213b89716779ef911e23ef9087; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_curriculum_active_recommendation_levels
    ADD CONSTRAINT fe0820213b89716779ef911e23ef9087 FOREIGN KEY (recommendationlevel_id) REFERENCES assessments_recommendationlevel(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: like_content_type_id_125651acec4a49bd_fk_django_content_type_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY likes_like
    ADD CONSTRAINT like_content_type_id_125651acec4a49bd_fk_django_content_type_id FOREIGN KEY (content_type_id) REFERENCES django_content_type(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: likes_like_author_id_620cedbae6ba4aff_fk_accounts_mtpuser_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY likes_like
    ADD CONSTRAINT likes_like_author_id_620cedbae6ba4aff_fk_accounts_mtpuser_id FOREIGN KEY (author_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: likes_like_first_update_id_395d50d050b41a24_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY likes_like
    ADD CONSTRAINT likes_like_first_update_id_395d50d050b41a24_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: likes_like_last_update_id_69c60c13654ef960_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY likes_like
    ADD CONSTRAINT likes_like_last_update_id_69c60c13654ef960_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: met_session_id_1ff3e07bf5d53b1f_fk_trainings_trainingsession_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY metaplans_metaplan
    ADD CONSTRAINT met_session_id_1ff3e07bf5d53b1f_fk_trainings_trainingsession_id FOREIGN KEY (session_id) REFERENCES trainings_trainingsession(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: metaplans__metaplan_id_a532613a3c93ba6_fk_metaplans_metaplan_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY metaplans_metaplanproposition
    ADD CONSTRAINT metaplans__metaplan_id_a532613a3c93ba6_fk_metaplans_metaplan_id FOREIGN KEY (metaplan_id) REFERENCES metaplans_metaplan(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: metaplans_me_first_update_id_114e17ea68dc9711_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY metaplans_metaplanproposition
    ADD CONSTRAINT metaplans_me_first_update_id_114e17ea68dc9711_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: metaplans_me_first_update_id_2070261b8ee1dd77_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY metaplans_metaplan
    ADD CONSTRAINT metaplans_me_first_update_id_2070261b8ee1dd77_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: metaplans_met_last_update_id_3a8ec7f4e7ea559b_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY metaplans_metaplan
    ADD CONSTRAINT metaplans_met_last_update_id_3a8ec7f4e7ea559b_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: metaplans_met_last_update_id_66879a1d575adbcb_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY metaplans_metaplanproposition
    ADD CONSTRAINT metaplans_met_last_update_id_66879a1d575adbcb_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: metaplans_metap_user_id_173668b84e95d15d_fk_accounts_mtpuser_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY metaplans_metaplanproposition
    ADD CONSTRAINT metaplans_metap_user_id_173668b84e95d15d_fk_accounts_mtpuser_id FOREIGN KEY (user_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: notice_type_id_21b350a3e61039a3_fk_notifications_noticetype_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY notifications_noticesetting
    ADD CONSTRAINT notice_type_id_21b350a3e61039a3_fk_notifications_noticetype_id FOREIGN KEY (notice_type_id) REFERENCES notifications_noticetype(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: notifications_n_user_id_3260726374550ea1_fk_accounts_mtpuser_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY notifications_noticesetting
    ADD CONSTRAINT notifications_n_user_id_3260726374550ea1_fk_accounts_mtpuser_id FOREIGN KEY (user_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: oauth2_provider__user_id_f1506a09bd6e74b_fk_accounts_mtpuser_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY oauth2_provider_application
    ADD CONSTRAINT oauth2_provider__user_id_f1506a09bd6e74b_fk_accounts_mtpuser_id FOREIGN KEY (user_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: oauth2_provider_user_id_212b5eac9315d2af_fk_accounts_mtpuser_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY oauth2_provider_refreshtoken
    ADD CONSTRAINT oauth2_provider_user_id_212b5eac9315d2af_fk_accounts_mtpuser_id FOREIGN KEY (user_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: oauth2_provider_user_id_63d515a924666524_fk_accounts_mtpuser_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY oauth2_provider_accesstoken
    ADD CONSTRAINT oauth2_provider_user_id_63d515a924666524_fk_accounts_mtpuser_id FOREIGN KEY (user_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: oauth2_provider_user_id_7671ef0bb66827e2_fk_accounts_mtpuser_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY oauth2_provider_grant
    ADD CONSTRAINT oauth2_provider_user_id_7671ef0bb66827e2_fk_accounts_mtpuser_id FOREIGN KEY (user_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: original_version_id_543b47ea3a794b6e_fk_roleplays_criterion_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY roleplays_criterion
    ADD CONSTRAINT original_version_id_543b47ea3a794b6e_fk_roleplays_criterion_id FOREIGN KEY (original_version_id) REFERENCES roleplays_criterion(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: parent_version_id_11848af0f5c84b65_fk_assessments_dimension_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_dimension
    ADD CONSTRAINT parent_version_id_11848af0f5c84b65_fk_assessments_dimension_id FOREIGN KEY (parent_version_id) REFERENCES assessments_dimension(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: parent_version_id_515f3d937a1459b4_fk_evaluations_criterion_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY evaluations_criterion
    ADD CONSTRAINT parent_version_id_515f3d937a1459b4_fk_evaluations_criterion_id FOREIGN KEY (parent_version_id) REFERENCES evaluations_criterion(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: reference_id_b2e61b251de372a_fk_assessments_lessonreference_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY assessments_lesson
    ADD CONSTRAINT reference_id_b2e61b251de372a_fk_assessments_lessonreference_id FOREIGN KEY (reference_id) REFERENCES assessments_lessonreference(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: ro_parent_version_id_10580e4bf147d504_fk_roleplays_criterion_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY roleplays_criterion
    ADD CONSTRAINT ro_parent_version_id_10580e4bf147d504_fk_roleplays_criterion_id FOREIGN KEY (parent_version_id) REFERENCES roleplays_criterion(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: rol_activity_type_id_3b65d3ff7135f02f_fk_django_content_type_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY roleplays_criterion
    ADD CONSTRAINT rol_activity_type_id_3b65d3ff7135f02f_fk_django_content_type_id FOREIGN KEY (activity_type_id) REFERENCES django_content_type(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: rolep_dimension_id_7de5c49b35158529_fk_assessments_dimension_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY roleplays_criterion_dimensions
    ADD CONSTRAINT rolep_dimension_id_7de5c49b35158529_fk_assessments_dimension_id FOREIGN KEY (dimension_id) REFERENCES assessments_dimension(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: rolep_original_version_id_307836dbeaf4cb56_fk_roleplays_step_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY roleplays_step
    ADD CONSTRAINT rolep_original_version_id_307836dbeaf4cb56_fk_roleplays_step_id FOREIGN KEY (original_version_id) REFERENCES roleplays_step(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: rolepla_criterion_id_3a8f7aed1a7a016c_fk_roleplays_criterion_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY roleplays_rating
    ADD CONSTRAINT rolepla_criterion_id_3a8f7aed1a7a016c_fk_roleplays_criterion_id FOREIGN KEY (criterion_id) REFERENCES roleplays_criterion(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: rolepla_criterion_id_6b910775b2185c17_fk_roleplays_criterion_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY roleplays_criterion_dimensions
    ADD CONSTRAINT rolepla_criterion_id_6b910775b2185c17_fk_roleplays_criterion_id FOREIGN KEY (criterion_id) REFERENCES roleplays_criterion(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: rolepla_parent_version_id_2dd20e0f68b9c4b4_fk_roleplays_step_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY roleplays_step
    ADD CONSTRAINT rolepla_parent_version_id_2dd20e0f68b9c4b4_fk_roleplays_step_id FOREIGN KEY (parent_version_id) REFERENCES roleplays_step(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: roleplays_cr_first_update_id_3e422f566a471ff9_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY roleplays_criterion
    ADD CONSTRAINT roleplays_cr_first_update_id_3e422f566a471ff9_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: roleplays_cri_last_update_id_776cadd260807735_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY roleplays_criterion
    ADD CONSTRAINT roleplays_cri_last_update_id_776cadd260807735_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: roleplays_criteri_step_id_3b6308660b7a3f84_fk_roleplays_step_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY roleplays_criterion
    ADD CONSTRAINT roleplays_criteri_step_id_3b6308660b7a3f84_fk_roleplays_step_id FOREIGN KEY (step_id) REFERENCES roleplays_step(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: roleplays_ra_first_update_id_68f010963db78a0f_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY roleplays_rating
    ADD CONSTRAINT roleplays_ra_first_update_id_68f010963db78a0f_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: roleplays_ra_trainee_id_1f258c48b46dc8a5_fk_accounts_mtpuser_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY roleplays_rating
    ADD CONSTRAINT roleplays_ra_trainee_id_1f258c48b46dc8a5_fk_accounts_mtpuser_id FOREIGN KEY (trainee_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: roleplays_rat_last_update_id_380c7fc92cf99f33_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY roleplays_rating
    ADD CONSTRAINT roleplays_rat_last_update_id_380c7fc92cf99f33_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: roleplays_st_first_update_id_46509500a9cf10f1_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY roleplays_step
    ADD CONSTRAINT roleplays_st_first_update_id_46509500a9cf10f1_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: roleplays_ste_last_update_id_62073cfc7b0c3433_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY roleplays_step
    ADD CONSTRAINT roleplays_ste_last_update_id_62073cfc7b0c3433_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: roleplays_training_id_2d382cbb0c03235b_fk_trainings_training_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY roleplays_criterion
    ADD CONSTRAINT roleplays_training_id_2d382cbb0c03235b_fk_trainings_training_id FOREIGN KEY (training_id) REFERENCES trainings_training(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: surveys_ans_question_id_6784ecb81117cd09_fk_surveys_question_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY surveys_answer
    ADD CONSTRAINT surveys_ans_question_id_6784ecb81117cd09_fk_surveys_question_id FOREIGN KEY (question_id) REFERENCES surveys_question(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: surveys_answ_first_update_id_15a5793f31f18938_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY surveys_answer
    ADD CONSTRAINT surveys_answ_first_update_id_15a5793f31f18938_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: surveys_answ_trainee_id_1bc9d92234b2a6a2_fk_accounts_mtpuser_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY surveys_answer
    ADD CONSTRAINT surveys_answ_trainee_id_1bc9d92234b2a6a2_fk_accounts_mtpuser_id FOREIGN KEY (trainee_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: surveys_answe_last_update_id_6d0d53915e836d14_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY surveys_answer
    ADD CONSTRAINT surveys_answe_last_update_id_6d0d53915e836d14_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: surveys_answer__answer_id_6dd4e01fd741331f_fk_surveys_answer_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY surveys_answer_choices
    ADD CONSTRAINT surveys_answer__answer_id_6dd4e01fd741331f_fk_surveys_answer_id FOREIGN KEY (answer_id) REFERENCES surveys_answer(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: surveys_answer__choice_id_6609c798ce9d892b_fk_surveys_choice_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY surveys_answer_choices
    ADD CONSTRAINT surveys_answer__choice_id_6609c798ce9d892b_fk_surveys_choice_id FOREIGN KEY (choice_id) REFERENCES surveys_choice(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: surveys_answer_survey_id_10385fd617f57965_fk_surveys_survey_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY surveys_answer
    ADD CONSTRAINT surveys_answer_survey_id_10385fd617f57965_fk_surveys_survey_id FOREIGN KEY (survey_id) REFERENCES surveys_survey(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: surveys_cho_question_id_7bb6a68f5a3f2483_fk_surveys_question_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY surveys_choice
    ADD CONSTRAINT surveys_cho_question_id_7bb6a68f5a3f2483_fk_surveys_question_id FOREIGN KEY (question_id) REFERENCES surveys_question(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: surveys_choi_first_update_id_7797257dfcbe5224_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY surveys_choice
    ADD CONSTRAINT surveys_choi_first_update_id_7797257dfcbe5224_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: surveys_choice_last_update_id_938895fc0953ea0_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY surveys_choice
    ADD CONSTRAINT surveys_choice_last_update_id_938895fc0953ea0_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: surveys_pool_author_id_3e94284286502617_fk_accounts_mtpuser_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY surveys_pool
    ADD CONSTRAINT surveys_pool_author_id_3e94284286502617_fk_accounts_mtpuser_id FOREIGN KEY (author_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: surveys_pool_first_update_id_65554fd705be5494_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY surveys_pool
    ADD CONSTRAINT surveys_pool_first_update_id_65554fd705be5494_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: surveys_pool_last_update_id_990a77fb06e1b8_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY surveys_pool
    ADD CONSTRAINT surveys_pool_last_update_id_990a77fb06e1b8_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: surveys_ques_first_update_id_1343e67ba660ca22_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY surveys_question
    ADD CONSTRAINT surveys_ques_first_update_id_1343e67ba660ca22_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: surveys_questi_last_update_id_f941d4649dc1646_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY surveys_question
    ADD CONSTRAINT surveys_questi_last_update_id_f941d4649dc1646_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: surveys_question_pool_id_ca142372b2370b_fk_surveys_pool_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY surveys_question
    ADD CONSTRAINT surveys_question_pool_id_ca142372b2370b_fk_surveys_pool_id FOREIGN KEY (pool_id) REFERENCES surveys_pool(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: surveys_s_training_id_213342a6bc75b47d_fk_trainings_training_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY surveys_survey
    ADD CONSTRAINT surveys_s_training_id_213342a6bc75b47d_fk_trainings_training_id FOREIGN KEY (training_id) REFERENCES trainings_training(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: surveys_surv_first_update_id_20ffd153ba0de529_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY surveys_survey
    ADD CONSTRAINT surveys_surv_first_update_id_20ffd153ba0de529_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: surveys_surv_first_update_id_241679c230458c1a_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY surveys_surveypool
    ADD CONSTRAINT surveys_surv_first_update_id_241679c230458c1a_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: surveys_surv_trainer_id_51e88dc73683695c_fk_accounts_mtpuser_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY surveys_survey
    ADD CONSTRAINT surveys_surv_trainer_id_51e88dc73683695c_fk_accounts_mtpuser_id FOREIGN KEY (trainer_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: surveys_surve_last_update_id_294d184be53d864d_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY surveys_survey
    ADD CONSTRAINT surveys_surve_last_update_id_294d184be53d864d_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: surveys_survey_last_update_id_c847915145813c2_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY surveys_surveypool
    ADD CONSTRAINT surveys_survey_last_update_id_c847915145813c2_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: surveys_surveyp_survey_id_1e6e9b057f5f640f_fk_surveys_survey_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY surveys_surveypool
    ADD CONSTRAINT surveys_surveyp_survey_id_1e6e9b057f5f640f_fk_surveys_survey_id FOREIGN KEY (survey_id) REFERENCES surveys_survey(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: surveys_surveypool_pool_id_5190aae92ffc79a7_fk_surveys_pool_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY surveys_surveypool
    ADD CONSTRAINT surveys_surveypool_pool_id_5190aae92ffc79a7_fk_surveys_pool_id FOREIGN KEY (pool_id) REFERENCES surveys_pool(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: sync_clientv_first_update_id_36b06670874fc774_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY sync_clientversion
    ADD CONSTRAINT sync_clientv_first_update_id_36b06670874fc774_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: sync_clientve_last_update_id_47818a3881be9650_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY sync_clientversion
    ADD CONSTRAINT sync_clientve_last_update_id_47818a3881be9650_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: sync_lo_local_server_id_5d5bc82c279e54e3_fk_sync_localserver_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY sync_localserverconnection
    ADD CONSTRAINT sync_lo_local_server_id_5d5bc82c279e54e3_fk_sync_localserver_id FOREIGN KEY (local_server_id) REFERENCES sync_localserver(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: sync_localser_first_update_id_8346ff91045f4b6_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY sync_localserver
    ADD CONSTRAINT sync_localser_first_update_id_8346ff91045f4b6_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: sync_localser_last_update_id_6b5ebf155878b36e_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY sync_localserver
    ADD CONSTRAINT sync_localser_last_update_id_6b5ebf155878b36e_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: sync_serverv_first_update_id_15de52a6fed4e13b_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY sync_serverversion
    ADD CONSTRAINT sync_serverv_first_update_id_15de52a6fed4e13b_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: sync_serverver_last_update_id_fc42b32aecb8e01_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY sync_serverversion
    ADD CONSTRAINT sync_serverver_last_update_id_fc42b32aecb8e01_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: t_original_version_id_674bd8de324f9a0f_fk_trainings_training_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY trainings_training
    ADD CONSTRAINT t_original_version_id_674bd8de324f9a0f_fk_trainings_training_id FOREIGN KEY (original_version_id) REFERENCES trainings_training(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: themes_theme_first_update_id_6cade5ac1ef1f316_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY themes_theme
    ADD CONSTRAINT themes_theme_first_update_id_6cade5ac1ef1f316_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: themes_theme_last_update_id_fa2faee4121590e_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY themes_theme
    ADD CONSTRAINT themes_theme_last_update_id_fa2faee4121590e_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: tra_default_group_set_id_7e8b0bc5b03cf4_fk_accounts_groupset_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY trainings_training
    ADD CONSTRAINT tra_default_group_set_id_7e8b0bc5b03cf4_fk_accounts_groupset_id FOREIGN KEY (default_group_set_id) REFERENCES accounts_groupset(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: tra_session_id_260ad8134a935952_fk_trainings_trainingsession_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY trainings_currentsession
    ADD CONSTRAINT tra_session_id_260ad8134a935952_fk_trainings_trainingsession_id FOREIGN KEY (session_id) REFERENCES trainings_trainingsession(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: trai_parent_version_id_c7fbb4481095dcd_fk_trainings_training_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY trainings_training
    ADD CONSTRAINT trai_parent_version_id_c7fbb4481095dcd_fk_trainings_training_id FOREIGN KEY (parent_version_id) REFERENCES trainings_training(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: training_business_unit_id_634d2b17ba574013_fk_accounts_group_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY trainings_training
    ADD CONSTRAINT training_business_unit_id_634d2b17ba574013_fk_accounts_group_id FOREIGN KEY (business_unit_id) REFERENCES accounts_group(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: trainings__job_profile_id_63fd1056b001c007_fk_accounts_group_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY trainings_training
    ADD CONSTRAINT trainings__job_profile_id_63fd1056b001c007_fk_accounts_group_id FOREIGN KEY (job_profile_id) REFERENCES accounts_group(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: trainings_act_action_id_66bddc2029cd9f7b_fk_trainings_action_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY trainings_action_mgroups
    ADD CONSTRAINT trainings_act_action_id_66bddc2029cd9f7b_fk_trainings_action_id FOREIGN KEY (action_id) REFERENCES trainings_action(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: trainings_act_first_update_id_86c8c62fcc8ccae_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY trainings_action
    ADD CONSTRAINT trainings_act_first_update_id_86c8c62fcc8ccae_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: trainings_act_last_update_id_78fbe1912348e38a_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY trainings_action
    ADD CONSTRAINT trainings_act_last_update_id_78fbe1912348e38a_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: trainings_actio_user_id_7b3b1f7a6918b76e_fk_accounts_mtpuser_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY trainings_action
    ADD CONSTRAINT trainings_actio_user_id_7b3b1f7a6918b76e_fk_accounts_mtpuser_id FOREIGN KEY (user_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: trainings_action_group_id_3b965b3b6c24f3a3_fk_accounts_group_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY trainings_action_mgroups
    ADD CONSTRAINT trainings_action_group_id_3b965b3b6c24f3a3_fk_accounts_group_id FOREIGN KEY (group_id) REFERENCES accounts_group(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: trainings_tr_first_update_id_44b278d7830d81ff_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY trainings_trainingclientoptions
    ADD CONSTRAINT trainings_tr_first_update_id_44b278d7830d81ff_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: trainings_tr_first_update_id_660853f81d13cd96_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY trainings_trainingsession
    ADD CONSTRAINT trainings_tr_first_update_id_660853f81d13cd96_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: trainings_tr_first_update_id_75d8e7dd386e2056_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY trainings_training
    ADD CONSTRAINT trainings_tr_first_update_id_75d8e7dd386e2056_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: trainings_tr_mtpuser_id_30646c292c4be213_fk_accounts_mtpuser_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY trainings_trainingsession_users
    ADD CONSTRAINT trainings_tr_mtpuser_id_30646c292c4be213_fk_accounts_mtpuser_id FOREIGN KEY (mtpuser_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: trainings_tr_trainer_id_5dcea450bc8fcbeb_fk_accounts_mtpuser_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY trainings_trainingsession
    ADD CONSTRAINT trainings_tr_trainer_id_5dcea450bc8fcbeb_fk_accounts_mtpuser_id FOREIGN KEY (trainer_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: trainings_tra_first_update_id_99f1d85b91c0abc_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY trainings_trainingactivity
    ADD CONSTRAINT trainings_tra_first_update_id_99f1d85b91c0abc_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: trainings_tra_last_update_id_411a997437d775c3_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY trainings_trainingclientoptions
    ADD CONSTRAINT trainings_tra_last_update_id_411a997437d775c3_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: trainings_tra_last_update_id_414738e97b8efef8_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY trainings_trainingactivity
    ADD CONSTRAINT trainings_tra_last_update_id_414738e97b8efef8_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: trainings_tra_last_update_id_43f34cc9f2afb7ce_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY trainings_training
    ADD CONSTRAINT trainings_tra_last_update_id_43f34cc9f2afb7ce_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: trainings_tra_last_update_id_78409f2d3053338e_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY trainings_trainingsession
    ADD CONSTRAINT trainings_tra_last_update_id_78409f2d3053338e_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: trainings_trai_owner_id_1ab3fb191ffb35f6_fk_accounts_mtpuser_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY trainings_training
    ADD CONSTRAINT trainings_trai_owner_id_1ab3fb191ffb35f6_fk_accounts_mtpuser_id FOREIGN KEY (owner_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: trainings_training_id_142df6da2e4afd28_fk_trainings_training_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY trainings_trainingactivity
    ADD CONSTRAINT trainings_training_id_142df6da2e4afd28_fk_trainings_training_id FOREIGN KEY (training_id) REFERENCES trainings_training(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: trainings_training_id_2c035c9dd595b55a_fk_trainings_training_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY trainings_action
    ADD CONSTRAINT trainings_training_id_2c035c9dd595b55a_fk_trainings_training_id FOREIGN KEY (training_id) REFERENCES trainings_training(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: trainings_training_id_462c6947f0833793_fk_trainings_training_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY trainings_trainingclientoptions
    ADD CONSTRAINT trainings_training_id_462c6947f0833793_fk_trainings_training_id FOREIGN KEY (training_id) REFERENCES trainings_training(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: trainings_training_id_6550006a7e8f9e42_fk_trainings_training_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY trainings_trainingsession
    ADD CONSTRAINT trainings_training_id_6550006a7e8f9e42_fk_trainings_training_id FOREIGN KEY (training_id) REFERENCES trainings_training(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: trainings_training_theme_id_5938ba9fbbe567a2_fk_themes_theme_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY trainings_training
    ADD CONSTRAINT trainings_training_theme_id_5938ba9fbbe567a2_fk_themes_theme_id FOREIGN KEY (theme_id) REFERENCES themes_theme(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: translation__first_update_id_43d19c0a336be3b0_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY translation_translation
    ADD CONSTRAINT translation__first_update_id_43d19c0a336be3b0_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: translation__first_update_id_5969daa058b43626_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY translation_translatablelanguage
    ADD CONSTRAINT translation__first_update_id_5969daa058b43626_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: translation_t_last_update_id_29595a128c672fd4_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY translation_translation
    ADD CONSTRAINT translation_t_last_update_id_29595a128c672fd4_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: translation_t_last_update_id_44a0925b99e14d9e_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY translation_translatablelanguage
    ADD CONSTRAINT translation_t_last_update_id_44a0925b99e14d9e_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: waffle_flag__mtpuser_id_4a3f741e2a5aa516_fk_accounts_mtpuser_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY waffle_flag_users
    ADD CONSTRAINT waffle_flag__mtpuser_id_4a3f741e2a5aa516_fk_accounts_mtpuser_id FOREIGN KEY (mtpuser_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: waffle_flag_groups_flag_id_7dbeadc6a7c15bd0_fk_waffle_flag_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY waffle_flag_groups
    ADD CONSTRAINT waffle_flag_groups_flag_id_7dbeadc6a7c15bd0_fk_waffle_flag_id FOREIGN KEY (flag_id) REFERENCES waffle_flag(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: waffle_flag_groups_group_id_2fea66211e3d9a7c_fk_auth_group_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY waffle_flag_groups
    ADD CONSTRAINT waffle_flag_groups_group_id_2fea66211e3d9a7c_fk_auth_group_id FOREIGN KEY (group_id) REFERENCES auth_group(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: waffle_flag_users_flag_id_386c70edcd6d9df8_fk_waffle_flag_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY waffle_flag_users
    ADD CONSTRAINT waffle_flag_users_flag_id_386c70edcd6d9df8_fk_waffle_flag_id FOREIGN KEY (flag_id) REFERENCES waffle_flag(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: wor_activity_type_id_39e716752425616c_fk_django_content_type_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY workshops_workshopstepquestion
    ADD CONSTRAINT wor_activity_type_id_39e716752425616c_fk_django_content_type_id FOREIGN KEY (activity_type_id) REFERENCES django_content_type(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: works_dimension_id_77db8c97dd0ccdd5_fk_assessments_dimension_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY workshops_workshopstepquestion_dimensions
    ADD CONSTRAINT works_dimension_id_77db8c97dd0ccdd5_fk_assessments_dimension_id FOREIGN KEY (dimension_id) REFERENCES assessments_dimension(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: workshops_training_id_4a36c30d5c7a80b6_fk_trainings_training_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY workshops_workshopstepquestion
    ADD CONSTRAINT workshops_training_id_4a36c30d5c7a80b6_fk_trainings_training_id FOREIGN KEY (training_id) REFERENCES trainings_training(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: workshops_wo_first_update_id_47aa3ef4e70d0657_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY workshops_workshopstepquestionanswer
    ADD CONSTRAINT workshops_wo_first_update_id_47aa3ef4e70d0657_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: workshops_wo_first_update_id_7d8c47b0b5dacc3e_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY workshops_workshopstep
    ADD CONSTRAINT workshops_wo_first_update_id_7d8c47b0b5dacc3e_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: workshops_wor_first_update_id_51458d8f97b964d_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY workshops_workshopstepquestionuseranswer
    ADD CONSTRAINT workshops_wor_first_update_id_51458d8f97b964d_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: workshops_wor_last_update_id_19424f4986e88671_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY workshops_workshopstepquestionuseranswer
    ADD CONSTRAINT workshops_wor_last_update_id_19424f4986e88671_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: workshops_wor_last_update_id_1eaf933efe99ec7a_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY workshops_workshopstep
    ADD CONSTRAINT workshops_wor_last_update_id_1eaf933efe99ec7a_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: workshops_wor_last_update_id_4bd2a84fbc07227b_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY workshops_workshopstepquestionanswer
    ADD CONSTRAINT workshops_wor_last_update_id_4bd2a84fbc07227b_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: workshops_works_user_id_76a41909473f2f67_fk_accounts_mtpuser_id; Type: FK CONSTRAINT; Schema: public; Owner: magency
--

ALTER TABLE ONLY workshops_workshopstepquestionuseranswer
    ADD CONSTRAINT workshops_works_user_id_76a41909473f2f67_fk_accounts_mtpuser_id FOREIGN KEY (user_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: public; Type: ACL; Schema: -; Owner: tisaac
--

REVOKE ALL ON SCHEMA public FROM PUBLIC;
REVOKE ALL ON SCHEMA public FROM tisaac;
GRANT ALL ON SCHEMA public TO tisaac;
GRANT ALL ON SCHEMA public TO PUBLIC;


--
-- PostgreSQL database dump complete
--

