--
-- PostgreSQL database dump
--

-- Dumped from database version 9.6.5
-- Dumped by pg_dump version 9.6.5

SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
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: denoixclement
--

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 denoixclement;

--
-- Name: accounts_duplicatedmtpuser; Type: TABLE; Schema: public; Owner: denoixclement
--

CREATE TABLE accounts_duplicatedmtpuser (
    id character varying(36) NOT NULL,
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    date timestamp with time zone NOT NULL,
    duplicate_user_id character varying(36) NOT NULL,
    first_update_id character varying(36),
    last_update_id character varying(36),
    origin_user_id character varying(36) NOT NULL,
    original_user_id character varying(36) NOT NULL
);


ALTER TABLE accounts_duplicatedmtpuser OWNER TO denoixclement;

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

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 denoixclement;

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

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 denoixclement;

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

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 denoixclement;

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

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 denoixclement;

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

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 denoixclement;

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

ALTER SEQUENCE accounts_groupset_mgroups_id_seq OWNED BY accounts_groupset_mgroups.id;


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

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 denoixclement;

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

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,
    created_from character varying(2) NOT NULL,
    has_potential_duplicates boolean NOT NULL
);


ALTER TABLE accounts_mtpuser OWNER TO denoixclement;

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

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 denoixclement;

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

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 denoixclement;

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

ALTER SEQUENCE accounts_mtpuser_groups_id_seq OWNED BY accounts_mtpuser_groups.id;


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

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 denoixclement;

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

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 denoixclement;

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

ALTER SEQUENCE accounts_mtpuser_photos_id_seq OWNED BY accounts_mtpuser_photos.id;


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

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 denoixclement;

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

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 denoixclement;

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

ALTER SEQUENCE accounts_mtpuser_user_permissions_id_seq OWNED BY accounts_mtpuser_user_permissions.id;


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

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 denoixclement;

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

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 denoixclement;

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

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 denoixclement;

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

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 denoixclement;

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

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,
    sync_status character varying(2) NOT NULL,
    sync_trigger_user_id character varying(36),
    CONSTRAINT assessments_certificationprogramuserstatus_score_check CHECK ((score >= 0))
);


ALTER TABLE assessments_certificationprogramuserstatus OWNER TO denoixclement;

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

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 denoixclement;

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

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 denoixclement;

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

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 denoixclement;

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

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 denoixclement;

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

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 denoixclement;

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

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 denoixclement;

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

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 denoixclement;

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

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 denoixclement;

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

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: denoixclement
--

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 denoixclement;

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

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 denoixclement;

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

ALTER SEQUENCE assessments_curriculum_mgroups_id_seq OWNED BY assessments_curriculum_mgroups.id;


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

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 denoixclement;

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

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 denoixclement;

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

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 denoixclement;

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

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 denoixclement;

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

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 denoixclement;

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

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 denoixclement;

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

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 denoixclement;

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

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 denoixclement;

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

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 denoixclement;

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

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 denoixclement;

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

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


ALTER TABLE auth_group OWNER TO denoixclement;

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

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 denoixclement;

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

ALTER SEQUENCE auth_group_id_seq OWNED BY auth_group.id;


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

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 denoixclement;

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

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 denoixclement;

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

ALTER SEQUENCE auth_group_permissions_id_seq OWNED BY auth_group_permissions.id;


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

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 denoixclement;

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

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 denoixclement;

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

ALTER SEQUENCE auth_permission_id_seq OWNED BY auth_permission.id;


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

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,
    name character varying(100) NOT NULL,
    sort_order integer NOT NULL,
    anonymous boolean NOT NULL,
    brainstormer_type character varying(20) NOT NULL,
    description text
);


ALTER TABLE brainstormers_brainstormer OWNER TO denoixclement;

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

CREATE TABLE brainstormers_brainstormerproposition (
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    id character varying(36) NOT NULL,
    text character varying(140) NOT NULL,
    first_update_id character varying(36),
    last_update_id character varying(36),
    user_id character varying(36) NOT NULL,
    sort_order integer NOT NULL,
    created timestamp with time zone NOT NULL,
    modified timestamp with time zone NOT NULL,
    brainstormer_id character varying(36) NOT NULL
);


ALTER TABLE brainstormers_brainstormerproposition OWNER TO denoixclement;

--
-- Name: brainstormers_brainstormerproposition_groups; Type: TABLE; Schema: public; Owner: denoixclement
--

CREATE TABLE brainstormers_brainstormerproposition_groups (
    id integer NOT NULL,
    brainstormerproposition_id character varying(36) NOT NULL,
    brainstormerpropositiongroup_id character varying(36) NOT NULL
);


ALTER TABLE brainstormers_brainstormerproposition_groups OWNER TO denoixclement;

--
-- Name: brainstormers_brainstormerproposition_groups_id_seq; Type: SEQUENCE; Schema: public; Owner: denoixclement
--

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


ALTER TABLE brainstormers_brainstormerproposition_groups_id_seq OWNER TO denoixclement;

--
-- Name: brainstormers_brainstormerproposition_groups_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: denoixclement
--

ALTER SEQUENCE brainstormers_brainstormerproposition_groups_id_seq OWNED BY brainstormers_brainstormerproposition_groups.id;


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

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 denoixclement;

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

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


ALTER TABLE brainstormers_brainstormertemplate OWNER TO denoixclement;

--
-- Name: constance_config; Type: TABLE; Schema: public; Owner: denoixclement
--

CREATE TABLE constance_config (
    id integer NOT NULL,
    key character varying(255) NOT NULL,
    value text NOT NULL
);


ALTER TABLE constance_config OWNER TO denoixclement;

--
-- Name: constance_config_id_seq; Type: SEQUENCE; Schema: public; Owner: denoixclement
--

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


ALTER TABLE constance_config_id_seq OWNER TO denoixclement;

--
-- Name: constance_config_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: denoixclement
--

ALTER SEQUENCE constance_config_id_seq OWNED BY constance_config.id;


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

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 denoixclement;

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

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 denoixclement;

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

ALTER SEQUENCE django_admin_log_id_seq OWNED BY django_admin_log.id;


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

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 denoixclement;

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

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 denoixclement;

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

ALTER SEQUENCE django_content_type_id_seq OWNED BY django_content_type.id;


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

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 denoixclement;

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

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 denoixclement;

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

ALTER SEQUENCE django_migrations_id_seq OWNED BY django_migrations.id;


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

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 denoixclement;

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

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 denoixclement;

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

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 denoixclement;

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

ALTER SEQUENCE django_site_id_seq OWNED BY django_site.id;


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

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 denoixclement;

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

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 denoixclement;

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

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 denoixclement;

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

ALTER SEQUENCE documents_backgroundexecution_auto_mgroups_id_seq OWNED BY documents_backgroundexecution_auto_mgroups.id;


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

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 denoixclement;

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

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 denoixclement;

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

ALTER SEQUENCE documents_backgroundexecution_mgroups_id_seq OWNED BY documents_backgroundexecution_mgroups.id;


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

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 denoixclement;

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

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 denoixclement;

--
-- Name: easy_thumbnails_source; Type: TABLE; Schema: public; Owner: denoixclement
--

CREATE TABLE easy_thumbnails_source (
    id integer NOT NULL,
    storage_hash character varying(40) NOT NULL,
    name character varying(255) NOT NULL,
    modified timestamp with time zone NOT NULL
);


ALTER TABLE easy_thumbnails_source OWNER TO denoixclement;

--
-- Name: easy_thumbnails_source_id_seq; Type: SEQUENCE; Schema: public; Owner: denoixclement
--

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


ALTER TABLE easy_thumbnails_source_id_seq OWNER TO denoixclement;

--
-- Name: easy_thumbnails_source_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: denoixclement
--

ALTER SEQUENCE easy_thumbnails_source_id_seq OWNED BY easy_thumbnails_source.id;


--
-- Name: easy_thumbnails_thumbnail; Type: TABLE; Schema: public; Owner: denoixclement
--

CREATE TABLE easy_thumbnails_thumbnail (
    id integer NOT NULL,
    storage_hash character varying(40) NOT NULL,
    name character varying(255) NOT NULL,
    modified timestamp with time zone NOT NULL,
    source_id integer NOT NULL
);


ALTER TABLE easy_thumbnails_thumbnail OWNER TO denoixclement;

--
-- Name: easy_thumbnails_thumbnail_id_seq; Type: SEQUENCE; Schema: public; Owner: denoixclement
--

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


ALTER TABLE easy_thumbnails_thumbnail_id_seq OWNER TO denoixclement;

--
-- Name: easy_thumbnails_thumbnail_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: denoixclement
--

ALTER SEQUENCE easy_thumbnails_thumbnail_id_seq OWNED BY easy_thumbnails_thumbnail.id;


--
-- Name: easy_thumbnails_thumbnaildimensions; Type: TABLE; Schema: public; Owner: denoixclement
--

CREATE TABLE easy_thumbnails_thumbnaildimensions (
    id integer NOT NULL,
    thumbnail_id integer NOT NULL,
    width integer,
    height integer,
    CONSTRAINT easy_thumbnails_thumbnaildimensions_height_check CHECK ((height >= 0)),
    CONSTRAINT easy_thumbnails_thumbnaildimensions_width_check CHECK ((width >= 0))
);


ALTER TABLE easy_thumbnails_thumbnaildimensions OWNER TO denoixclement;

--
-- Name: easy_thumbnails_thumbnaildimensions_id_seq; Type: SEQUENCE; Schema: public; Owner: denoixclement
--

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


ALTER TABLE easy_thumbnails_thumbnaildimensions_id_seq OWNER TO denoixclement;

--
-- Name: easy_thumbnails_thumbnaildimensions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: denoixclement
--

ALTER SEQUENCE easy_thumbnails_thumbnaildimensions_id_seq OWNED BY easy_thumbnails_thumbnaildimensions.id;


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

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 denoixclement;

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

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


ALTER TABLE evaluations_evaluation OWNER TO denoixclement;

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

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 denoixclement;

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

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 denoixclement;

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

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 denoixclement;

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

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 denoixclement;

--
-- Name: ideas_brainstorming; Type: TABLE; Schema: public; Owner: denoixclement
--

CREATE TABLE ideas_brainstorming (
    trainingactivity_ptr_id character varying(36) NOT NULL,
    is_anonymous boolean NOT NULL
);


ALTER TABLE ideas_brainstorming OWNER TO denoixclement;

--
-- Name: ideas_brainstormingidea; Type: TABLE; Schema: public; Owner: denoixclement
--

CREATE TABLE ideas_brainstormingidea (
    sort_order integer NOT NULL,
    id character varying(36) NOT NULL,
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    created timestamp with time zone NOT NULL,
    modified timestamp with time zone NOT NULL,
    text character varying(80) NOT NULL,
    brainstorming_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),
    session_id character varying(36),
    user_id character varying(36)
);


ALTER TABLE ideas_brainstormingidea OWNER TO denoixclement;

--
-- Name: ideas_brainstormingidea_tags; Type: TABLE; Schema: public; Owner: denoixclement
--

CREATE TABLE ideas_brainstormingidea_tags (
    id integer NOT NULL,
    brainstormingidea_id character varying(36) NOT NULL,
    brainstormingtag_id character varying(36) NOT NULL
);


ALTER TABLE ideas_brainstormingidea_tags OWNER TO denoixclement;

--
-- Name: ideas_brainstormingidea_tags_id_seq; Type: SEQUENCE; Schema: public; Owner: denoixclement
--

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


ALTER TABLE ideas_brainstormingidea_tags_id_seq OWNER TO denoixclement;

--
-- Name: ideas_brainstormingidea_tags_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: denoixclement
--

ALTER SEQUENCE ideas_brainstormingidea_tags_id_seq OWNED BY ideas_brainstormingidea_tags.id;


--
-- Name: ideas_brainstormingtag; Type: TABLE; Schema: public; Owner: denoixclement
--

CREATE TABLE ideas_brainstormingtag (
    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,
    color character varying(30),
    brainstorming_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),
    session_id character varying(36)
);


ALTER TABLE ideas_brainstormingtag OWNER TO denoixclement;

--
-- Name: ideas_questionwall; Type: TABLE; Schema: public; Owner: denoixclement
--

CREATE TABLE ideas_questionwall (
    trainingactivity_ptr_id character varying(36) NOT NULL,
    is_anonymous boolean NOT NULL
);


ALTER TABLE ideas_questionwall OWNER TO denoixclement;

--
-- Name: ideas_questionwallidea; Type: TABLE; Schema: public; Owner: denoixclement
--

CREATE TABLE ideas_questionwallidea (
    sort_order integer NOT NULL,
    id character varying(36) NOT NULL,
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    created timestamp with time zone NOT NULL,
    modified timestamp with time zone NOT NULL,
    text character varying(140) NOT NULL,
    first_update_id character varying(36),
    last_update_id character varying(36),
    questionwall_id character varying(36) NOT NULL,
    session_id character varying(36),
    user_id character varying(36)
);


ALTER TABLE ideas_questionwallidea OWNER TO denoixclement;

--
-- Name: ideas_wordcloud; Type: TABLE; Schema: public; Owner: denoixclement
--

CREATE TABLE ideas_wordcloud (
    trainingactivity_ptr_id character varying(36) NOT NULL,
    is_anonymous boolean NOT NULL
);


ALTER TABLE ideas_wordcloud OWNER TO denoixclement;

--
-- Name: ideas_wordcloudidea; Type: TABLE; Schema: public; Owner: denoixclement
--

CREATE TABLE ideas_wordcloudidea (
    sort_order integer NOT NULL,
    id character varying(36) NOT NULL,
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    created timestamp with time zone NOT NULL,
    modified timestamp with time zone NOT NULL,
    text character varying(30) NOT NULL,
    first_update_id character varying(36),
    last_update_id character varying(36),
    session_id character varying(36),
    user_id character varying(36),
    wordcloud_id character varying(36) NOT NULL
);


ALTER TABLE ideas_wordcloudidea OWNER TO denoixclement;

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

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 character varying(36) 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 denoixclement;

--
-- Name: media_media; Type: TABLE; Schema: public; Owner: denoixclement
--

CREATE TABLE media_media (
    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),
    original_version_id character varying(36),
    parent_version_id character varying(36),
    polymorphic_ctype_id integer
);


ALTER TABLE media_media OWNER TO denoixclement;

--
-- Name: media_note; Type: TABLE; Schema: public; Owner: denoixclement
--

CREATE TABLE media_note (
    id character varying(36) NOT NULL,
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    content text NOT NULL,
    presentation_page smallint,
    first_update_id character varying(36),
    last_update_id character varying(36),
    presentation_id character varying(36),
    training_session_id character varying(36) NOT NULL,
    user_id character varying(36) NOT NULL,
    CONSTRAINT media_note_presentation_page_check CHECK ((presentation_page >= 0))
);


ALTER TABLE media_note OWNER TO denoixclement;

--
-- Name: media_pdfmedia; Type: TABLE; Schema: public; Owner: denoixclement
--

CREATE TABLE media_pdfmedia (
    media_ptr_id character varying(36) NOT NULL,
    file character varying(100) NOT NULL,
    file_hash character varying(36) NOT NULL
);


ALTER TABLE media_pdfmedia OWNER TO denoixclement;

--
-- Name: media_presentation; Type: TABLE; Schema: public; Owner: denoixclement
--

CREATE TABLE media_presentation (
    trainingactivity_ptr_id character varying(36) NOT NULL,
    is_accessible_by_trainees boolean NOT NULL
);


ALTER TABLE media_presentation OWNER TO denoixclement;

--
-- Name: media_presentationmedia; Type: TABLE; Schema: public; Owner: denoixclement
--

CREATE TABLE media_presentationmedia (
    id character varying(36) NOT NULL,
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    is_restricted boolean NOT NULL,
    first_update_id character varying(36),
    last_update_id character varying(36),
    media_id character varying(36) NOT NULL,
    original_version_id character varying(36),
    parent_version_id character varying(36),
    presentation_id character varying(36) NOT NULL
);


ALTER TABLE media_presentationmedia OWNER TO denoixclement;

--
-- Name: media_video; Type: TABLE; Schema: public; Owner: denoixclement
--

CREATE TABLE media_video (
    trainingactivity_ptr_id character varying(36) NOT NULL,
    media_id character varying(36) NOT NULL
);


ALTER TABLE media_video OWNER TO denoixclement;

--
-- Name: media_videomedia; Type: TABLE; Schema: public; Owner: denoixclement
--

CREATE TABLE media_videomedia (
    media_ptr_id character varying(36) NOT NULL,
    file character varying(100) NOT NULL
);


ALTER TABLE media_videomedia OWNER TO denoixclement;

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

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 denoixclement;

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

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_f8b43f57_check CHECK (("group" >= 0))
);


ALTER TABLE metaplans_metaplanproposition OWNER TO denoixclement;

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

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 denoixclement;

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

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 denoixclement;

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

ALTER SEQUENCE oauth2_provider_accesstoken_id_seq OWNED BY oauth2_provider_accesstoken.id;


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

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),
    skip_authorization boolean NOT NULL
);


ALTER TABLE oauth2_provider_application OWNER TO denoixclement;

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

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 denoixclement;

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

ALTER SEQUENCE oauth2_provider_application_id_seq OWNED BY oauth2_provider_application.id;


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

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 denoixclement;

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

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 denoixclement;

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

ALTER SEQUENCE oauth2_provider_grant_id_seq OWNED BY oauth2_provider_grant.id;


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

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 denoixclement;

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

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 denoixclement;

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

ALTER SEQUENCE oauth2_provider_refreshtoken_id_seq OWNED BY oauth2_provider_refreshtoken.id;


--
-- Name: photostories_photo; Type: TABLE; Schema: public; Owner: denoixclement
--

CREATE TABLE photostories_photo (
    sort_order integer NOT NULL,
    id character varying(36) NOT NULL,
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    created timestamp with time zone NOT NULL,
    modified timestamp with time zone NOT NULL,
    image character varying(100) NOT NULL,
    image_hash character varying(64) NOT NULL,
    first_update_id character varying(36),
    last_update_id character varying(36),
    strip_id character varying(36) NOT NULL
);


ALTER TABLE photostories_photo OWNER TO denoixclement;

--
-- Name: photostories_photostory; Type: TABLE; Schema: public; Owner: denoixclement
--

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


ALTER TABLE photostories_photostory OWNER TO denoixclement;

--
-- Name: photostories_strip; Type: TABLE; Schema: public; Owner: denoixclement
--

CREATE TABLE photostories_strip (
    id character varying(36) NOT NULL,
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    created timestamp with time zone NOT NULL,
    modified timestamp with time zone NOT NULL,
    name character varying(150) NOT NULL,
    state character varying(2) NOT NULL,
    first_update_id character varying(36),
    last_update_id character varying(36),
    owner_id character varying(36) NOT NULL,
    photostory_id character varying(36) NOT NULL,
    session_id character varying(36) NOT NULL
);


ALTER TABLE photostories_strip OWNER TO denoixclement;

--
-- Name: pinax_notifications_noticequeuebatch; Type: TABLE; Schema: public; Owner: denoixclement
--

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


ALTER TABLE pinax_notifications_noticequeuebatch OWNER TO denoixclement;

--
-- Name: pinax_notifications_noticequeuebatch_id_seq; Type: SEQUENCE; Schema: public; Owner: denoixclement
--

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


ALTER TABLE pinax_notifications_noticequeuebatch_id_seq OWNER TO denoixclement;

--
-- Name: pinax_notifications_noticequeuebatch_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: denoixclement
--

ALTER SEQUENCE pinax_notifications_noticequeuebatch_id_seq OWNED BY pinax_notifications_noticequeuebatch.id;


--
-- Name: pinax_notifications_noticesetting; Type: TABLE; Schema: public; Owner: denoixclement
--

CREATE TABLE pinax_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 pinax_notifications_noticesetting_scoping_object_id_check CHECK ((scoping_object_id >= 0))
);


ALTER TABLE pinax_notifications_noticesetting OWNER TO denoixclement;

--
-- Name: pinax_notifications_noticesetting_id_seq; Type: SEQUENCE; Schema: public; Owner: denoixclement
--

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


ALTER TABLE pinax_notifications_noticesetting_id_seq OWNER TO denoixclement;

--
-- Name: pinax_notifications_noticesetting_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: denoixclement
--

ALTER SEQUENCE pinax_notifications_noticesetting_id_seq OWNED BY pinax_notifications_noticesetting.id;


--
-- Name: pinax_notifications_noticetype; Type: TABLE; Schema: public; Owner: denoixclement
--

CREATE TABLE pinax_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 pinax_notifications_noticetype OWNER TO denoixclement;

--
-- Name: pinax_notifications_noticetype_id_seq; Type: SEQUENCE; Schema: public; Owner: denoixclement
--

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


ALTER TABLE pinax_notifications_noticetype_id_seq OWNER TO denoixclement;

--
-- Name: pinax_notifications_noticetype_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: denoixclement
--

ALTER SEQUENCE pinax_notifications_noticetype_id_seq OWNED BY pinax_notifications_noticetype.id;


--
-- Name: questionnaires_answer; Type: TABLE; Schema: public; Owner: denoixclement
--

CREATE TABLE questionnaires_answer (
    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),
    polymorphic_ctype_id integer,
    question_id character varying(36) NOT NULL,
    session_id character varying(36) NOT NULL,
    user_id character varying(36) NOT NULL
);


ALTER TABLE questionnaires_answer OWNER TO denoixclement;

--
-- Name: questionnaires_choice; Type: TABLE; Schema: public; Owner: denoixclement
--

CREATE TABLE questionnaires_choice (
    sort_order integer NOT NULL,
    id character varying(36) NOT NULL,
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    label character varying(280) NOT NULL,
    is_valid boolean NOT NULL,
    question_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),
    question_content_type_id integer NOT NULL
);


ALTER TABLE questionnaires_choice OWNER TO denoixclement;

--
-- Name: questionnaires_choicesanswer; Type: TABLE; Schema: public; Owner: denoixclement
--

CREATE TABLE questionnaires_choicesanswer (
    answer_ptr_id character varying(36) NOT NULL
);


ALTER TABLE questionnaires_choicesanswer OWNER TO denoixclement;

--
-- Name: questionnaires_choicesanswer_choices; Type: TABLE; Schema: public; Owner: denoixclement
--

CREATE TABLE questionnaires_choicesanswer_choices (
    id integer NOT NULL,
    choicesanswer_id character varying(36) NOT NULL,
    choice_id character varying(36) NOT NULL
);


ALTER TABLE questionnaires_choicesanswer_choices OWNER TO denoixclement;

--
-- Name: questionnaires_choicesanswer_choices_id_seq; Type: SEQUENCE; Schema: public; Owner: denoixclement
--

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


ALTER TABLE questionnaires_choicesanswer_choices_id_seq OWNER TO denoixclement;

--
-- Name: questionnaires_choicesanswer_choices_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: denoixclement
--

ALTER SEQUENCE questionnaires_choicesanswer_choices_id_seq OWNED BY questionnaires_choicesanswer_choices.id;


--
-- Name: questionnaires_choicesquestion; Type: TABLE; Schema: public; Owner: denoixclement
--

CREATE TABLE questionnaires_choicesquestion (
    question_ptr_id character varying(36) NOT NULL,
    is_multiple_choices boolean NOT NULL
);


ALTER TABLE questionnaires_choicesquestion OWNER TO denoixclement;

--
-- Name: questionnaires_imagechoicesquestion; Type: TABLE; Schema: public; Owner: denoixclement
--

CREATE TABLE questionnaires_imagechoicesquestion (
    question_ptr_id character varying(36) NOT NULL,
    is_multiple_choices boolean NOT NULL,
    image character varying(100) NOT NULL
);


ALTER TABLE questionnaires_imagechoicesquestion OWNER TO denoixclement;

--
-- Name: questionnaires_livepolling; Type: TABLE; Schema: public; Owner: denoixclement
--

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


ALTER TABLE questionnaires_livepolling OWNER TO denoixclement;

--
-- Name: questionnaires_livequiz; Type: TABLE; Schema: public; Owner: denoixclement
--

CREATE TABLE questionnaires_livequiz (
    trainingactivity_ptr_id character varying(36) NOT NULL,
    is_score_displayed boolean NOT NULL
);


ALTER TABLE questionnaires_livequiz OWNER TO denoixclement;

--
-- Name: questionnaires_openanswer; Type: TABLE; Schema: public; Owner: denoixclement
--

CREATE TABLE questionnaires_openanswer (
    answer_ptr_id character varying(36) NOT NULL,
    content text NOT NULL
);


ALTER TABLE questionnaires_openanswer OWNER TO denoixclement;

--
-- Name: questionnaires_openquestion; Type: TABLE; Schema: public; Owner: denoixclement
--

CREATE TABLE questionnaires_openquestion (
    question_ptr_id character varying(36) NOT NULL
);


ALTER TABLE questionnaires_openquestion OWNER TO denoixclement;

--
-- Name: questionnaires_polling; Type: TABLE; Schema: public; Owner: denoixclement
--

CREATE TABLE questionnaires_polling (
    trainingactivity_ptr_id character varying(36) NOT NULL,
    are_questions_mandatory boolean NOT NULL
);


ALTER TABLE questionnaires_polling OWNER TO denoixclement;

--
-- Name: questionnaires_question; Type: TABLE; Schema: public; Owner: denoixclement
--

CREATE TABLE questionnaires_question (
    sort_order integer NOT NULL,
    id character varying(36) NOT NULL,
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    label character varying(280) NOT NULL,
    points smallint NOT NULL,
    questionnaire_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),
    polymorphic_ctype_id integer,
    questionnaire_content_type_id integer NOT NULL,
    CONSTRAINT questionnaires_question_points_check CHECK ((points >= 0))
);


ALTER TABLE questionnaires_question OWNER TO denoixclement;

--
-- Name: questionnaires_quiz; Type: TABLE; Schema: public; Owner: denoixclement
--

CREATE TABLE questionnaires_quiz (
    trainingactivity_ptr_id character varying(36) NOT NULL,
    is_score_displayed boolean NOT NULL,
    are_questions_mandatory boolean NOT NULL,
    is_questions_order_random boolean NOT NULL
);


ALTER TABLE questionnaires_quiz OWNER TO denoixclement;

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

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,
    training_id character varying(36),
    original_version_id character varying(36),
    parent_version_id character varying(36)
);


ALTER TABLE roleplays_criterion OWNER TO denoixclement;

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

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 denoixclement;

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

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 denoixclement;

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

ALTER SEQUENCE roleplays_criterion_dimensions_id_seq OWNED BY roleplays_criterion_dimensions.id;


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

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 denoixclement;

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

CREATE TABLE roleplays_roleplay (
    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 denoixclement;

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

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 denoixclement;

--
-- Name: saba_certificationprogramuserstatusdjangotask; Type: TABLE; Schema: public; Owner: denoixclement
--

CREATE TABLE saba_certificationprogramuserstatusdjangotask (
    djangotask_ptr_id integer NOT NULL,
    certification_id character varying(36) NOT NULL
);


ALTER TABLE saba_certificationprogramuserstatusdjangotask OWNER TO denoixclement;

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

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 denoixclement;

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

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 denoixclement;

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

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 denoixclement;

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

ALTER SEQUENCE surveys_answer_choices_id_seq OWNED BY surveys_answer_choices.id;


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

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 denoixclement;

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

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 denoixclement;

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

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 denoixclement;

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

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 denoixclement;

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

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 denoixclement;

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

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 denoixclement;

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

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 denoixclement;

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

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 denoixclement;

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

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 denoixclement;

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

ALTER SEQUENCE sync_localserverconnection_id_seq OWNED BY sync_localserverconnection.id;


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

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 denoixclement;

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

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 denoixclement;

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

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 denoixclement;

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

ALTER SEQUENCE sync_task_id_seq OWNED BY sync_task.id;


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

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 denoixclement;

--
-- Name: tasks_djangotask; Type: TABLE; Schema: public; Owner: denoixclement
--

CREATE TABLE tasks_djangotask (
    id integer NOT NULL,
    celery_task_id character varying(36) NOT NULL,
    started_at timestamp with time zone NOT NULL,
    finished_at timestamp with time zone,
    user_id character varying(36),
    state character varying(8) NOT NULL
);


ALTER TABLE tasks_djangotask OWNER TO denoixclement;

--
-- Name: tasks_djangotask_id_seq; Type: SEQUENCE; Schema: public; Owner: denoixclement
--

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


ALTER TABLE tasks_djangotask_id_seq OWNER TO denoixclement;

--
-- Name: tasks_djangotask_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: denoixclement
--

ALTER SEQUENCE tasks_djangotask_id_seq OWNED BY tasks_djangotask.id;


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

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,
    favicon character varying(100) NOT NULL,
    reveal_logo character varying(100),
    reveal_logo_hash character varying(64) NOT NULL
);


ALTER TABLE themes_theme OWNER TO denoixclement;

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

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),
    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 denoixclement;

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

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,
    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),
    needs_approval boolean NOT NULL,
    session_id character varying(36),
    library_status_id character varying(36),
    CONSTRAINT chk_training_or_session_or_librarystatus_not_together CHECK ((((training_id IS NOT NULL) AND (session_id IS NULL) AND (library_status_id IS NULL)) OR ((session_id IS NOT NULL) AND (training_id IS NULL) AND (library_status_id IS NULL)) OR ((library_status_id IS NOT NULL) AND (session_id IS NULL) AND (training_id IS NULL)))),
    CONSTRAINT trainings_trainingactivity_weight_check CHECK ((weight >= 0))
);


ALTER TABLE trainings_trainingactivity OWNER TO denoixclement;

--
-- Name: trainings_trainingactivitylibrarystatus; Type: TABLE; Schema: public; Owner: denoixclement
--

CREATE TABLE trainings_trainingactivitylibrarystatus (
    id character varying(36) NOT NULL,
    is_deleted boolean NOT NULL,
    update_locally boolean NOT NULL,
    is_shared boolean NOT NULL,
    first_update_id character varying(36),
    last_update_id character varying(36),
    owner_id character varying(36) NOT NULL
);


ALTER TABLE trainings_trainingactivitylibrarystatus OWNER TO denoixclement;

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

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 denoixclement;

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

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 denoixclement;

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

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 denoixclement;

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

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 denoixclement;

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

ALTER SEQUENCE trainings_trainingsession_users_id_seq OWNED BY trainings_trainingsession_users.id;


--
-- Name: trainings_trainingtask; Type: TABLE; Schema: public; Owner: denoixclement
--

CREATE TABLE trainings_trainingtask (
    djangotask_ptr_id integer NOT NULL,
    task_type smallint NOT NULL,
    training_id character varying(36) NOT NULL,
    created_training_id character varying(36),
    CONSTRAINT trainings_trainingtask_task_type_check CHECK ((task_type >= 0))
);


ALTER TABLE trainings_trainingtask OWNER TO denoixclement;

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

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 denoixclement;

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

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 denoixclement;

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

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 denoixclement;

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

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 denoixclement;

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

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 denoixclement;

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

ALTER SEQUENCE waffle_flag_groups_id_seq OWNED BY waffle_flag_groups.id;


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

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 denoixclement;

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

ALTER SEQUENCE waffle_flag_id_seq OWNED BY waffle_flag.id;


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

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 denoixclement;

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

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 denoixclement;

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

ALTER SEQUENCE waffle_flag_users_id_seq OWNED BY waffle_flag_users.id;


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

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 denoixclement;

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

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 denoixclement;

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

ALTER SEQUENCE waffle_sample_id_seq OWNED BY waffle_sample.id;


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

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 denoixclement;

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

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 denoixclement;

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

ALTER SEQUENCE waffle_switch_id_seq OWNED BY waffle_switch.id;


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

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 denoixclement;

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

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 denoixclement;

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

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


ALTER TABLE workshops_workshopstepimage OWNER TO denoixclement;

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

CREATE TABLE workshops_workshopstepquestion (
    workshopstep_ptr_id character varying(36) NOT NULL,
    activity_id character varying(36),
    is_multiple_choices 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 denoixclement;

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

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 denoixclement;

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

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 denoixclement;

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

ALTER SEQUENCE workshops_workshopstepquestion_dimensions_id_seq OWNED BY workshops_workshopstepquestion_dimensions.id;


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

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 denoixclement;

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

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 denoixclement;

--
-- Name: accounts_groupset_mgroups id; Type: DEFAULT; Schema: public; Owner: denoixclement
--

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


--
-- Name: accounts_mtpuser_groups id; Type: DEFAULT; Schema: public; Owner: denoixclement
--

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


--
-- Name: accounts_mtpuser_photos id; Type: DEFAULT; Schema: public; Owner: denoixclement
--

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


--
-- Name: accounts_mtpuser_user_permissions id; Type: DEFAULT; Schema: public; Owner: denoixclement
--

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


--
-- Name: assessments_curriculum_active_recommendation_levels id; Type: DEFAULT; Schema: public; Owner: denoixclement
--

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


--
-- Name: assessments_curriculum_mgroups id; Type: DEFAULT; Schema: public; Owner: denoixclement
--

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


--
-- Name: auth_group id; Type: DEFAULT; Schema: public; Owner: denoixclement
--

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


--
-- Name: auth_group_permissions id; Type: DEFAULT; Schema: public; Owner: denoixclement
--

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


--
-- Name: auth_permission id; Type: DEFAULT; Schema: public; Owner: denoixclement
--

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


--
-- Name: brainstormers_brainstormerproposition_groups id; Type: DEFAULT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY brainstormers_brainstormerproposition_groups ALTER COLUMN id SET DEFAULT nextval('brainstormers_brainstormerproposition_groups_id_seq'::regclass);


--
-- Name: constance_config id; Type: DEFAULT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY constance_config ALTER COLUMN id SET DEFAULT nextval('constance_config_id_seq'::regclass);


--
-- Name: django_admin_log id; Type: DEFAULT; Schema: public; Owner: denoixclement
--

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


--
-- Name: django_content_type id; Type: DEFAULT; Schema: public; Owner: denoixclement
--

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


--
-- Name: django_migrations id; Type: DEFAULT; Schema: public; Owner: denoixclement
--

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


--
-- Name: django_site id; Type: DEFAULT; Schema: public; Owner: denoixclement
--

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


--
-- Name: documents_backgroundexecution_auto_mgroups id; Type: DEFAULT; Schema: public; Owner: denoixclement
--

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


--
-- Name: documents_backgroundexecution_mgroups id; Type: DEFAULT; Schema: public; Owner: denoixclement
--

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


--
-- Name: easy_thumbnails_source id; Type: DEFAULT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY easy_thumbnails_source ALTER COLUMN id SET DEFAULT nextval('easy_thumbnails_source_id_seq'::regclass);


--
-- Name: easy_thumbnails_thumbnail id; Type: DEFAULT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY easy_thumbnails_thumbnail ALTER COLUMN id SET DEFAULT nextval('easy_thumbnails_thumbnail_id_seq'::regclass);


--
-- Name: easy_thumbnails_thumbnaildimensions id; Type: DEFAULT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY easy_thumbnails_thumbnaildimensions ALTER COLUMN id SET DEFAULT nextval('easy_thumbnails_thumbnaildimensions_id_seq'::regclass);


--
-- Name: ideas_brainstormingidea_tags id; Type: DEFAULT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY ideas_brainstormingidea_tags ALTER COLUMN id SET DEFAULT nextval('ideas_brainstormingidea_tags_id_seq'::regclass);


--
-- Name: oauth2_provider_accesstoken id; Type: DEFAULT; Schema: public; Owner: denoixclement
--

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


--
-- Name: oauth2_provider_application id; Type: DEFAULT; Schema: public; Owner: denoixclement
--

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


--
-- Name: oauth2_provider_grant id; Type: DEFAULT; Schema: public; Owner: denoixclement
--

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


--
-- Name: oauth2_provider_refreshtoken id; Type: DEFAULT; Schema: public; Owner: denoixclement
--

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


--
-- Name: pinax_notifications_noticequeuebatch id; Type: DEFAULT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY pinax_notifications_noticequeuebatch ALTER COLUMN id SET DEFAULT nextval('pinax_notifications_noticequeuebatch_id_seq'::regclass);


--
-- Name: pinax_notifications_noticesetting id; Type: DEFAULT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY pinax_notifications_noticesetting ALTER COLUMN id SET DEFAULT nextval('pinax_notifications_noticesetting_id_seq'::regclass);


--
-- Name: pinax_notifications_noticetype id; Type: DEFAULT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY pinax_notifications_noticetype ALTER COLUMN id SET DEFAULT nextval('pinax_notifications_noticetype_id_seq'::regclass);


--
-- Name: questionnaires_choicesanswer_choices id; Type: DEFAULT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY questionnaires_choicesanswer_choices ALTER COLUMN id SET DEFAULT nextval('questionnaires_choicesanswer_choices_id_seq'::regclass);


--
-- Name: roleplays_criterion_dimensions id; Type: DEFAULT; Schema: public; Owner: denoixclement
--

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


--
-- Name: surveys_answer_choices id; Type: DEFAULT; Schema: public; Owner: denoixclement
--

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


--
-- Name: sync_localserverconnection id; Type: DEFAULT; Schema: public; Owner: denoixclement
--

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


--
-- Name: sync_task id; Type: DEFAULT; Schema: public; Owner: denoixclement
--

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


--
-- Name: tasks_djangotask id; Type: DEFAULT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY tasks_djangotask ALTER COLUMN id SET DEFAULT nextval('tasks_djangotask_id_seq'::regclass);


--
-- Name: trainings_trainingsession_users id; Type: DEFAULT; Schema: public; Owner: denoixclement
--

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


--
-- Name: waffle_flag id; Type: DEFAULT; Schema: public; Owner: denoixclement
--

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


--
-- Name: waffle_flag_groups id; Type: DEFAULT; Schema: public; Owner: denoixclement
--

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


--
-- Name: waffle_flag_users id; Type: DEFAULT; Schema: public; Owner: denoixclement
--

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


--
-- Name: waffle_sample id; Type: DEFAULT; Schema: public; Owner: denoixclement
--

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


--
-- Name: waffle_switch id; Type: DEFAULT; Schema: public; Owner: denoixclement
--

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


--
-- Name: workshops_workshopstepquestion_dimensions id; Type: DEFAULT; Schema: public; Owner: denoixclement
--

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


--
-- Name: accounts_avatar accounts_avatar_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: accounts_duplicatedmtpuser accounts_duplicatedmtpuser_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY accounts_duplicatedmtpuser
    ADD CONSTRAINT accounts_duplicatedmtpuser_pkey PRIMARY KEY (id);


--
-- Name: accounts_group accounts_group_name_type_id_b1b8adde_uniq; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: accounts_group accounts_group_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: accounts_grouprole accounts_grouprole_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: accounts_grouprole accounts_grouprole_user_id_group_id_f1d2c01f_uniq; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: accounts_groupset_mgroups accounts_groupset_mgroups_groupset_id_group_id_f587d6df_uniq; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: accounts_groupset_mgroups accounts_groupset_mgroups_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: accounts_groupset accounts_groupset_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: accounts_grouptype accounts_grouptype_name_key; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: accounts_grouptype accounts_grouptype_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: accounts_mtpuser_groups accounts_mtpuser_groups_mtpuser_id_group_id_e1e681cf_uniq; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: accounts_mtpuser_groups accounts_mtpuser_groups_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: accounts_mtpuser_photos accounts_mtpuser_photos_mtpuser_id_avatar_id_e54d2794_uniq; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: accounts_mtpuser_photos accounts_mtpuser_photos_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: accounts_mtpuser accounts_mtpuser_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: accounts_mtpuser_user_permissions accounts_mtpuser_user_pe_mtpuser_id_permission_id_7d6143ac_uniq; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: accounts_mtpuser_user_permissions accounts_mtpuser_user_permissions_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: accounts_mtpuser accounts_mtpuser_username_key; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: assessments_assessableactivitypartuserscore assessments_assessableac_user_id_session_id_activ_57202f95_uniq; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_assessableactivitypartuserscore
    ADD CONSTRAINT assessments_assessableac_user_id_session_id_activ_57202f95_uniq UNIQUE (user_id, session_id, activity_part_id, activity_part_type_id);


--
-- Name: assessments_assessableactivitypartuserscore assessments_assessableactivitypartuserscore_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: assessments_assessableactivityuserscore assessments_assessableactivityuserscore_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: assessments_certificationcompetencythreshold assessments_certificationcompetencythreshold_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: assessments_certificationprogram assessments_certificationprogram_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: assessments_certificationprogram assessments_certificationprogram_tree_id_0f89a1b1_uniq; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: assessments_certificationprogramuserstatus assessments_certificationprogramuserstatus_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: assessments_certificationstatus assessments_certificationstatus_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: assessments_competency assessments_competency_code_tree_id_0b0408f9_uniq; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: assessments_competency assessments_competency_name_tree_id_276ede72_uniq; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: assessments_competency assessments_competency_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: assessments_competencytree assessments_competencytree_job_profile_id_key; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: assessments_competencytree assessments_competencytree_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: assessments_competencytreeuserscore assessments_competencytreeuserscore_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: assessments_competencyuserscore assessments_competencyuserscore_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: assessments_curriculum_active_recommendation_levels assessments_curriculum_a_curriculum_id_recommenda_e5448410_uniq; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: assessments_curriculum_active_recommendation_levels assessments_curriculum_active_recommendation_levels_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: assessments_curriculum_mgroups assessments_curriculum_m_curriculum_id_group_id_0605bdee_uniq; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: assessments_curriculum_mgroups assessments_curriculum_mgroups_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: assessments_curriculum assessments_curriculum_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: assessments_dimension assessments_dimension_code_competency_id_f15e34e1_uniq; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: assessments_dimension assessments_dimension_name_competency_id_c5598973_uniq; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: assessments_dimension assessments_dimension_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: assessments_dimensiontrainingweight assessments_dimensiontrainingweight_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: assessments_dimensionuserscore assessments_dimensionuserscore_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: assessments_lesson assessments_lesson_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: assessments_lessondimensionweight assessments_lessondimensionweight_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: assessments_lessonrecommendationthreshold assessments_lessonrecommendationthreshold_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: assessments_lessonreference assessments_lessonreference_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: assessments_recommendationlevel assessments_recommendationlevel_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: assessments_topic assessments_topic_curriculum_id_name_59751dbf_uniq; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: assessments_topic assessments_topic_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: assessments_userlessonrecommendation assessments_userlessonrecommendation_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: auth_group auth_group_name_key; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: auth_group_permissions auth_group_permissions_group_id_permission_id_0cd325b0_uniq; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: auth_group_permissions auth_group_permissions_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: auth_group auth_group_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: auth_permission auth_permission_content_type_id_codename_01ab375a_uniq; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: auth_permission auth_permission_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: brainstormers_brainstormerproposition_groups brainstormers_brainstorm_brainstormerproposition__0b1be6d0_uniq; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY brainstormers_brainstormerproposition_groups
    ADD CONSTRAINT brainstormers_brainstorm_brainstormerproposition__0b1be6d0_uniq UNIQUE (brainstormerproposition_id, brainstormerpropositiongroup_id);


--
-- Name: brainstormers_brainstormer brainstormers_brainstormer_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: brainstormers_brainstormerproposition_groups brainstormers_brainstormerproposition_groups_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY brainstormers_brainstormerproposition_groups
    ADD CONSTRAINT brainstormers_brainstormerproposition_groups_pkey PRIMARY KEY (id);


--
-- Name: brainstormers_brainstormerproposition brainstormers_brainstormerproposition_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: brainstormers_brainstormerpropositiongroup brainstormers_brainstormerpropositiongroup_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: brainstormers_brainstormertemplate brainstormers_brainstormertemplate_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: constance_config constance_config_key_key; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY constance_config
    ADD CONSTRAINT constance_config_key_key UNIQUE (key);


--
-- Name: constance_config constance_config_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY constance_config
    ADD CONSTRAINT constance_config_pkey PRIMARY KEY (id);


--
-- Name: django_admin_log django_admin_log_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: django_content_type django_content_type_app_label_model_76bd3d3b_uniq; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: django_content_type django_content_type_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: django_migrations django_migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: django_session django_session_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: django_site django_site_domain_a2e37b91_uniq; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY django_site
    ADD CONSTRAINT django_site_domain_a2e37b91_uniq UNIQUE (domain);


--
-- Name: django_site django_site_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: documents_backgroundexecution_mgroups documents_backgroundexec_backgroundexecution_id_g_9d3a6e9a_uniq; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: documents_backgroundexecution_auto_mgroups documents_backgroundexec_backgroundexecution_id_g_b59225ac_uniq; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: documents_backgroundexecution_auto_mgroups documents_backgroundexecution_auto_mgroups_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: documents_backgroundexecution_mgroups documents_backgroundexecution_mgroups_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: documents_backgroundexecution documents_backgroundexecution_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: documents_document documents_document_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: documents_note documents_note_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: easy_thumbnails_source easy_thumbnails_source_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY easy_thumbnails_source
    ADD CONSTRAINT easy_thumbnails_source_pkey PRIMARY KEY (id);


--
-- Name: easy_thumbnails_source easy_thumbnails_source_storage_hash_name_481ce32d_uniq; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY easy_thumbnails_source
    ADD CONSTRAINT easy_thumbnails_source_storage_hash_name_481ce32d_uniq UNIQUE (storage_hash, name);


--
-- Name: easy_thumbnails_thumbnail easy_thumbnails_thumbnai_storage_hash_name_source_fb375270_uniq; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY easy_thumbnails_thumbnail
    ADD CONSTRAINT easy_thumbnails_thumbnai_storage_hash_name_source_fb375270_uniq UNIQUE (storage_hash, name, source_id);


--
-- Name: easy_thumbnails_thumbnail easy_thumbnails_thumbnail_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY easy_thumbnails_thumbnail
    ADD CONSTRAINT easy_thumbnails_thumbnail_pkey PRIMARY KEY (id);


--
-- Name: easy_thumbnails_thumbnaildimensions easy_thumbnails_thumbnaildimensions_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY easy_thumbnails_thumbnaildimensions
    ADD CONSTRAINT easy_thumbnails_thumbnaildimensions_pkey PRIMARY KEY (id);


--
-- Name: easy_thumbnails_thumbnaildimensions easy_thumbnails_thumbnaildimensions_thumbnail_id_key; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY easy_thumbnails_thumbnaildimensions
    ADD CONSTRAINT easy_thumbnails_thumbnaildimensions_thumbnail_id_key UNIQUE (thumbnail_id);


--
-- Name: evaluations_criterion evaluations_criterion_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: evaluations_criterion evaluations_criterion_sort_order_exercise_id_6d04a182_uniq; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY evaluations_criterion
    ADD CONSTRAINT evaluations_criterion_sort_order_exercise_id_6d04a182_uniq UNIQUE (sort_order, exercise_id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: evaluations_criterion evaluations_criterion_sort_order_id_key; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY evaluations_criterion
    ADD CONSTRAINT evaluations_criterion_sort_order_id_key UNIQUE (sort_order, exercise_id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: evaluations_evaluation evaluations_evaluation_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: evaluations_evaluationgrouppermission evaluations_evaluationgr_group_id_permission_eval_d3faa38d_uniq; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: evaluations_evaluationgrouppermission evaluations_evaluationgrouppermission_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: evaluations_exercise evaluations_exercise_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: evaluations_exercise evaluations_exercise_sort_order_evaluation_id_632a3633_uniq; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY evaluations_exercise
    ADD CONSTRAINT evaluations_exercise_sort_order_evaluation_id_632a3633_uniq UNIQUE (sort_order, evaluation_id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: evaluations_exercise evaluations_exercise_sort_order_id_key; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY evaluations_exercise
    ADD CONSTRAINT evaluations_exercise_sort_order_id_key UNIQUE (sort_order, evaluation_id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: evaluations_rating evaluations_rating_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: eventlog_eventlog eventlog_eventlog_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: ideas_brainstorming ideas_brainstorming_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY ideas_brainstorming
    ADD CONSTRAINT ideas_brainstorming_pkey PRIMARY KEY (trainingactivity_ptr_id);


--
-- Name: ideas_brainstormingidea_tags ideas_brainstormingidea__brainstormingidea_id_bra_a090bcc3_uniq; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY ideas_brainstormingidea_tags
    ADD CONSTRAINT ideas_brainstormingidea__brainstormingidea_id_bra_a090bcc3_uniq UNIQUE (brainstormingidea_id, brainstormingtag_id);


--
-- Name: ideas_brainstormingidea ideas_brainstormingidea_brainstorming_id_session_083532b0_uniq; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY ideas_brainstormingidea
    ADD CONSTRAINT ideas_brainstormingidea_brainstorming_id_session_083532b0_uniq UNIQUE (brainstorming_id, session_id, sort_order) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: ideas_brainstormingidea ideas_brainstormingidea_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY ideas_brainstormingidea
    ADD CONSTRAINT ideas_brainstormingidea_pkey PRIMARY KEY (id);


--
-- Name: ideas_brainstormingidea_tags ideas_brainstormingidea_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY ideas_brainstormingidea_tags
    ADD CONSTRAINT ideas_brainstormingidea_tags_pkey PRIMARY KEY (id);


--
-- Name: ideas_brainstormingtag ideas_brainstormingtag_brainstorming_id_session_db02aa84_uniq; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY ideas_brainstormingtag
    ADD CONSTRAINT ideas_brainstormingtag_brainstorming_id_session_db02aa84_uniq UNIQUE (brainstorming_id, session_id, sort_order) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: ideas_brainstormingtag ideas_brainstormingtag_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY ideas_brainstormingtag
    ADD CONSTRAINT ideas_brainstormingtag_pkey PRIMARY KEY (id);


--
-- Name: ideas_questionwall ideas_questionwall_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY ideas_questionwall
    ADD CONSTRAINT ideas_questionwall_pkey PRIMARY KEY (trainingactivity_ptr_id);


--
-- Name: ideas_questionwallidea ideas_questionwallidea_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY ideas_questionwallidea
    ADD CONSTRAINT ideas_questionwallidea_pkey PRIMARY KEY (id);


--
-- Name: ideas_questionwallidea ideas_questionwallidea_questionwall_id_session__1fb4c63f_uniq; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY ideas_questionwallidea
    ADD CONSTRAINT ideas_questionwallidea_questionwall_id_session__1fb4c63f_uniq UNIQUE (questionwall_id, session_id, sort_order) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: ideas_wordcloud ideas_wordcloud_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY ideas_wordcloud
    ADD CONSTRAINT ideas_wordcloud_pkey PRIMARY KEY (trainingactivity_ptr_id);


--
-- Name: ideas_wordcloudidea ideas_wordcloudidea_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY ideas_wordcloudidea
    ADD CONSTRAINT ideas_wordcloudidea_pkey PRIMARY KEY (id);


--
-- Name: ideas_wordcloudidea ideas_wordcloudidea_wordcloud_id_session_id__14186980_uniq; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY ideas_wordcloudidea
    ADD CONSTRAINT ideas_wordcloudidea_wordcloud_id_session_id__14186980_uniq UNIQUE (wordcloud_id, session_id, sort_order) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: likes_like likes_like_author_id_content_type_id_object_uuid_79e3ff71_uniq; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: likes_like likes_like_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: media_media media_media_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY media_media
    ADD CONSTRAINT media_media_pkey PRIMARY KEY (id);


--
-- Name: media_note media_note_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY media_note
    ADD CONSTRAINT media_note_pkey PRIMARY KEY (id);


--
-- Name: media_note media_note_training_session_id_user_ec54308d_uniq; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY media_note
    ADD CONSTRAINT media_note_training_session_id_user_ec54308d_uniq UNIQUE (training_session_id, user_id, presentation_id, presentation_page);


--
-- Name: media_pdfmedia media_pdfmedia_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY media_pdfmedia
    ADD CONSTRAINT media_pdfmedia_pkey PRIMARY KEY (media_ptr_id);


--
-- Name: media_presentation media_presentation_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY media_presentation
    ADD CONSTRAINT media_presentation_pkey PRIMARY KEY (trainingactivity_ptr_id);


--
-- Name: media_presentationmedia media_presentationmedia_media_id_6efc6068_uniq; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY media_presentationmedia
    ADD CONSTRAINT media_presentationmedia_media_id_6efc6068_uniq UNIQUE (media_id);


--
-- Name: media_presentationmedia media_presentationmedia_media_id_presentation_id_f2b15e69_uniq; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY media_presentationmedia
    ADD CONSTRAINT media_presentationmedia_media_id_presentation_id_f2b15e69_uniq UNIQUE (media_id, presentation_id, is_restricted);


--
-- Name: media_presentationmedia media_presentationmedia_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY media_presentationmedia
    ADD CONSTRAINT media_presentationmedia_pkey PRIMARY KEY (id);


--
-- Name: media_video media_video_media_id_d03aec64_uniq; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY media_video
    ADD CONSTRAINT media_video_media_id_d03aec64_uniq UNIQUE (media_id);


--
-- Name: media_video media_video_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY media_video
    ADD CONSTRAINT media_video_pkey PRIMARY KEY (trainingactivity_ptr_id);


--
-- Name: media_videomedia media_videomedia_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY media_videomedia
    ADD CONSTRAINT media_videomedia_pkey PRIMARY KEY (media_ptr_id);


--
-- Name: metaplans_metaplan metaplans_metaplan_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: metaplans_metaplanproposition metaplans_metaplanproposition_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: oauth2_provider_accesstoken oauth2_provider_accesstoken_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: oauth2_provider_accesstoken oauth2_provider_accesstoken_token_8af090f8_uniq; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY oauth2_provider_accesstoken
    ADD CONSTRAINT oauth2_provider_accesstoken_token_8af090f8_uniq UNIQUE (token);


--
-- Name: oauth2_provider_application oauth2_provider_application_client_id_key; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: oauth2_provider_application oauth2_provider_application_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: oauth2_provider_grant oauth2_provider_grant_code_49ab4ddf_uniq; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY oauth2_provider_grant
    ADD CONSTRAINT oauth2_provider_grant_code_49ab4ddf_uniq UNIQUE (code);


--
-- Name: oauth2_provider_grant oauth2_provider_grant_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: oauth2_provider_refreshtoken oauth2_provider_refreshtoken_access_token_id_key; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: oauth2_provider_refreshtoken oauth2_provider_refreshtoken_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: oauth2_provider_refreshtoken oauth2_provider_refreshtoken_token_d090daa4_uniq; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY oauth2_provider_refreshtoken
    ADD CONSTRAINT oauth2_provider_refreshtoken_token_d090daa4_uniq UNIQUE (token);


--
-- Name: photostories_photo photostories_photo_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY photostories_photo
    ADD CONSTRAINT photostories_photo_pkey PRIMARY KEY (id);


--
-- Name: photostories_photostory photostories_photostory_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY photostories_photostory
    ADD CONSTRAINT photostories_photostory_pkey PRIMARY KEY (trainingactivity_ptr_id);


--
-- Name: photostories_strip photostories_strip_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY photostories_strip
    ADD CONSTRAINT photostories_strip_pkey PRIMARY KEY (id);


--
-- Name: pinax_notifications_noticesetting pinax_notifications_noti_user_id_notice_type_id_m_8ff3acc3_uniq; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY pinax_notifications_noticesetting
    ADD CONSTRAINT pinax_notifications_noti_user_id_notice_type_id_m_8ff3acc3_uniq UNIQUE (user_id, notice_type_id, medium, scoping_content_type_id, scoping_object_id);


--
-- Name: pinax_notifications_noticequeuebatch pinax_notifications_noticequeuebatch_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY pinax_notifications_noticequeuebatch
    ADD CONSTRAINT pinax_notifications_noticequeuebatch_pkey PRIMARY KEY (id);


--
-- Name: pinax_notifications_noticesetting pinax_notifications_noticesetting_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY pinax_notifications_noticesetting
    ADD CONSTRAINT pinax_notifications_noticesetting_pkey PRIMARY KEY (id);


--
-- Name: pinax_notifications_noticetype pinax_notifications_noticetype_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY pinax_notifications_noticetype
    ADD CONSTRAINT pinax_notifications_noticetype_pkey PRIMARY KEY (id);


--
-- Name: questionnaires_answer questionnaires_answer_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY questionnaires_answer
    ADD CONSTRAINT questionnaires_answer_pkey PRIMARY KEY (id);


--
-- Name: questionnaires_answer questionnaires_answer_user_id_session_id_quest_fa3f7851_uniq; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY questionnaires_answer
    ADD CONSTRAINT questionnaires_answer_user_id_session_id_quest_fa3f7851_uniq UNIQUE (user_id, session_id, question_id);


--
-- Name: questionnaires_choice questionnaires_choice_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY questionnaires_choice
    ADD CONSTRAINT questionnaires_choice_pkey PRIMARY KEY (id);


--
-- Name: questionnaires_choice questionnaires_choice_question_id_question_con_dfd6d11c_uniq; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY questionnaires_choice
    ADD CONSTRAINT questionnaires_choice_question_id_question_con_dfd6d11c_uniq UNIQUE (question_id, question_content_type_id, sort_order) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: questionnaires_choicesanswer_choices questionnaires_choicesan_choicesanswer_id_choice__4b17c8fb_uniq; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY questionnaires_choicesanswer_choices
    ADD CONSTRAINT questionnaires_choicesan_choicesanswer_id_choice__4b17c8fb_uniq UNIQUE (choicesanswer_id, choice_id);


--
-- Name: questionnaires_choicesanswer_choices questionnaires_choicesanswer_choices_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY questionnaires_choicesanswer_choices
    ADD CONSTRAINT questionnaires_choicesanswer_choices_pkey PRIMARY KEY (id);


--
-- Name: questionnaires_choicesanswer questionnaires_choicesanswer_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY questionnaires_choicesanswer
    ADD CONSTRAINT questionnaires_choicesanswer_pkey PRIMARY KEY (answer_ptr_id);


--
-- Name: questionnaires_choicesquestion questionnaires_choicesquestion_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY questionnaires_choicesquestion
    ADD CONSTRAINT questionnaires_choicesquestion_pkey PRIMARY KEY (question_ptr_id);


--
-- Name: questionnaires_imagechoicesquestion questionnaires_imagechoicesquestion_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY questionnaires_imagechoicesquestion
    ADD CONSTRAINT questionnaires_imagechoicesquestion_pkey PRIMARY KEY (question_ptr_id);


--
-- Name: questionnaires_livepolling questionnaires_livepolling_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY questionnaires_livepolling
    ADD CONSTRAINT questionnaires_livepolling_pkey PRIMARY KEY (trainingactivity_ptr_id);


--
-- Name: questionnaires_livequiz questionnaires_livequiz_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY questionnaires_livequiz
    ADD CONSTRAINT questionnaires_livequiz_pkey PRIMARY KEY (trainingactivity_ptr_id);


--
-- Name: questionnaires_openanswer questionnaires_openanswer_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY questionnaires_openanswer
    ADD CONSTRAINT questionnaires_openanswer_pkey PRIMARY KEY (answer_ptr_id);


--
-- Name: questionnaires_openquestion questionnaires_openquestion_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY questionnaires_openquestion
    ADD CONSTRAINT questionnaires_openquestion_pkey PRIMARY KEY (question_ptr_id);


--
-- Name: questionnaires_polling questionnaires_polling_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY questionnaires_polling
    ADD CONSTRAINT questionnaires_polling_pkey PRIMARY KEY (trainingactivity_ptr_id);


--
-- Name: questionnaires_question questionnaires_question_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY questionnaires_question
    ADD CONSTRAINT questionnaires_question_pkey PRIMARY KEY (id);


--
-- Name: questionnaires_question questionnaires_question_questionnaire_id_questio_fbd1d760_uniq; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY questionnaires_question
    ADD CONSTRAINT questionnaires_question_questionnaire_id_questio_fbd1d760_uniq UNIQUE (questionnaire_id, questionnaire_content_type_id, sort_order) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: questionnaires_quiz questionnaires_quiz_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY questionnaires_quiz
    ADD CONSTRAINT questionnaires_quiz_pkey PRIMARY KEY (trainingactivity_ptr_id);


--
-- Name: roleplays_criterion_dimensions roleplays_criterion_dime_criterion_id_dimension_i_fc3fb08a_uniq; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: roleplays_criterion_dimensions roleplays_criterion_dimensions_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: roleplays_criterion roleplays_criterion_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: roleplays_criterion roleplays_criterion_sort_order_step_id_7fdc3d0d_uniq; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: roleplays_rating roleplays_rating_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: roleplays_roleplay roleplays_roleplay_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: roleplays_step roleplays_step_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: roleplays_step roleplays_step_sort_order_roleplay_id_4da1d5bf_uniq; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: saba_certificationprogramuserstatusdjangotask saba_certificationprogramuserstatusdjangotask_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY saba_certificationprogramuserstatusdjangotask
    ADD CONSTRAINT saba_certificationprogramuserstatusdjangotask_pkey PRIMARY KEY (djangotask_ptr_id);


--
-- Name: surveys_answer_choices surveys_answer_choices_answer_id_choice_id_57fbf5db_uniq; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: surveys_answer_choices surveys_answer_choices_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: surveys_answer surveys_answer_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: surveys_choice surveys_choice_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: surveys_pool surveys_pool_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: surveys_question surveys_question_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: surveys_survey surveys_survey_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: surveys_survey surveys_survey_training_id_trainer_id_3bb5ed67_uniq; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: surveys_surveypool surveys_surveypool_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: surveys_surveypool surveys_surveypool_survey_id_pool_id_6d2a31b5_uniq; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: sync_clientversion sync_clientversion_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: sync_localserver sync_localserver_mac_key; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: sync_localserver sync_localserver_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: sync_localserverconnection sync_localserverconnection_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: sync_serverversion sync_serverversion_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: sync_task sync_task_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: sync_update sync_update_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: tasks_djangotask tasks_djangotask_celery_task_id_key; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY tasks_djangotask
    ADD CONSTRAINT tasks_djangotask_celery_task_id_key UNIQUE (celery_task_id);


--
-- Name: tasks_djangotask tasks_djangotask_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY tasks_djangotask
    ADD CONSTRAINT tasks_djangotask_pkey PRIMARY KEY (id);


--
-- Name: themes_theme themes_theme_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: trainings_training trainings_training_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: trainings_trainingactivity trainings_trainingactivi_sort_order_training_id_s_99b2a4b6_uniq; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: trainings_trainingactivity trainings_trainingactivity_library_status_id_key; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY trainings_trainingactivity
    ADD CONSTRAINT trainings_trainingactivity_library_status_id_key UNIQUE (library_status_id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: trainings_trainingactivity trainings_trainingactivity_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: trainings_trainingactivitylibrarystatus trainings_trainingactivitylibrarystatus_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY trainings_trainingactivitylibrarystatus
    ADD CONSTRAINT trainings_trainingactivitylibrarystatus_pkey PRIMARY KEY (id);


--
-- Name: trainings_trainingclientoptions trainings_trainingclientoptions_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: trainings_trainingclientoptions trainings_trainingclientoptions_training_id_key; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: trainings_trainingsession_users trainings_trainingsessio_trainingsession_id_mtpus_abb0a9dd_uniq; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: trainings_trainingsession trainings_trainingsession_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: trainings_trainingsession trainings_trainingsession_token_key; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: trainings_trainingsession_users trainings_trainingsession_users_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: trainings_trainingtask trainings_trainingtask_created_training_id_key; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY trainings_trainingtask
    ADD CONSTRAINT trainings_trainingtask_created_training_id_key UNIQUE (created_training_id);


--
-- Name: trainings_trainingtask trainings_trainingtask_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY trainings_trainingtask
    ADD CONSTRAINT trainings_trainingtask_pkey PRIMARY KEY (djangotask_ptr_id);


--
-- Name: translation_translatablelanguage translation_translatablelanguage_language_key; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: translation_translatablelanguage translation_translatablelanguage_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: translation_translation translation_translation_language_domain_98ddae54_uniq; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: translation_translation translation_translation_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: waffle_flag_groups waffle_flag_groups_flag_id_group_id_8ba0c71b_uniq; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: waffle_flag_groups waffle_flag_groups_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: waffle_flag waffle_flag_name_key; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: waffle_flag waffle_flag_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: waffle_flag_users waffle_flag_users_flag_id_mtpuser_id_3ae852e6_uniq; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: waffle_flag_users waffle_flag_users_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: waffle_sample waffle_sample_name_key; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: waffle_sample waffle_sample_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: waffle_switch waffle_switch_name_key; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: waffle_switch waffle_switch_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: workshops_workshop workshops_workshop_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: workshops_workshopstep workshops_workshopstep_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: workshops_workshopstep workshops_workshopstep_sort_order_workshop_id_d6751fb1_uniq; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: workshops_workshopstepimage workshops_workshopstepimage_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: workshops_workshopstepquestionanswer workshops_workshopstepqu_sort_order_question_id_b0d32deb_uniq; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: workshops_workshopstepquestionuseranswer workshops_workshopstepqu_user_id_answer_id_traini_35324b36_uniq; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY workshops_workshopstepquestionuseranswer
    ADD CONSTRAINT workshops_workshopstepqu_user_id_answer_id_traini_35324b36_uniq UNIQUE (user_id, answer_id, training_session_id, question_id);


--
-- Name: workshops_workshopstepquestion_dimensions workshops_workshopstepqu_workshopstepquestion_id__2b4ac55b_uniq; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: workshops_workshopstepquestion_dimensions workshops_workshopstepquestion_dimensions_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: workshops_workshopstepquestion workshops_workshopstepquestion_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: workshops_workshopstepquestionanswer workshops_workshopstepquestionanswer_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: workshops_workshopstepquestionuseranswer workshops_workshopstepquestionuseranswer_pkey; Type: CONSTRAINT; Schema: public; Owner: denoixclement
--

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


--
-- Name: accounts_avatar_first_update_id_8c7b508d; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX accounts_avatar_first_update_id_8c7b508d ON accounts_avatar USING btree (first_update_id);


--
-- Name: accounts_avatar_last_update_id_fb78cd7e; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX accounts_avatar_last_update_id_fb78cd7e ON accounts_avatar USING btree (last_update_id);


--
-- Name: accounts_duplicatedmtpuser_duplicate_user_id_8e640241; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX accounts_duplicatedmtpuser_duplicate_user_id_8e640241 ON accounts_duplicatedmtpuser USING btree (duplicate_user_id);


--
-- Name: accounts_duplicatedmtpuser_first_update_id_74474fc6; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX accounts_duplicatedmtpuser_first_update_id_74474fc6 ON accounts_duplicatedmtpuser USING btree (first_update_id);


--
-- Name: accounts_duplicatedmtpuser_last_update_id_0e94b644; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX accounts_duplicatedmtpuser_last_update_id_0e94b644 ON accounts_duplicatedmtpuser USING btree (last_update_id);


--
-- Name: accounts_duplicatedmtpuser_origin_user_id_a02eec79; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX accounts_duplicatedmtpuser_origin_user_id_a02eec79 ON accounts_duplicatedmtpuser USING btree (origin_user_id);


--
-- Name: accounts_duplicatedmtpuser_original_user_id_4f5856b3; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX accounts_duplicatedmtpuser_original_user_id_4f5856b3 ON accounts_duplicatedmtpuser USING btree (original_user_id);


--
-- Name: accounts_group_first_update_id_6373b459; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX accounts_group_first_update_id_6373b459 ON accounts_group USING btree (first_update_id);


--
-- Name: accounts_group_last_update_id_bd1db3b3; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX accounts_group_last_update_id_bd1db3b3 ON accounts_group USING btree (last_update_id);


--
-- Name: accounts_group_parent_id_08d19d04; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX accounts_group_parent_id_08d19d04 ON accounts_group USING btree (parent_id);


--
-- Name: accounts_group_type_id_d35c7bfd; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX accounts_group_type_id_d35c7bfd ON accounts_group USING btree (type_id);


--
-- Name: accounts_grouprole_first_update_id_ee2eb774; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX accounts_grouprole_first_update_id_ee2eb774 ON accounts_grouprole USING btree (first_update_id);


--
-- Name: accounts_grouprole_group_id_508d3345; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX accounts_grouprole_group_id_508d3345 ON accounts_grouprole USING btree (group_id);


--
-- Name: accounts_grouprole_last_update_id_65d9ae5e; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX accounts_grouprole_last_update_id_65d9ae5e ON accounts_grouprole USING btree (last_update_id);


--
-- Name: accounts_grouprole_user_id_9508a7a7; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX accounts_grouprole_user_id_9508a7a7 ON accounts_grouprole USING btree (user_id);


--
-- Name: accounts_groupset_first_update_id_3d8e011f; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX accounts_groupset_first_update_id_3d8e011f ON accounts_groupset USING btree (first_update_id);


--
-- Name: accounts_groupset_last_update_id_91bc5749; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX accounts_groupset_last_update_id_91bc5749 ON accounts_groupset USING btree (last_update_id);


--
-- Name: accounts_groupset_mgroups_group_id_54b51137; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX accounts_groupset_mgroups_group_id_54b51137 ON accounts_groupset_mgroups USING btree (group_id);


--
-- Name: accounts_groupset_mgroups_groupset_id_c1592f2c; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX accounts_groupset_mgroups_groupset_id_c1592f2c ON accounts_groupset_mgroups USING btree (groupset_id);


--
-- Name: accounts_grouptype_first_update_id_b70bd515; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX accounts_grouptype_first_update_id_b70bd515 ON accounts_grouptype USING btree (first_update_id);


--
-- Name: accounts_grouptype_last_update_id_1cc359a6; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX accounts_grouptype_last_update_id_1cc359a6 ON accounts_grouptype USING btree (last_update_id);


--
-- Name: accounts_grouptype_name_ec5ee3e0_like; Type: INDEX; Schema: public; Owner: denoixclement
--

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


--
-- Name: accounts_mtpuser_first_update_id_63d6daa4; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX accounts_mtpuser_first_update_id_63d6daa4 ON accounts_mtpuser USING btree (first_update_id);


--
-- Name: accounts_mtpuser_groups_group_id_55bda1e5; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX accounts_mtpuser_groups_group_id_55bda1e5 ON accounts_mtpuser_groups USING btree (group_id);


--
-- Name: accounts_mtpuser_groups_mtpuser_id_b0293661; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX accounts_mtpuser_groups_mtpuser_id_b0293661 ON accounts_mtpuser_groups USING btree (mtpuser_id);


--
-- Name: accounts_mtpuser_last_update_id_2bd2e8b5; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX accounts_mtpuser_last_update_id_2bd2e8b5 ON accounts_mtpuser USING btree (last_update_id);


--
-- Name: accounts_mtpuser_photo_id_577b2faf; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX accounts_mtpuser_photo_id_577b2faf ON accounts_mtpuser USING btree (photo_id);


--
-- Name: accounts_mtpuser_photos_avatar_id_9e328181; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX accounts_mtpuser_photos_avatar_id_9e328181 ON accounts_mtpuser_photos USING btree (avatar_id);


--
-- Name: accounts_mtpuser_photos_mtpuser_id_a1cb7dd7; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX accounts_mtpuser_photos_mtpuser_id_a1cb7dd7 ON accounts_mtpuser_photos USING btree (mtpuser_id);


--
-- Name: accounts_mtpuser_user_permissions_mtpuser_id_ef8fa2e7; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX accounts_mtpuser_user_permissions_mtpuser_id_ef8fa2e7 ON accounts_mtpuser_user_permissions USING btree (mtpuser_id);


--
-- Name: accounts_mtpuser_user_permissions_permission_id_55868375; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX accounts_mtpuser_user_permissions_permission_id_55868375 ON accounts_mtpuser_user_permissions USING btree (permission_id);


--
-- Name: accounts_mtpuser_username_3acf8fdb_like; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX accounts_mtpuser_username_3acf8fdb_like ON accounts_mtpuser USING btree (username varchar_pattern_ops);


--
-- Name: assessments_assessableacti_activity_part_type_id_5ffa4faf; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_assessableacti_activity_part_type_id_5ffa4faf ON assessments_assessableactivitypartuserscore USING btree (activity_part_type_id);


--
-- Name: assessments_assessableacti_activity_type_id_f3e14b2c; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_assessableacti_activity_type_id_f3e14b2c ON assessments_assessableactivityuserscore USING btree (activity_type_id);


--
-- Name: assessments_assessableacti_first_update_id_79ef3127; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_assessableacti_first_update_id_79ef3127 ON assessments_assessableactivitypartuserscore USING btree (first_update_id);


--
-- Name: assessments_assessableacti_last_update_id_ffba358f; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_assessableacti_last_update_id_ffba358f ON assessments_assessableactivitypartuserscore USING btree (last_update_id);


--
-- Name: assessments_assessableactivitypartuserscore_session_id_892e0b28; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_assessableactivitypartuserscore_session_id_892e0b28 ON assessments_assessableactivitypartuserscore USING btree (session_id);


--
-- Name: assessments_assessableactivitypartuserscore_user_id_df8d09c4; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_assessableactivitypartuserscore_user_id_df8d09c4 ON assessments_assessableactivitypartuserscore USING btree (user_id);


--
-- Name: assessments_assessableactivityuserscore_session_id_3f3c6b9a; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_assessableactivityuserscore_session_id_3f3c6b9a ON assessments_assessableactivityuserscore USING btree (session_id);


--
-- Name: assessments_assessableactivityuserscore_user_id_01ae90eb; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_assessableactivityuserscore_user_id_01ae90eb ON assessments_assessableactivityuserscore USING btree (user_id);


--
-- Name: assessments_certificationc_competency_id_5344b642; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_certificationc_competency_id_5344b642 ON assessments_certificationcompetencythreshold USING btree (competency_id);


--
-- Name: assessments_certificationc_first_update_id_787b32ba; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_certificationc_first_update_id_787b32ba ON assessments_certificationcompetencythreshold USING btree (first_update_id);


--
-- Name: assessments_certificationc_last_update_id_ebb199f3; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_certificationc_last_update_id_ebb199f3 ON assessments_certificationcompetencythreshold USING btree (last_update_id);


--
-- Name: assessments_certificationcompetencythreshold_status_id_27d344ba; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_certificationcompetencythreshold_status_id_27d344ba ON assessments_certificationcompetencythreshold USING btree (status_id);


--
-- Name: assessments_certificationp_first_update_id_1fb5e7fe; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_certificationp_first_update_id_1fb5e7fe ON assessments_certificationprogramuserstatus USING btree (first_update_id);


--
-- Name: assessments_certificationp_last_update_id_436753c6; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_certificationp_last_update_id_436753c6 ON assessments_certificationprogramuserstatus USING btree (last_update_id);


--
-- Name: assessments_certificationp_sync_trigger_user_id_d0c9beb3; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_certificationp_sync_trigger_user_id_d0c9beb3 ON assessments_certificationprogramuserstatus USING btree (sync_trigger_user_id);


--
-- Name: assessments_certificationprogram_first_update_id_69bcc23b; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_certificationprogram_first_update_id_69bcc23b ON assessments_certificationprogram USING btree (first_update_id);


--
-- Name: assessments_certificationprogram_last_update_id_746dc56f; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_certificationprogram_last_update_id_746dc56f ON assessments_certificationprogram USING btree (last_update_id);


--
-- Name: assessments_certificationprogramuserstatus_program_id_1cc810a1; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_certificationprogramuserstatus_program_id_1cc810a1 ON assessments_certificationprogramuserstatus USING btree (program_id);


--
-- Name: assessments_certificationprogramuserstatus_session_id_bfa99f55; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_certificationprogramuserstatus_session_id_bfa99f55 ON assessments_certificationprogramuserstatus USING btree (session_id);


--
-- Name: assessments_certificationprogramuserstatus_status_id_ccca99f4; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_certificationprogramuserstatus_status_id_ccca99f4 ON assessments_certificationprogramuserstatus USING btree (status_id);


--
-- Name: assessments_certificationprogramuserstatus_user_id_cfae472a; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_certificationprogramuserstatus_user_id_cfae472a ON assessments_certificationprogramuserstatus USING btree (user_id);


--
-- Name: assessments_certificationstatus_first_update_id_9a66342a; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_certificationstatus_first_update_id_9a66342a ON assessments_certificationstatus USING btree (first_update_id);


--
-- Name: assessments_certificationstatus_last_update_id_73eef193; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_certificationstatus_last_update_id_73eef193 ON assessments_certificationstatus USING btree (last_update_id);


--
-- Name: assessments_certificationstatus_program_id_c2594c80; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_certificationstatus_program_id_c2594c80 ON assessments_certificationstatus USING btree (program_id);


--
-- Name: assessments_competency_first_update_id_16efeb4e; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_competency_first_update_id_16efeb4e ON assessments_competency USING btree (first_update_id);


--
-- Name: assessments_competency_last_update_id_107c824e; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_competency_last_update_id_107c824e ON assessments_competency USING btree (last_update_id);


--
-- Name: assessments_competency_original_version_id_524be0eb; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_competency_original_version_id_524be0eb ON assessments_competency USING btree (original_version_id);


--
-- Name: assessments_competency_parent_version_id_d5a2afa0; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_competency_parent_version_id_d5a2afa0 ON assessments_competency USING btree (parent_version_id);


--
-- Name: assessments_competency_sort_order_8b8ea8d9; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_competency_sort_order_8b8ea8d9 ON assessments_competency USING btree (sort_order);


--
-- Name: assessments_competency_tree_id_a6007bb4; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_competency_tree_id_a6007bb4 ON assessments_competency USING btree (tree_id);


--
-- Name: assessments_competencytree_first_update_id_b0eca5ae; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_competencytree_first_update_id_b0eca5ae ON assessments_competencytree USING btree (first_update_id);


--
-- Name: assessments_competencytree_group_id_00024468; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_competencytree_group_id_00024468 ON assessments_competencytree USING btree (group_id);


--
-- Name: assessments_competencytree_last_update_id_8f617aaa; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_competencytree_last_update_id_8f617aaa ON assessments_competencytree USING btree (last_update_id);


--
-- Name: assessments_competencytree_original_version_id_d7d974bf; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_competencytree_original_version_id_d7d974bf ON assessments_competencytree USING btree (original_version_id);


--
-- Name: assessments_competencytree_parent_version_id_eb6851a1; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_competencytree_parent_version_id_eb6851a1 ON assessments_competencytree USING btree (parent_version_id);


--
-- Name: assessments_competencytree_version_state_5c923223; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_competencytree_version_state_5c923223 ON assessments_competencytree USING btree (version_state);


--
-- Name: assessments_competencytree_version_state_5c923223_like; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_competencytree_version_state_5c923223_like ON assessments_competencytree USING btree (version_state varchar_pattern_ops);


--
-- Name: assessments_competencytreeuserscore_session_id_b4f89be0; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_competencytreeuserscore_session_id_b4f89be0 ON assessments_competencytreeuserscore USING btree (session_id);


--
-- Name: assessments_competencytreeuserscore_tree_id_d7cc8b46; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_competencytreeuserscore_tree_id_d7cc8b46 ON assessments_competencytreeuserscore USING btree (tree_id);


--
-- Name: assessments_competencytreeuserscore_user_id_b9b1eb5f; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_competencytreeuserscore_user_id_b9b1eb5f ON assessments_competencytreeuserscore USING btree (user_id);


--
-- Name: assessments_competencyuserscore_competency_id_29692b57; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_competencyuserscore_competency_id_29692b57 ON assessments_competencyuserscore USING btree (competency_id);


--
-- Name: assessments_competencyuserscore_session_id_f3e11562; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_competencyuserscore_session_id_f3e11562 ON assessments_competencyuserscore USING btree (session_id);


--
-- Name: assessments_competencyuserscore_user_id_2de5d336; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_competencyuserscore_user_id_2de5d336 ON assessments_competencyuserscore USING btree (user_id);


--
-- Name: assessments_curriculum_act_curriculum_id_dc82863b; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_curriculum_act_curriculum_id_dc82863b ON assessments_curriculum_active_recommendation_levels USING btree (curriculum_id);


--
-- Name: assessments_curriculum_act_recommendationlevel_id_1701fb88; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_curriculum_act_recommendationlevel_id_1701fb88 ON assessments_curriculum_active_recommendation_levels USING btree (recommendationlevel_id);


--
-- Name: assessments_curriculum_business_unit_id_bc4d029a; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_curriculum_business_unit_id_bc4d029a ON assessments_curriculum USING btree (business_unit_id);


--
-- Name: assessments_curriculum_first_update_id_471eea47; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_curriculum_first_update_id_471eea47 ON assessments_curriculum USING btree (first_update_id);


--
-- Name: assessments_curriculum_job_profile_id_57890b86; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_curriculum_job_profile_id_57890b86 ON assessments_curriculum USING btree (job_profile_id);


--
-- Name: assessments_curriculum_last_update_id_56d077ca; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_curriculum_last_update_id_56d077ca ON assessments_curriculum USING btree (last_update_id);


--
-- Name: assessments_curriculum_mgroups_curriculum_id_c519f8da; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_curriculum_mgroups_curriculum_id_c519f8da ON assessments_curriculum_mgroups USING btree (curriculum_id);


--
-- Name: assessments_curriculum_mgroups_group_id_26bd75df; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_curriculum_mgroups_group_id_26bd75df ON assessments_curriculum_mgroups USING btree (group_id);


--
-- Name: assessments_dimension_competency_id_038aa967; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_dimension_competency_id_038aa967 ON assessments_dimension USING btree (competency_id);


--
-- Name: assessments_dimension_first_update_id_bf90e60c; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_dimension_first_update_id_bf90e60c ON assessments_dimension USING btree (first_update_id);


--
-- Name: assessments_dimension_last_update_id_0223ed8b; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_dimension_last_update_id_0223ed8b ON assessments_dimension USING btree (last_update_id);


--
-- Name: assessments_dimension_original_version_id_d1299eca; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_dimension_original_version_id_d1299eca ON assessments_dimension USING btree (original_version_id);


--
-- Name: assessments_dimension_parent_version_id_f45c702c; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_dimension_parent_version_id_f45c702c ON assessments_dimension USING btree (parent_version_id);


--
-- Name: assessments_dimension_sort_order_aba0e0d7; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_dimension_sort_order_aba0e0d7 ON assessments_dimension USING btree (sort_order);


--
-- Name: assessments_dimensiontrainingweight_dimension_id_f432fa06; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_dimensiontrainingweight_dimension_id_f432fa06 ON assessments_dimensiontrainingweight USING btree (dimension_id);


--
-- Name: assessments_dimensiontrainingweight_first_update_id_1f69b2b5; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_dimensiontrainingweight_first_update_id_1f69b2b5 ON assessments_dimensiontrainingweight USING btree (first_update_id);


--
-- Name: assessments_dimensiontrainingweight_last_update_id_71ba01be; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_dimensiontrainingweight_last_update_id_71ba01be ON assessments_dimensiontrainingweight USING btree (last_update_id);


--
-- Name: assessments_dimensiontrainingweight_training_id_e0fde316; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_dimensiontrainingweight_training_id_e0fde316 ON assessments_dimensiontrainingweight USING btree (training_id);


--
-- Name: assessments_dimensionuserscore_dimension_id_a167227f; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_dimensionuserscore_dimension_id_a167227f ON assessments_dimensionuserscore USING btree (dimension_id);


--
-- Name: assessments_dimensionuserscore_session_id_dfed6cc1; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_dimensionuserscore_session_id_dfed6cc1 ON assessments_dimensionuserscore USING btree (session_id);


--
-- Name: assessments_dimensionuserscore_user_id_8db5191f; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_dimensionuserscore_user_id_8db5191f ON assessments_dimensionuserscore USING btree (user_id);


--
-- Name: assessments_lesson_curriculum_id_bb465669; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_lesson_curriculum_id_bb465669 ON assessments_lesson USING btree (curriculum_id);


--
-- Name: assessments_lesson_first_update_id_8926d418; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_lesson_first_update_id_8926d418 ON assessments_lesson USING btree (first_update_id);


--
-- Name: assessments_lesson_last_update_id_ea5074dd; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_lesson_last_update_id_ea5074dd ON assessments_lesson USING btree (last_update_id);


--
-- Name: assessments_lesson_reference_id_54be8114; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_lesson_reference_id_54be8114 ON assessments_lesson USING btree (reference_id);


--
-- Name: assessments_lesson_sort_order_fb298cf7; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_lesson_sort_order_fb298cf7 ON assessments_lesson USING btree (sort_order);


--
-- Name: assessments_lesson_topic_id_bd604f9a; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_lesson_topic_id_bd604f9a ON assessments_lesson USING btree (topic_id);


--
-- Name: assessments_lessondimensionweight_dimension_id_6a036a2e; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_lessondimensionweight_dimension_id_6a036a2e ON assessments_lessondimensionweight USING btree (dimension_id);


--
-- Name: assessments_lessondimensionweight_first_update_id_01779482; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_lessondimensionweight_first_update_id_01779482 ON assessments_lessondimensionweight USING btree (first_update_id);


--
-- Name: assessments_lessondimensionweight_last_update_id_09ca827e; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_lessondimensionweight_last_update_id_09ca827e ON assessments_lessondimensionweight USING btree (last_update_id);


--
-- Name: assessments_lessondimensionweight_lesson_id_3a783b70; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_lessondimensionweight_lesson_id_3a783b70 ON assessments_lessondimensionweight USING btree (lesson_id);


--
-- Name: assessments_lessonrecommen_first_update_id_d8d97e1d; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_lessonrecommen_first_update_id_d8d97e1d ON assessments_lessonrecommendationthreshold USING btree (first_update_id);


--
-- Name: assessments_lessonrecommen_last_update_id_660a50ec; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_lessonrecommen_last_update_id_660a50ec ON assessments_lessonrecommendationthreshold USING btree (last_update_id);


--
-- Name: assessments_lessonrecommendationthreshold_lesson_id_3df78b8c; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_lessonrecommendationthreshold_lesson_id_3df78b8c ON assessments_lessonrecommendationthreshold USING btree (lesson_id);


--
-- Name: assessments_lessonrecommendationthreshold_level_id_8dae5a29; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_lessonrecommendationthreshold_level_id_8dae5a29 ON assessments_lessonrecommendationthreshold USING btree (level_id);


--
-- Name: assessments_lessonreference_first_update_id_cc82b24f; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_lessonreference_first_update_id_cc82b24f ON assessments_lessonreference USING btree (first_update_id);


--
-- Name: assessments_lessonreference_last_update_id_1375900e; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_lessonreference_last_update_id_1375900e ON assessments_lessonreference USING btree (last_update_id);


--
-- Name: assessments_recommendationlevel_first_update_id_e7bb626d; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_recommendationlevel_first_update_id_e7bb626d ON assessments_recommendationlevel USING btree (first_update_id);


--
-- Name: assessments_recommendationlevel_last_update_id_8ced75f7; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_recommendationlevel_last_update_id_8ced75f7 ON assessments_recommendationlevel USING btree (last_update_id);


--
-- Name: assessments_recommendationlevel_sort_order_356d9554; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_recommendationlevel_sort_order_356d9554 ON assessments_recommendationlevel USING btree (sort_order);


--
-- Name: assessments_topic_curriculum_id_32e18fa6; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_topic_curriculum_id_32e18fa6 ON assessments_topic USING btree (curriculum_id);


--
-- Name: assessments_topic_first_update_id_2dbbd2be; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_topic_first_update_id_2dbbd2be ON assessments_topic USING btree (first_update_id);


--
-- Name: assessments_topic_last_update_id_43473037; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_topic_last_update_id_43473037 ON assessments_topic USING btree (last_update_id);


--
-- Name: assessments_topic_sort_order_ebc29133; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_topic_sort_order_ebc29133 ON assessments_topic USING btree (sort_order);


--
-- Name: assessments_userlessonrecommendation_certification_id_dd4140a0; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_userlessonrecommendation_certification_id_dd4140a0 ON assessments_userlessonrecommendation USING btree (certification_id);


--
-- Name: assessments_userlessonrecommendation_first_update_id_978bd29e; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_userlessonrecommendation_first_update_id_978bd29e ON assessments_userlessonrecommendation USING btree (first_update_id);


--
-- Name: assessments_userlessonrecommendation_last_update_id_d0902664; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_userlessonrecommendation_last_update_id_d0902664 ON assessments_userlessonrecommendation USING btree (last_update_id);


--
-- Name: assessments_userlessonrecommendation_lesson_id_e234db55; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_userlessonrecommendation_lesson_id_e234db55 ON assessments_userlessonrecommendation USING btree (lesson_id);


--
-- Name: assessments_userlessonrecommendation_level_id_8a774d26; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX assessments_userlessonrecommendation_level_id_8a774d26 ON assessments_userlessonrecommendation USING btree (level_id);


--
-- Name: auth_group_name_a6ea08ec_like; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX auth_group_name_a6ea08ec_like ON auth_group USING btree (name varchar_pattern_ops);


--
-- Name: auth_group_permissions_group_id_b120cbf9; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX auth_group_permissions_group_id_b120cbf9 ON auth_group_permissions USING btree (group_id);


--
-- Name: auth_group_permissions_permission_id_84c5c92e; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX auth_group_permissions_permission_id_84c5c92e ON auth_group_permissions USING btree (permission_id);


--
-- Name: auth_permission_content_type_id_2f476e4b; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX auth_permission_content_type_id_2f476e4b ON auth_permission USING btree (content_type_id);


--
-- Name: brainstormers_brainstormer_brainstormer_id_05e5a3f2; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX brainstormers_brainstormer_brainstormer_id_05e5a3f2 ON brainstormers_brainstormerpropositiongroup USING btree (brainstormer_id);


--
-- Name: brainstormers_brainstormer_brainstormerproposition_id_624aa184; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX brainstormers_brainstormer_brainstormerproposition_id_624aa184 ON brainstormers_brainstormerproposition_groups USING btree (brainstormerproposition_id);


--
-- Name: brainstormers_brainstormer_brainstormerpropositiongro_05473ce6; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX brainstormers_brainstormer_brainstormerpropositiongro_05473ce6 ON brainstormers_brainstormerproposition_groups USING btree (brainstormerpropositiongroup_id);


--
-- Name: brainstormers_brainstormer_first_update_id_28c04abf; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX brainstormers_brainstormer_first_update_id_28c04abf ON brainstormers_brainstormer USING btree (first_update_id);


--
-- Name: brainstormers_brainstormer_first_update_id_d533eaf3; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX brainstormers_brainstormer_first_update_id_d533eaf3 ON brainstormers_brainstormerpropositiongroup USING btree (first_update_id);


--
-- Name: brainstormers_brainstormer_last_update_id_07f02d10; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX brainstormers_brainstormer_last_update_id_07f02d10 ON brainstormers_brainstormerpropositiongroup USING btree (last_update_id);


--
-- Name: brainstormers_brainstormer_last_update_id_e0119d39; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX brainstormers_brainstormer_last_update_id_e0119d39 ON brainstormers_brainstormer USING btree (last_update_id);


--
-- Name: brainstormers_brainstormer_sort_order_88c52774; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX brainstormers_brainstormer_sort_order_88c52774 ON brainstormers_brainstormer USING btree (sort_order);


--
-- Name: brainstormers_brainstormer_training_session_id_a94321d2; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX brainstormers_brainstormer_training_session_id_a94321d2 ON brainstormers_brainstormer USING btree (session_id);


--
-- Name: brainstormers_brainstormerproposition_brainstormer_id_c8f3d742; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX brainstormers_brainstormerproposition_brainstormer_id_c8f3d742 ON brainstormers_brainstormerproposition USING btree (brainstormer_id);


--
-- Name: brainstormers_brainstormerproposition_first_update_id_df91c09d; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX brainstormers_brainstormerproposition_first_update_id_df91c09d ON brainstormers_brainstormerproposition USING btree (first_update_id);


--
-- Name: brainstormers_brainstormerproposition_last_update_id_ffbe3c9e; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX brainstormers_brainstormerproposition_last_update_id_ffbe3c9e ON brainstormers_brainstormerproposition USING btree (last_update_id);


--
-- Name: brainstormers_brainstormerproposition_sort_order_95636f0f; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX brainstormers_brainstormerproposition_sort_order_95636f0f ON brainstormers_brainstormerproposition USING btree (sort_order);


--
-- Name: brainstormers_brainstormerproposition_user_id_b6da9ff9; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX brainstormers_brainstormerproposition_user_id_b6da9ff9 ON brainstormers_brainstormerproposition USING btree (user_id);


--
-- Name: brainstormers_brainstormerpropositiongroup_sort_order_d01d247c; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX brainstormers_brainstormerpropositiongroup_sort_order_d01d247c ON brainstormers_brainstormerpropositiongroup USING btree (sort_order);


--
-- Name: constance_config_key_baef3136_like; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX constance_config_key_baef3136_like ON constance_config USING btree (key varchar_pattern_ops);


--
-- Name: django_admin_log_content_type_id_c4bce8eb; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX django_admin_log_content_type_id_c4bce8eb ON django_admin_log USING btree (content_type_id);


--
-- Name: django_admin_log_user_id_c564eba6; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX django_admin_log_user_id_c564eba6 ON django_admin_log USING btree (user_id);


--
-- Name: django_session_expire_date_a5c62663; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX django_session_expire_date_a5c62663 ON django_session USING btree (expire_date);


--
-- Name: django_session_session_key_c0390e0f_like; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX django_session_session_key_c0390e0f_like ON django_session USING btree (session_key varchar_pattern_ops);


--
-- Name: django_site_domain_a2e37b91_like; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX django_site_domain_a2e37b91_like ON django_site USING btree (domain varchar_pattern_ops);


--
-- Name: documents_backgroundexecut_backgroundexecution_id_c4d9740d; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX documents_backgroundexecut_backgroundexecution_id_c4d9740d ON documents_backgroundexecution_mgroups USING btree (backgroundexecution_id);


--
-- Name: documents_backgroundexecut_backgroundexecution_id_dc8663f4; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX documents_backgroundexecut_backgroundexecution_id_dc8663f4 ON documents_backgroundexecution_auto_mgroups USING btree (backgroundexecution_id);


--
-- Name: documents_backgroundexecution_auto_mgroups_group_id_84209833; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX documents_backgroundexecution_auto_mgroups_group_id_84209833 ON documents_backgroundexecution_auto_mgroups USING btree (group_id);


--
-- Name: documents_backgroundexecution_document_id_eb42ed04; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX documents_backgroundexecution_document_id_eb42ed04 ON documents_backgroundexecution USING btree (document_id);


--
-- Name: documents_backgroundexecution_first_update_id_67a033bd; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX documents_backgroundexecution_first_update_id_67a033bd ON documents_backgroundexecution USING btree (first_update_id);


--
-- Name: documents_backgroundexecution_last_update_id_00417dc7; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX documents_backgroundexecution_last_update_id_00417dc7 ON documents_backgroundexecution USING btree (last_update_id);


--
-- Name: documents_backgroundexecution_mgroups_group_id_20e53e1e; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX documents_backgroundexecution_mgroups_group_id_20e53e1e ON documents_backgroundexecution_mgroups USING btree (group_id);


--
-- Name: documents_note_document_id_ef90a624; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX documents_note_document_id_ef90a624 ON documents_note USING btree (document_id);


--
-- Name: documents_note_first_update_id_b961d41e; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX documents_note_first_update_id_b961d41e ON documents_note USING btree (first_update_id);


--
-- Name: documents_note_last_update_id_11d6a051; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX documents_note_last_update_id_11d6a051 ON documents_note USING btree (last_update_id);


--
-- Name: documents_note_training_session_id_ca15e06b; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX documents_note_training_session_id_ca15e06b ON documents_note USING btree (session_id);


--
-- Name: documents_note_user_id_cab59bae; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX documents_note_user_id_cab59bae ON documents_note USING btree (user_id);


--
-- Name: easy_thumbnails_source_name_5fe0edc6; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX easy_thumbnails_source_name_5fe0edc6 ON easy_thumbnails_source USING btree (name);


--
-- Name: easy_thumbnails_source_name_5fe0edc6_like; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX easy_thumbnails_source_name_5fe0edc6_like ON easy_thumbnails_source USING btree (name varchar_pattern_ops);


--
-- Name: easy_thumbnails_source_storage_hash_946cbcc9; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX easy_thumbnails_source_storage_hash_946cbcc9 ON easy_thumbnails_source USING btree (storage_hash);


--
-- Name: easy_thumbnails_source_storage_hash_946cbcc9_like; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX easy_thumbnails_source_storage_hash_946cbcc9_like ON easy_thumbnails_source USING btree (storage_hash varchar_pattern_ops);


--
-- Name: easy_thumbnails_thumbnail_name_b5882c31; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX easy_thumbnails_thumbnail_name_b5882c31 ON easy_thumbnails_thumbnail USING btree (name);


--
-- Name: easy_thumbnails_thumbnail_name_b5882c31_like; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX easy_thumbnails_thumbnail_name_b5882c31_like ON easy_thumbnails_thumbnail USING btree (name varchar_pattern_ops);


--
-- Name: easy_thumbnails_thumbnail_source_id_5b57bc77; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX easy_thumbnails_thumbnail_source_id_5b57bc77 ON easy_thumbnails_thumbnail USING btree (source_id);


--
-- Name: easy_thumbnails_thumbnail_storage_hash_f1435f49; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX easy_thumbnails_thumbnail_storage_hash_f1435f49 ON easy_thumbnails_thumbnail USING btree (storage_hash);


--
-- Name: easy_thumbnails_thumbnail_storage_hash_f1435f49_like; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX easy_thumbnails_thumbnail_storage_hash_f1435f49_like ON easy_thumbnails_thumbnail USING btree (storage_hash varchar_pattern_ops);


--
-- Name: evaluations_criterion_exercise_id_ee84b308; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX evaluations_criterion_exercise_id_ee84b308 ON evaluations_criterion USING btree (exercise_id);


--
-- Name: evaluations_criterion_first_update_id_5ada29ce; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX evaluations_criterion_first_update_id_5ada29ce ON evaluations_criterion USING btree (first_update_id);


--
-- Name: evaluations_criterion_last_update_id_e483ed86; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX evaluations_criterion_last_update_id_e483ed86 ON evaluations_criterion USING btree (last_update_id);


--
-- Name: evaluations_criterion_original_version_id_7cc338f0; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX evaluations_criterion_original_version_id_7cc338f0 ON evaluations_criterion USING btree (original_version_id);


--
-- Name: evaluations_criterion_parent_version_id_20db0827; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX evaluations_criterion_parent_version_id_20db0827 ON evaluations_criterion USING btree (parent_version_id);


--
-- Name: evaluations_criterion_sort_order_518ca681; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX evaluations_criterion_sort_order_518ca681 ON evaluations_criterion USING btree (sort_order);


--
-- Name: evaluations_evaluationgrouppermission_evaluation_id_594c7758; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX evaluations_evaluationgrouppermission_evaluation_id_594c7758 ON evaluations_evaluationgrouppermission USING btree (evaluation_id);


--
-- Name: evaluations_evaluationgrouppermission_first_update_id_9d256d94; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX evaluations_evaluationgrouppermission_first_update_id_9d256d94 ON evaluations_evaluationgrouppermission USING btree (first_update_id);


--
-- Name: evaluations_evaluationgrouppermission_group_id_23e6ee9d; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX evaluations_evaluationgrouppermission_group_id_23e6ee9d ON evaluations_evaluationgrouppermission USING btree (group_id);


--
-- Name: evaluations_evaluationgrouppermission_last_update_id_d341d1ec; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX evaluations_evaluationgrouppermission_last_update_id_d341d1ec ON evaluations_evaluationgrouppermission USING btree (last_update_id);


--
-- Name: evaluations_exercise_evaluation_id_6ca8d9e3; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX evaluations_exercise_evaluation_id_6ca8d9e3 ON evaluations_exercise USING btree (evaluation_id);


--
-- Name: evaluations_exercise_first_update_id_8b0fb3b5; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX evaluations_exercise_first_update_id_8b0fb3b5 ON evaluations_exercise USING btree (first_update_id);


--
-- Name: evaluations_exercise_last_update_id_5eb3276e; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX evaluations_exercise_last_update_id_5eb3276e ON evaluations_exercise USING btree (last_update_id);


--
-- Name: evaluations_exercise_original_version_id_9ad9b365; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX evaluations_exercise_original_version_id_9ad9b365 ON evaluations_exercise USING btree (original_version_id);


--
-- Name: evaluations_exercise_parent_version_id_72c3e4ac; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX evaluations_exercise_parent_version_id_72c3e4ac ON evaluations_exercise USING btree (parent_version_id);


--
-- Name: evaluations_exercise_sort_order_9c3ff006; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX evaluations_exercise_sort_order_9c3ff006 ON evaluations_exercise USING btree (sort_order);


--
-- Name: evaluations_rating_criterion_id_26029d37; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX evaluations_rating_criterion_id_26029d37 ON evaluations_rating USING btree (criterion_id);


--
-- Name: evaluations_rating_first_update_id_d29ff404; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX evaluations_rating_first_update_id_d29ff404 ON evaluations_rating USING btree (first_update_id);


--
-- Name: evaluations_rating_judge_id_9a343000; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX evaluations_rating_judge_id_9a343000 ON evaluations_rating USING btree (judge_id);


--
-- Name: evaluations_rating_last_update_id_6bd4785c; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX evaluations_rating_last_update_id_6bd4785c ON evaluations_rating USING btree (last_update_id);


--
-- Name: evaluations_rating_session_id_ebe11675; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX evaluations_rating_session_id_ebe11675 ON evaluations_rating USING btree (session_id);


--
-- Name: evaluations_rating_trainee_id_83e9be25; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX evaluations_rating_trainee_id_83e9be25 ON evaluations_rating USING btree (trainee_id);


--
-- Name: eventlog_eventlog_action_b173a33f; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX eventlog_eventlog_action_b173a33f ON eventlog_eventlog USING btree (action);


--
-- Name: eventlog_eventlog_action_b173a33f_like; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX eventlog_eventlog_action_b173a33f_like ON eventlog_eventlog USING btree (action varchar_pattern_ops);


--
-- Name: eventlog_eventlog_created_at_3adfe2bb; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX eventlog_eventlog_created_at_3adfe2bb ON eventlog_eventlog USING btree (created_at);


--
-- Name: eventlog_eventlog_first_update_id_76546abb; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX eventlog_eventlog_first_update_id_76546abb ON eventlog_eventlog USING btree (first_update_id);


--
-- Name: eventlog_eventlog_last_update_id_a6b78006; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX eventlog_eventlog_last_update_id_a6b78006 ON eventlog_eventlog USING btree (last_update_id);


--
-- Name: eventlog_eventlog_source_type_id_613fc1f5; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX eventlog_eventlog_source_type_id_613fc1f5 ON eventlog_eventlog USING btree (source_type_id);


--
-- Name: eventlog_eventlog_subject_type_id_cd2b8f6f; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX eventlog_eventlog_subject_type_id_cd2b8f6f ON eventlog_eventlog USING btree (subject_type_id);


--
-- Name: eventlog_eventlog_target_type_id_592022bf; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX eventlog_eventlog_target_type_id_592022bf ON eventlog_eventlog USING btree (target_type_id);


--
-- Name: ideas_brainstormingidea_brainstorming_id_c98772e4; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX ideas_brainstormingidea_brainstorming_id_c98772e4 ON ideas_brainstormingidea USING btree (brainstorming_id);


--
-- Name: ideas_brainstormingidea_first_update_id_3982d423; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX ideas_brainstormingidea_first_update_id_3982d423 ON ideas_brainstormingidea USING btree (first_update_id);


--
-- Name: ideas_brainstormingidea_last_update_id_16d669d4; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX ideas_brainstormingidea_last_update_id_16d669d4 ON ideas_brainstormingidea USING btree (last_update_id);


--
-- Name: ideas_brainstormingidea_original_version_id_d9a64710; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX ideas_brainstormingidea_original_version_id_d9a64710 ON ideas_brainstormingidea USING btree (original_version_id);


--
-- Name: ideas_brainstormingidea_parent_version_id_908d5899; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX ideas_brainstormingidea_parent_version_id_908d5899 ON ideas_brainstormingidea USING btree (parent_version_id);


--
-- Name: ideas_brainstormingidea_session_id_5aaa962a; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX ideas_brainstormingidea_session_id_5aaa962a ON ideas_brainstormingidea USING btree (session_id);


--
-- Name: ideas_brainstormingidea_sort_order_98497aab; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX ideas_brainstormingidea_sort_order_98497aab ON ideas_brainstormingidea USING btree (sort_order);


--
-- Name: ideas_brainstormingidea_tags_brainstormingidea_id_95887a0d; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX ideas_brainstormingidea_tags_brainstormingidea_id_95887a0d ON ideas_brainstormingidea_tags USING btree (brainstormingidea_id);


--
-- Name: ideas_brainstormingidea_tags_brainstormingtag_id_b56cd23f; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX ideas_brainstormingidea_tags_brainstormingtag_id_b56cd23f ON ideas_brainstormingidea_tags USING btree (brainstormingtag_id);


--
-- Name: ideas_brainstormingidea_user_id_8e1bb64c; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX ideas_brainstormingidea_user_id_8e1bb64c ON ideas_brainstormingidea USING btree (user_id);


--
-- Name: ideas_brainstormingtag_brainstorming_id_298c2135; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX ideas_brainstormingtag_brainstorming_id_298c2135 ON ideas_brainstormingtag USING btree (brainstorming_id);


--
-- Name: ideas_brainstormingtag_first_update_id_aab0b49a; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX ideas_brainstormingtag_first_update_id_aab0b49a ON ideas_brainstormingtag USING btree (first_update_id);


--
-- Name: ideas_brainstormingtag_last_update_id_82fdf9ce; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX ideas_brainstormingtag_last_update_id_82fdf9ce ON ideas_brainstormingtag USING btree (last_update_id);


--
-- Name: ideas_brainstormingtag_original_version_id_fc63afcb; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX ideas_brainstormingtag_original_version_id_fc63afcb ON ideas_brainstormingtag USING btree (original_version_id);


--
-- Name: ideas_brainstormingtag_parent_version_id_48078464; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX ideas_brainstormingtag_parent_version_id_48078464 ON ideas_brainstormingtag USING btree (parent_version_id);


--
-- Name: ideas_brainstormingtag_session_id_71e56942; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX ideas_brainstormingtag_session_id_71e56942 ON ideas_brainstormingtag USING btree (session_id);


--
-- Name: ideas_brainstormingtag_sort_order_1bafdb26; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX ideas_brainstormingtag_sort_order_1bafdb26 ON ideas_brainstormingtag USING btree (sort_order);


--
-- Name: ideas_questionwallidea_first_update_id_7c8ccb5a; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX ideas_questionwallidea_first_update_id_7c8ccb5a ON ideas_questionwallidea USING btree (first_update_id);


--
-- Name: ideas_questionwallidea_last_update_id_6813e850; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX ideas_questionwallidea_last_update_id_6813e850 ON ideas_questionwallidea USING btree (last_update_id);


--
-- Name: ideas_questionwallidea_questionwall_id_94832f66; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX ideas_questionwallidea_questionwall_id_94832f66 ON ideas_questionwallidea USING btree (questionwall_id);


--
-- Name: ideas_questionwallidea_session_id_dac07a87; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX ideas_questionwallidea_session_id_dac07a87 ON ideas_questionwallidea USING btree (session_id);


--
-- Name: ideas_questionwallidea_sort_order_479331d6; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX ideas_questionwallidea_sort_order_479331d6 ON ideas_questionwallidea USING btree (sort_order);


--
-- Name: ideas_questionwallidea_user_id_ae97a8e7; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX ideas_questionwallidea_user_id_ae97a8e7 ON ideas_questionwallidea USING btree (user_id);


--
-- Name: ideas_wordcloudidea_first_update_id_5fcc94d2; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX ideas_wordcloudidea_first_update_id_5fcc94d2 ON ideas_wordcloudidea USING btree (first_update_id);


--
-- Name: ideas_wordcloudidea_last_update_id_95e15562; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX ideas_wordcloudidea_last_update_id_95e15562 ON ideas_wordcloudidea USING btree (last_update_id);


--
-- Name: ideas_wordcloudidea_session_id_9af604ef; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX ideas_wordcloudidea_session_id_9af604ef ON ideas_wordcloudidea USING btree (session_id);


--
-- Name: ideas_wordcloudidea_sort_order_d4f95bc5; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX ideas_wordcloudidea_sort_order_d4f95bc5 ON ideas_wordcloudidea USING btree (sort_order);


--
-- Name: ideas_wordcloudidea_user_id_b572ef05; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX ideas_wordcloudidea_user_id_b572ef05 ON ideas_wordcloudidea USING btree (user_id);


--
-- Name: ideas_wordcloudidea_wordcloud_id_e783267b; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX ideas_wordcloudidea_wordcloud_id_e783267b ON ideas_wordcloudidea USING btree (wordcloud_id);


--
-- Name: likes_like_author_id_b0089a86; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX likes_like_author_id_b0089a86 ON likes_like USING btree (author_id);


--
-- Name: likes_like_content_type_id_8ffc2116; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX likes_like_content_type_id_8ffc2116 ON likes_like USING btree (content_type_id);


--
-- Name: likes_like_first_update_id_bde7471f; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX likes_like_first_update_id_bde7471f ON likes_like USING btree (first_update_id);


--
-- Name: likes_like_last_update_id_ed04d137; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX likes_like_last_update_id_ed04d137 ON likes_like USING btree (last_update_id);


--
-- Name: media_media_first_update_id_56ba34e9; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX media_media_first_update_id_56ba34e9 ON media_media USING btree (first_update_id);


--
-- Name: media_media_last_update_id_63ed63b1; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX media_media_last_update_id_63ed63b1 ON media_media USING btree (last_update_id);


--
-- Name: media_media_original_version_id_b24f6d14; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX media_media_original_version_id_b24f6d14 ON media_media USING btree (original_version_id);


--
-- Name: media_media_parent_version_id_09e9389d; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX media_media_parent_version_id_09e9389d ON media_media USING btree (parent_version_id);


--
-- Name: media_media_polymorphic_ctype_id_2bb85fe7; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX media_media_polymorphic_ctype_id_2bb85fe7 ON media_media USING btree (polymorphic_ctype_id);


--
-- Name: media_note_first_update_id_798ea82b; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX media_note_first_update_id_798ea82b ON media_note USING btree (first_update_id);


--
-- Name: media_note_last_update_id_b94bdd93; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX media_note_last_update_id_b94bdd93 ON media_note USING btree (last_update_id);


--
-- Name: media_note_presentation_id_da582a3e; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX media_note_presentation_id_da582a3e ON media_note USING btree (presentation_id);


--
-- Name: media_note_training_session_id_13fb761e; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX media_note_training_session_id_13fb761e ON media_note USING btree (training_session_id);


--
-- Name: media_note_user_id_89f98ac9; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX media_note_user_id_89f98ac9 ON media_note USING btree (user_id);


--
-- Name: media_presentationmedia_first_update_id_36fdefdd; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX media_presentationmedia_first_update_id_36fdefdd ON media_presentationmedia USING btree (first_update_id);


--
-- Name: media_presentationmedia_last_update_id_bea5c189; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX media_presentationmedia_last_update_id_bea5c189 ON media_presentationmedia USING btree (last_update_id);


--
-- Name: media_presentationmedia_original_version_id_3437b328; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX media_presentationmedia_original_version_id_3437b328 ON media_presentationmedia USING btree (original_version_id);


--
-- Name: media_presentationmedia_parent_version_id_ad0cf80e; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX media_presentationmedia_parent_version_id_ad0cf80e ON media_presentationmedia USING btree (parent_version_id);


--
-- Name: media_presentationmedia_presentation_id_71d46399; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX media_presentationmedia_presentation_id_71d46399 ON media_presentationmedia USING btree (presentation_id);


--
-- Name: metaplans_metaplan_first_update_id_406c538d; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX metaplans_metaplan_first_update_id_406c538d ON metaplans_metaplan USING btree (first_update_id);


--
-- Name: metaplans_metaplan_last_update_id_8ee6fc3d; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX metaplans_metaplan_last_update_id_8ee6fc3d ON metaplans_metaplan USING btree (last_update_id);


--
-- Name: metaplans_metaplan_sort_order_a205bd8d; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX metaplans_metaplan_sort_order_a205bd8d ON metaplans_metaplan USING btree (sort_order);


--
-- Name: metaplans_metaplan_training_session_id_881a5a6c; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX metaplans_metaplan_training_session_id_881a5a6c ON metaplans_metaplan USING btree (session_id);


--
-- Name: metaplans_metaplanproposition_first_update_id_1f81d9fb; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX metaplans_metaplanproposition_first_update_id_1f81d9fb ON metaplans_metaplanproposition USING btree (first_update_id);


--
-- Name: metaplans_metaplanproposition_last_update_id_fa459f06; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX metaplans_metaplanproposition_last_update_id_fa459f06 ON metaplans_metaplanproposition USING btree (last_update_id);


--
-- Name: metaplans_metaplanproposition_metaplan_id_d958bfef; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX metaplans_metaplanproposition_metaplan_id_d958bfef ON metaplans_metaplanproposition USING btree (metaplan_id);


--
-- Name: metaplans_metaplanproposition_user_id_2ccf9a4b; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX metaplans_metaplanproposition_user_id_2ccf9a4b ON metaplans_metaplanproposition USING btree (user_id);


--
-- Name: oauth2_provider_accesstoken_application_id_b22886e1; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX oauth2_provider_accesstoken_application_id_b22886e1 ON oauth2_provider_accesstoken USING btree (application_id);


--
-- Name: oauth2_provider_accesstoken_token_8af090f8_like; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX oauth2_provider_accesstoken_token_8af090f8_like ON oauth2_provider_accesstoken USING btree (token varchar_pattern_ops);


--
-- Name: oauth2_provider_accesstoken_user_id_6e4c9a65; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX oauth2_provider_accesstoken_user_id_6e4c9a65 ON oauth2_provider_accesstoken USING btree (user_id);


--
-- Name: oauth2_provider_application_client_id_03f0cc84_like; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX oauth2_provider_application_client_id_03f0cc84_like ON oauth2_provider_application USING btree (client_id varchar_pattern_ops);


--
-- Name: oauth2_provider_application_client_secret_53133678; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX oauth2_provider_application_client_secret_53133678 ON oauth2_provider_application USING btree (client_secret);


--
-- Name: oauth2_provider_application_client_secret_53133678_like; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX oauth2_provider_application_client_secret_53133678_like ON oauth2_provider_application USING btree (client_secret varchar_pattern_ops);


--
-- Name: oauth2_provider_application_user_id_79829054; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX oauth2_provider_application_user_id_79829054 ON oauth2_provider_application USING btree (user_id);


--
-- Name: oauth2_provider_grant_application_id_81923564; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX oauth2_provider_grant_application_id_81923564 ON oauth2_provider_grant USING btree (application_id);


--
-- Name: oauth2_provider_grant_code_49ab4ddf_like; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX oauth2_provider_grant_code_49ab4ddf_like ON oauth2_provider_grant USING btree (code varchar_pattern_ops);


--
-- Name: oauth2_provider_grant_user_id_e8f62af8; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX oauth2_provider_grant_user_id_e8f62af8 ON oauth2_provider_grant USING btree (user_id);


--
-- Name: oauth2_provider_refreshtoken_application_id_2d1c311b; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX oauth2_provider_refreshtoken_application_id_2d1c311b ON oauth2_provider_refreshtoken USING btree (application_id);


--
-- Name: oauth2_provider_refreshtoken_token_d090daa4_like; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX oauth2_provider_refreshtoken_token_d090daa4_like ON oauth2_provider_refreshtoken USING btree (token varchar_pattern_ops);


--
-- Name: oauth2_provider_refreshtoken_user_id_da837fce; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX oauth2_provider_refreshtoken_user_id_da837fce ON oauth2_provider_refreshtoken USING btree (user_id);


--
-- Name: photostories_photo_first_update_id_73ba73ef; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX photostories_photo_first_update_id_73ba73ef ON photostories_photo USING btree (first_update_id);


--
-- Name: photostories_photo_last_update_id_be1263e3; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX photostories_photo_last_update_id_be1263e3 ON photostories_photo USING btree (last_update_id);


--
-- Name: photostories_photo_sort_order_9a854743; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX photostories_photo_sort_order_9a854743 ON photostories_photo USING btree (sort_order);


--
-- Name: photostories_photo_strip_id_ebc263a2; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX photostories_photo_strip_id_ebc263a2 ON photostories_photo USING btree (strip_id);


--
-- Name: photostories_strip_first_update_id_424af198; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX photostories_strip_first_update_id_424af198 ON photostories_strip USING btree (first_update_id);


--
-- Name: photostories_strip_last_update_id_b2311777; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX photostories_strip_last_update_id_b2311777 ON photostories_strip USING btree (last_update_id);


--
-- Name: photostories_strip_owner_id_eae16cfb; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX photostories_strip_owner_id_eae16cfb ON photostories_strip USING btree (owner_id);


--
-- Name: photostories_strip_photostory_id_9df6fa8e; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX photostories_strip_photostory_id_9df6fa8e ON photostories_strip USING btree (photostory_id);


--
-- Name: photostories_strip_session_id_eabbd78e; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX photostories_strip_session_id_eabbd78e ON photostories_strip USING btree (session_id);


--
-- Name: pinax_notifications_notice_scoping_content_type_id_e7f0ced8; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX pinax_notifications_notice_scoping_content_type_id_e7f0ced8 ON pinax_notifications_noticesetting USING btree (scoping_content_type_id);


--
-- Name: pinax_notifications_noticesetting_notice_type_id_718e929c; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX pinax_notifications_noticesetting_notice_type_id_718e929c ON pinax_notifications_noticesetting USING btree (notice_type_id);


--
-- Name: pinax_notifications_noticesetting_user_id_7050ffe0; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX pinax_notifications_noticesetting_user_id_7050ffe0 ON pinax_notifications_noticesetting USING btree (user_id);


--
-- Name: questionnaires_answer_first_update_id_a07666a1; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX questionnaires_answer_first_update_id_a07666a1 ON questionnaires_answer USING btree (first_update_id);


--
-- Name: questionnaires_answer_last_update_id_f81c5f23; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX questionnaires_answer_last_update_id_f81c5f23 ON questionnaires_answer USING btree (last_update_id);


--
-- Name: questionnaires_answer_polymorphic_ctype_id_fba79b4d; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX questionnaires_answer_polymorphic_ctype_id_fba79b4d ON questionnaires_answer USING btree (polymorphic_ctype_id);


--
-- Name: questionnaires_answer_question_id_3fa3580a; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX questionnaires_answer_question_id_3fa3580a ON questionnaires_answer USING btree (question_id);


--
-- Name: questionnaires_answer_session_id_756707c0; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX questionnaires_answer_session_id_756707c0 ON questionnaires_answer USING btree (session_id);


--
-- Name: questionnaires_answer_user_id_23b90841; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX questionnaires_answer_user_id_23b90841 ON questionnaires_answer USING btree (user_id);


--
-- Name: questionnaires_choice_first_update_id_61c0c686; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX questionnaires_choice_first_update_id_61c0c686 ON questionnaires_choice USING btree (first_update_id);


--
-- Name: questionnaires_choice_last_update_id_a0d369dc; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX questionnaires_choice_last_update_id_a0d369dc ON questionnaires_choice USING btree (last_update_id);


--
-- Name: questionnaires_choice_original_version_id_1bb58e5c; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX questionnaires_choice_original_version_id_1bb58e5c ON questionnaires_choice USING btree (original_version_id);


--
-- Name: questionnaires_choice_parent_version_id_fad7535e; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX questionnaires_choice_parent_version_id_fad7535e ON questionnaires_choice USING btree (parent_version_id);


--
-- Name: questionnaires_choice_question_content_type_id_f57b2332; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX questionnaires_choice_question_content_type_id_f57b2332 ON questionnaires_choice USING btree (question_content_type_id);


--
-- Name: questionnaires_choice_sort_order_953f05d3; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX questionnaires_choice_sort_order_953f05d3 ON questionnaires_choice USING btree (sort_order);


--
-- Name: questionnaires_choicesanswer_choices_choice_id_0ccb9ff0; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX questionnaires_choicesanswer_choices_choice_id_0ccb9ff0 ON questionnaires_choicesanswer_choices USING btree (choice_id);


--
-- Name: questionnaires_choicesanswer_choices_choicesanswer_id_2f5645dc; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX questionnaires_choicesanswer_choices_choicesanswer_id_2f5645dc ON questionnaires_choicesanswer_choices USING btree (choicesanswer_id);


--
-- Name: questionnaires_question_first_update_id_dde29588; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX questionnaires_question_first_update_id_dde29588 ON questionnaires_question USING btree (first_update_id);


--
-- Name: questionnaires_question_last_update_id_22d210e5; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX questionnaires_question_last_update_id_22d210e5 ON questionnaires_question USING btree (last_update_id);


--
-- Name: questionnaires_question_original_version_id_26a4b4e3; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX questionnaires_question_original_version_id_26a4b4e3 ON questionnaires_question USING btree (original_version_id);


--
-- Name: questionnaires_question_parent_version_id_ce795d06; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX questionnaires_question_parent_version_id_ce795d06 ON questionnaires_question USING btree (parent_version_id);


--
-- Name: questionnaires_question_polymorphic_ctype_id_d1a98141; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX questionnaires_question_polymorphic_ctype_id_d1a98141 ON questionnaires_question USING btree (polymorphic_ctype_id);


--
-- Name: questionnaires_question_questionnaire_content_type_id_979f344d; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX questionnaires_question_questionnaire_content_type_id_979f344d ON questionnaires_question USING btree (questionnaire_content_type_id);


--
-- Name: questionnaires_question_sort_order_f55204cd; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX questionnaires_question_sort_order_f55204cd ON questionnaires_question USING btree (sort_order);


--
-- Name: roleplays_criterion_activity_type_id_ce9291d3; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX roleplays_criterion_activity_type_id_ce9291d3 ON roleplays_criterion USING btree (activity_type_id);


--
-- Name: roleplays_criterion_dimensions_criterion_id_fa41a9b7; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX roleplays_criterion_dimensions_criterion_id_fa41a9b7 ON roleplays_criterion_dimensions USING btree (criterion_id);


--
-- Name: roleplays_criterion_dimensions_dimension_id_c860e738; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX roleplays_criterion_dimensions_dimension_id_c860e738 ON roleplays_criterion_dimensions USING btree (dimension_id);


--
-- Name: roleplays_criterion_first_update_id_8960ae78; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX roleplays_criterion_first_update_id_8960ae78 ON roleplays_criterion USING btree (first_update_id);


--
-- Name: roleplays_criterion_last_update_id_4204e291; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX roleplays_criterion_last_update_id_4204e291 ON roleplays_criterion USING btree (last_update_id);


--
-- Name: roleplays_criterion_original_version_id_f2d6cd76; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX roleplays_criterion_original_version_id_f2d6cd76 ON roleplays_criterion USING btree (original_version_id);


--
-- Name: roleplays_criterion_parent_version_id_08f8b64d; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX roleplays_criterion_parent_version_id_08f8b64d ON roleplays_criterion USING btree (parent_version_id);


--
-- Name: roleplays_criterion_sort_order_0cea0208; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX roleplays_criterion_sort_order_0cea0208 ON roleplays_criterion USING btree (sort_order);


--
-- Name: roleplays_criterion_step_id_dd14060f; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX roleplays_criterion_step_id_dd14060f ON roleplays_criterion USING btree (step_id);


--
-- Name: roleplays_criterion_training_id_f02a123b; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX roleplays_criterion_training_id_f02a123b ON roleplays_criterion USING btree (training_id);


--
-- Name: roleplays_rating_criterion_id_5d9e6947; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX roleplays_rating_criterion_id_5d9e6947 ON roleplays_rating USING btree (criterion_id);


--
-- Name: roleplays_rating_first_update_id_1e1913fd; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX roleplays_rating_first_update_id_1e1913fd ON roleplays_rating USING btree (first_update_id);


--
-- Name: roleplays_rating_last_update_id_52847eb8; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX roleplays_rating_last_update_id_52847eb8 ON roleplays_rating USING btree (last_update_id);


--
-- Name: roleplays_rating_trainee_id_132e2e30; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX roleplays_rating_trainee_id_132e2e30 ON roleplays_rating USING btree (trainee_id);


--
-- Name: roleplays_rating_training_session_id_30b88e56; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX roleplays_rating_training_session_id_30b88e56 ON roleplays_rating USING btree (training_session_id);


--
-- Name: roleplays_step_first_update_id_b83d739c; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX roleplays_step_first_update_id_b83d739c ON roleplays_step USING btree (first_update_id);


--
-- Name: roleplays_step_last_update_id_8376474a; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX roleplays_step_last_update_id_8376474a ON roleplays_step USING btree (last_update_id);


--
-- Name: roleplays_step_original_version_id_be1ff1ab; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX roleplays_step_original_version_id_be1ff1ab ON roleplays_step USING btree (original_version_id);


--
-- Name: roleplays_step_parent_version_id_f6148d02; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX roleplays_step_parent_version_id_f6148d02 ON roleplays_step USING btree (parent_version_id);


--
-- Name: roleplays_step_roleplay_id_050c4529; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX roleplays_step_roleplay_id_050c4529 ON roleplays_step USING btree (roleplay_id);


--
-- Name: roleplays_step_sort_order_dc39d619; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX roleplays_step_sort_order_dc39d619 ON roleplays_step USING btree (sort_order);


--
-- Name: saba_certificationprogramu_certification_id_937be586; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX saba_certificationprogramu_certification_id_937be586 ON saba_certificationprogramuserstatusdjangotask USING btree (certification_id);


--
-- Name: surveys_answer_choices_answer_id_defd294e; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX surveys_answer_choices_answer_id_defd294e ON surveys_answer_choices USING btree (answer_id);


--
-- Name: surveys_answer_choices_choice_id_3ff3133b; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX surveys_answer_choices_choice_id_3ff3133b ON surveys_answer_choices USING btree (choice_id);


--
-- Name: surveys_answer_first_update_id_19c74a38; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX surveys_answer_first_update_id_19c74a38 ON surveys_answer USING btree (first_update_id);


--
-- Name: surveys_answer_last_update_id_40905a68; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX surveys_answer_last_update_id_40905a68 ON surveys_answer USING btree (last_update_id);


--
-- Name: surveys_answer_question_id_c0166f3c; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX surveys_answer_question_id_c0166f3c ON surveys_answer USING btree (question_id);


--
-- Name: surveys_answer_survey_id_caa4663c; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX surveys_answer_survey_id_caa4663c ON surveys_answer USING btree (survey_id);


--
-- Name: surveys_answer_trainee_id_798b67a2; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX surveys_answer_trainee_id_798b67a2 ON surveys_answer USING btree (trainee_id);


--
-- Name: surveys_answer_training_session_id_4d5a3d7f; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX surveys_answer_training_session_id_4d5a3d7f ON surveys_answer USING btree (training_session_id);


--
-- Name: surveys_choice_first_update_id_c3be40eb; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX surveys_choice_first_update_id_c3be40eb ON surveys_choice USING btree (first_update_id);


--
-- Name: surveys_choice_last_update_id_72fcceb4; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX surveys_choice_last_update_id_72fcceb4 ON surveys_choice USING btree (last_update_id);


--
-- Name: surveys_choice_question_id_03708b95; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX surveys_choice_question_id_03708b95 ON surveys_choice USING btree (question_id);


--
-- Name: surveys_choice_sort_order_d0fb45f5; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX surveys_choice_sort_order_d0fb45f5 ON surveys_choice USING btree (sort_order);


--
-- Name: surveys_pool_author_id_0e27d828; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX surveys_pool_author_id_0e27d828 ON surveys_pool USING btree (author_id);


--
-- Name: surveys_pool_first_update_id_12fb4727; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX surveys_pool_first_update_id_12fb4727 ON surveys_pool USING btree (first_update_id);


--
-- Name: surveys_pool_last_update_id_3a0b7b7d; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX surveys_pool_last_update_id_3a0b7b7d ON surveys_pool USING btree (last_update_id);


--
-- Name: surveys_pool_sort_order_6c7a9928; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX surveys_pool_sort_order_6c7a9928 ON surveys_pool USING btree (sort_order);


--
-- Name: surveys_question_first_update_id_079b26b7; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX surveys_question_first_update_id_079b26b7 ON surveys_question USING btree (first_update_id);


--
-- Name: surveys_question_last_update_id_664309b2; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX surveys_question_last_update_id_664309b2 ON surveys_question USING btree (last_update_id);


--
-- Name: surveys_question_pool_id_ece4bd36; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX surveys_question_pool_id_ece4bd36 ON surveys_question USING btree (pool_id);


--
-- Name: surveys_question_sort_order_ce57aadc; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX surveys_question_sort_order_ce57aadc ON surveys_question USING btree (sort_order);


--
-- Name: surveys_survey_first_update_id_912f3e48; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX surveys_survey_first_update_id_912f3e48 ON surveys_survey USING btree (first_update_id);


--
-- Name: surveys_survey_last_update_id_ad7c4f70; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX surveys_survey_last_update_id_ad7c4f70 ON surveys_survey USING btree (last_update_id);


--
-- Name: surveys_survey_trainer_id_4359abb7; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX surveys_survey_trainer_id_4359abb7 ON surveys_survey USING btree (trainer_id);


--
-- Name: surveys_survey_training_id_dfe76f2e; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX surveys_survey_training_id_dfe76f2e ON surveys_survey USING btree (training_id);


--
-- Name: surveys_surveypool_first_update_id_385cea46; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX surveys_surveypool_first_update_id_385cea46 ON surveys_surveypool USING btree (first_update_id);


--
-- Name: surveys_surveypool_last_update_id_126372c2; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX surveys_surveypool_last_update_id_126372c2 ON surveys_surveypool USING btree (last_update_id);


--
-- Name: surveys_surveypool_pool_id_bf6a922c; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX surveys_surveypool_pool_id_bf6a922c ON surveys_surveypool USING btree (pool_id);


--
-- Name: surveys_surveypool_survey_id_f7e1354c; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX surveys_surveypool_survey_id_f7e1354c ON surveys_surveypool USING btree (survey_id);


--
-- Name: sync_clientversion_first_update_id_042de255; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX sync_clientversion_first_update_id_042de255 ON sync_clientversion USING btree (first_update_id);


--
-- Name: sync_clientversion_last_update_id_a4dee490; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX sync_clientversion_last_update_id_a4dee490 ON sync_clientversion USING btree (last_update_id);


--
-- Name: sync_clientversion_name_74b07e47; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX sync_clientversion_name_74b07e47 ON sync_clientversion USING btree (name);


--
-- Name: sync_clientversion_name_74b07e47_like; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX sync_clientversion_name_74b07e47_like ON sync_clientversion USING btree (name varchar_pattern_ops);


--
-- Name: sync_clientversion_name_version_cdc3733e_idx; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX sync_clientversion_name_version_cdc3733e_idx ON sync_clientversion USING btree (name, version);


--
-- Name: sync_clientversion_version_a06f6ff5; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX sync_clientversion_version_a06f6ff5 ON sync_clientversion USING btree (version);


--
-- Name: sync_localserver_first_update_id_91d68c99; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX sync_localserver_first_update_id_91d68c99 ON sync_localserver USING btree (first_update_id);


--
-- Name: sync_localserver_last_update_id_8fd69eca; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX sync_localserver_last_update_id_8fd69eca ON sync_localserver USING btree (last_update_id);


--
-- Name: sync_localserver_mac_248aeafd_like; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX sync_localserver_mac_248aeafd_like ON sync_localserver USING btree (mac varchar_pattern_ops);


--
-- Name: sync_localserverconnection_date_cb3785bd; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX sync_localserverconnection_date_cb3785bd ON sync_localserverconnection USING btree (date);


--
-- Name: sync_localserverconnection_local_server_id_c9b4da93; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX sync_localserverconnection_local_server_id_c9b4da93 ON sync_localserverconnection USING btree (local_server_id);


--
-- Name: sync_serverversion_first_update_id_0faec7c8; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX sync_serverversion_first_update_id_0faec7c8 ON sync_serverversion USING btree (first_update_id);


--
-- Name: sync_serverversion_last_update_id_0d241f62; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX sync_serverversion_last_update_id_0d241f62 ON sync_serverversion USING btree (last_update_id);


--
-- Name: sync_serverversion_name_499192c5; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX sync_serverversion_name_499192c5 ON sync_serverversion USING btree (name);


--
-- Name: sync_serverversion_name_499192c5_like; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX sync_serverversion_name_499192c5_like ON sync_serverversion USING btree (name varchar_pattern_ops);


--
-- Name: sync_serverversion_name_version_bc77a57a_idx; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX sync_serverversion_name_version_bc77a57a_idx ON sync_serverversion USING btree (name, version);


--
-- Name: sync_serverversion_version_77f6d908; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX sync_serverversion_version_77f6d908 ON sync_serverversion USING btree (version);


--
-- Name: sync_task_date_d1fa1eb6; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX sync_task_date_d1fa1eb6 ON sync_task USING btree (date);


--
-- Name: sync_task_done_ba2b36a2; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX sync_task_done_ba2b36a2 ON sync_task USING btree (done);


--
-- Name: sync_task_done_date_da5f6643_idx; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX sync_task_done_date_da5f6643_idx ON sync_task USING btree (done, date);


--
-- Name: sync_update_date_8ad7e09b; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX sync_update_date_8ad7e09b ON sync_update USING btree (date);


--
-- Name: sync_update_synchronized_87754154; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX sync_update_synchronized_87754154 ON sync_update USING btree (synchronized);


--
-- Name: tasks_djangotask_state_616a2a3a; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX tasks_djangotask_state_616a2a3a ON tasks_djangotask USING btree (state);


--
-- Name: tasks_djangotask_state_616a2a3a_like; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX tasks_djangotask_state_616a2a3a_like ON tasks_djangotask USING btree (state varchar_pattern_ops);


--
-- Name: tasks_djangotask_user_id_153aa0d7; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX tasks_djangotask_user_id_153aa0d7 ON tasks_djangotask USING btree (user_id);


--
-- Name: themes_theme_first_update_id_8969e755; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX themes_theme_first_update_id_8969e755 ON themes_theme USING btree (first_update_id);


--
-- Name: themes_theme_last_update_id_70bc3ef2; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX themes_theme_last_update_id_70bc3ef2 ON themes_theme USING btree (last_update_id);


--
-- Name: trainings_training_business_unit_id_cdf48cb8; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX trainings_training_business_unit_id_cdf48cb8 ON trainings_training USING btree (business_unit_id);


--
-- Name: trainings_training_default_group_set_id_bf1e6c66; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX trainings_training_default_group_set_id_bf1e6c66 ON trainings_training USING btree (default_group_set_id);


--
-- Name: trainings_training_first_update_id_6da8c12a; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX trainings_training_first_update_id_6da8c12a ON trainings_training USING btree (first_update_id);


--
-- Name: trainings_training_job_profile_id_49bc67a7; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX trainings_training_job_profile_id_49bc67a7 ON trainings_training USING btree (job_profile_id);


--
-- Name: trainings_training_last_update_id_fa6302d6; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX trainings_training_last_update_id_fa6302d6 ON trainings_training USING btree (last_update_id);


--
-- Name: trainings_training_original_version_id_7e6c40d6; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX trainings_training_original_version_id_7e6c40d6 ON trainings_training USING btree (original_version_id);


--
-- Name: trainings_training_owner_id_298786e9; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX trainings_training_owner_id_298786e9 ON trainings_training USING btree (owner_id);


--
-- Name: trainings_training_parent_version_id_b48068a9; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX trainings_training_parent_version_id_b48068a9 ON trainings_training USING btree (parent_version_id);


--
-- Name: trainings_training_theme_id_3599e86d; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX trainings_training_theme_id_3599e86d ON trainings_training USING btree (theme_id);


--
-- Name: trainings_training_version_state_bc9d04df; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX trainings_training_version_state_bc9d04df ON trainings_training USING btree (version_state);


--
-- Name: trainings_training_version_state_bc9d04df_like; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX trainings_training_version_state_bc9d04df_like ON trainings_training USING btree (version_state varchar_pattern_ops);


--
-- Name: trainings_trainingactivity_first_update_id_8b326dc1; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX trainings_trainingactivity_first_update_id_8b326dc1 ON trainings_trainingactivity USING btree (first_update_id);


--
-- Name: trainings_trainingactivity_first_update_id_d6bd077d; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX trainings_trainingactivity_first_update_id_d6bd077d ON trainings_trainingactivitylibrarystatus USING btree (first_update_id);


--
-- Name: trainings_trainingactivity_last_update_id_31675740; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX trainings_trainingactivity_last_update_id_31675740 ON trainings_trainingactivity USING btree (last_update_id);


--
-- Name: trainings_trainingactivity_original_version_id_799a1c1d; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX trainings_trainingactivity_original_version_id_799a1c1d ON trainings_trainingactivity USING btree (original_version_id);


--
-- Name: trainings_trainingactivity_parent_version_id_25862965; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX trainings_trainingactivity_parent_version_id_25862965 ON trainings_trainingactivity USING btree (parent_version_id);


--
-- Name: trainings_trainingactivity_polymorphic_ctype_id_37c64b31; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX trainings_trainingactivity_polymorphic_ctype_id_37c64b31 ON trainings_trainingactivity USING btree (polymorphic_ctype_id);


--
-- Name: trainings_trainingactivity_session_id_c3d0bbe8; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX trainings_trainingactivity_session_id_c3d0bbe8 ON trainings_trainingactivity USING btree (session_id);


--
-- Name: trainings_trainingactivity_sort_order_e4d928eb; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX trainings_trainingactivity_sort_order_e4d928eb ON trainings_trainingactivity USING btree (sort_order);


--
-- Name: trainings_trainingactivity_training_id_b0e26055; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX trainings_trainingactivity_training_id_b0e26055 ON trainings_trainingactivity USING btree (training_id);


--
-- Name: trainings_trainingactivitylibrarystatus_last_update_id_c3cc8141; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX trainings_trainingactivitylibrarystatus_last_update_id_c3cc8141 ON trainings_trainingactivitylibrarystatus USING btree (last_update_id);


--
-- Name: trainings_trainingactivitylibrarystatus_owner_id_5bc1c76e; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX trainings_trainingactivitylibrarystatus_owner_id_5bc1c76e ON trainings_trainingactivitylibrarystatus USING btree (owner_id);


--
-- Name: trainings_trainingclientoptions_first_update_id_896e9e5c; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX trainings_trainingclientoptions_first_update_id_896e9e5c ON trainings_trainingclientoptions USING btree (first_update_id);


--
-- Name: trainings_trainingclientoptions_last_update_id_e9a2300e; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX trainings_trainingclientoptions_last_update_id_e9a2300e ON trainings_trainingclientoptions USING btree (last_update_id);


--
-- Name: trainings_trainingclientoptions_original_version_id_0872acf4; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX trainings_trainingclientoptions_original_version_id_0872acf4 ON trainings_trainingclientoptions USING btree (original_version_id);


--
-- Name: trainings_trainingclientoptions_parent_version_id_678ee857; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX trainings_trainingclientoptions_parent_version_id_678ee857 ON trainings_trainingclientoptions USING btree (parent_version_id);


--
-- Name: trainings_trainingsession_date_08af2e4e; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX trainings_trainingsession_date_08af2e4e ON trainings_trainingsession USING btree (start_date);


--
-- Name: trainings_trainingsession_first_update_id_88e23cd7; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX trainings_trainingsession_first_update_id_88e23cd7 ON trainings_trainingsession USING btree (first_update_id);


--
-- Name: trainings_trainingsession_last_update_id_a559763f; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX trainings_trainingsession_last_update_id_a559763f ON trainings_trainingsession USING btree (last_update_id);


--
-- Name: trainings_trainingsession_permissions_3e6ab300; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX trainings_trainingsession_permissions_3e6ab300 ON trainings_trainingsession USING btree (permissions);


--
-- Name: trainings_trainingsession_permissions_3e6ab300_like; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX trainings_trainingsession_permissions_3e6ab300_like ON trainings_trainingsession USING btree (permissions varchar_pattern_ops);


--
-- Name: trainings_trainingsession_state_89b85a1c; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX trainings_trainingsession_state_89b85a1c ON trainings_trainingsession USING btree (state);


--
-- Name: trainings_trainingsession_state_89b85a1c_like; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX trainings_trainingsession_state_89b85a1c_like ON trainings_trainingsession USING btree (state varchar_pattern_ops);


--
-- Name: trainings_trainingsession_token_7b8249e2_like; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX trainings_trainingsession_token_7b8249e2_like ON trainings_trainingsession USING btree (token varchar_pattern_ops);


--
-- Name: trainings_trainingsession_trainer_id_8561f7ac; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX trainings_trainingsession_trainer_id_8561f7ac ON trainings_trainingsession USING btree (trainer_id);


--
-- Name: trainings_trainingsession_training_id_f3d78ba1; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX trainings_trainingsession_training_id_f3d78ba1 ON trainings_trainingsession USING btree (training_id);


--
-- Name: trainings_trainingsession_users_mtpuser_id_799bc950; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX trainings_trainingsession_users_mtpuser_id_799bc950 ON trainings_trainingsession_users USING btree (mtpuser_id);


--
-- Name: trainings_trainingsession_users_trainingsession_id_871cd616; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX trainings_trainingsession_users_trainingsession_id_871cd616 ON trainings_trainingsession_users USING btree (trainingsession_id);


--
-- Name: trainings_trainingtask_training_id_85297e1a; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX trainings_trainingtask_training_id_85297e1a ON trainings_trainingtask USING btree (training_id);


--
-- Name: translation_translatablelanguage_first_update_id_16457a3b; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX translation_translatablelanguage_first_update_id_16457a3b ON translation_translatablelanguage USING btree (first_update_id);


--
-- Name: translation_translatablelanguage_language_eb46e6eb_like; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX translation_translatablelanguage_language_eb46e6eb_like ON translation_translatablelanguage USING btree (language varchar_pattern_ops);


--
-- Name: translation_translatablelanguage_last_update_id_814fec70; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX translation_translatablelanguage_last_update_id_814fec70 ON translation_translatablelanguage USING btree (last_update_id);


--
-- Name: translation_translation_first_update_id_7da93c50; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX translation_translation_first_update_id_7da93c50 ON translation_translation USING btree (first_update_id);


--
-- Name: translation_translation_last_update_id_c4257eef; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX translation_translation_last_update_id_c4257eef ON translation_translation USING btree (last_update_id);


--
-- Name: waffle_flag_created_4a6e8cef; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX waffle_flag_created_4a6e8cef ON waffle_flag USING btree (created);


--
-- Name: waffle_flag_groups_flag_id_c11c0c05; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX waffle_flag_groups_flag_id_c11c0c05 ON waffle_flag_groups USING btree (flag_id);


--
-- Name: waffle_flag_groups_group_id_a97c4f66; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX waffle_flag_groups_group_id_a97c4f66 ON waffle_flag_groups USING btree (group_id);


--
-- Name: waffle_flag_name_8799ccdf_like; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX waffle_flag_name_8799ccdf_like ON waffle_flag USING btree (name varchar_pattern_ops);


--
-- Name: waffle_flag_users_flag_id_833c37b0; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX waffle_flag_users_flag_id_833c37b0 ON waffle_flag_users USING btree (flag_id);


--
-- Name: waffle_flag_users_mtpuser_id_b4dd6d55; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX waffle_flag_users_mtpuser_id_b4dd6d55 ON waffle_flag_users USING btree (mtpuser_id);


--
-- Name: waffle_sample_created_76198bd5; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX waffle_sample_created_76198bd5 ON waffle_sample USING btree (created);


--
-- Name: waffle_sample_name_26b507bc_like; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX waffle_sample_name_26b507bc_like ON waffle_sample USING btree (name varchar_pattern_ops);


--
-- Name: waffle_switch_created_c004e77e; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX waffle_switch_created_c004e77e ON waffle_switch USING btree (created);


--
-- Name: waffle_switch_name_68a12dd8_like; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX waffle_switch_name_68a12dd8_like ON waffle_switch USING btree (name varchar_pattern_ops);


--
-- Name: workshops_workshopstep_first_update_id_a5c1f956; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX workshops_workshopstep_first_update_id_a5c1f956 ON workshops_workshopstep USING btree (first_update_id);


--
-- Name: workshops_workshopstep_last_update_id_36f7804a; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX workshops_workshopstep_last_update_id_36f7804a ON workshops_workshopstep USING btree (last_update_id);


--
-- Name: workshops_workshopstep_original_version_id_98cc31ce; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX workshops_workshopstep_original_version_id_98cc31ce ON workshops_workshopstep USING btree (original_version_id);


--
-- Name: workshops_workshopstep_parent_version_id_c6e228b8; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX workshops_workshopstep_parent_version_id_c6e228b8 ON workshops_workshopstep USING btree (parent_version_id);


--
-- Name: workshops_workshopstep_polymorphic_ctype_id_83855d49; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX workshops_workshopstep_polymorphic_ctype_id_83855d49 ON workshops_workshopstep USING btree (polymorphic_ctype_id);


--
-- Name: workshops_workshopstep_sort_order_ee805f36; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX workshops_workshopstep_sort_order_ee805f36 ON workshops_workshopstep USING btree (sort_order);


--
-- Name: workshops_workshopstep_workshop_id_3de7dea3; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX workshops_workshopstep_workshop_id_3de7dea3 ON workshops_workshopstep USING btree (workshop_id);


--
-- Name: workshops_workshopstepques_first_update_id_8e4a2c98; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX workshops_workshopstepques_first_update_id_8e4a2c98 ON workshops_workshopstepquestionuseranswer USING btree (first_update_id);


--
-- Name: workshops_workshopstepques_last_update_id_39155b34; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX workshops_workshopstepques_last_update_id_39155b34 ON workshops_workshopstepquestionuseranswer USING btree (last_update_id);


--
-- Name: workshops_workshopstepques_original_version_id_6de17fa2; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX workshops_workshopstepques_original_version_id_6de17fa2 ON workshops_workshopstepquestionanswer USING btree (original_version_id);


--
-- Name: workshops_workshopstepques_training_session_id_125f3dbd; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX workshops_workshopstepques_training_session_id_125f3dbd ON workshops_workshopstepquestionuseranswer USING btree (training_session_id);


--
-- Name: workshops_workshopstepques_workshopstepquestion_id_e1637e83; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX workshops_workshopstepques_workshopstepquestion_id_e1637e83 ON workshops_workshopstepquestion_dimensions USING btree (workshopstepquestion_id);


--
-- Name: workshops_workshopstepquestion_activity_type_id_83a5e2c6; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX workshops_workshopstepquestion_activity_type_id_83a5e2c6 ON workshops_workshopstepquestion USING btree (activity_type_id);


--
-- Name: workshops_workshopstepquestion_dimensions_dimension_id_292a0a1a; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX workshops_workshopstepquestion_dimensions_dimension_id_292a0a1a ON workshops_workshopstepquestion_dimensions USING btree (dimension_id);


--
-- Name: workshops_workshopstepquestion_training_id_797e7620; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX workshops_workshopstepquestion_training_id_797e7620 ON workshops_workshopstepquestion USING btree (training_id);


--
-- Name: workshops_workshopstepquestionanswer_first_update_id_8a13c35e; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX workshops_workshopstepquestionanswer_first_update_id_8a13c35e ON workshops_workshopstepquestionanswer USING btree (first_update_id);


--
-- Name: workshops_workshopstepquestionanswer_last_update_id_38bc0141; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX workshops_workshopstepquestionanswer_last_update_id_38bc0141 ON workshops_workshopstepquestionanswer USING btree (last_update_id);


--
-- Name: workshops_workshopstepquestionanswer_parent_version_id_7a90b18a; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX workshops_workshopstepquestionanswer_parent_version_id_7a90b18a ON workshops_workshopstepquestionanswer USING btree (parent_version_id);


--
-- Name: workshops_workshopstepquestionanswer_question_id_1cb402c4; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX workshops_workshopstepquestionanswer_question_id_1cb402c4 ON workshops_workshopstepquestionanswer USING btree (question_id);


--
-- Name: workshops_workshopstepquestionanswer_sort_order_526e9366; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX workshops_workshopstepquestionanswer_sort_order_526e9366 ON workshops_workshopstepquestionanswer USING btree (sort_order);


--
-- Name: workshops_workshopstepquestionuseranswer_answer_id_b31873b0; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX workshops_workshopstepquestionuseranswer_answer_id_b31873b0 ON workshops_workshopstepquestionuseranswer USING btree (answer_id);


--
-- Name: workshops_workshopstepquestionuseranswer_question_id_3b4f07ac; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX workshops_workshopstepquestionuseranswer_question_id_3b4f07ac ON workshops_workshopstepquestionuseranswer USING btree (question_id);


--
-- Name: workshops_workshopstepquestionuseranswer_user_id_95a9b07d; Type: INDEX; Schema: public; Owner: denoixclement
--

CREATE INDEX workshops_workshopstepquestionuseranswer_user_id_95a9b07d ON workshops_workshopstepquestionuseranswer USING btree (user_id);


--
-- Name: accounts_avatar accounts_avatar_first_update_id_8c7b508d_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY accounts_avatar
    ADD CONSTRAINT accounts_avatar_first_update_id_8c7b508d_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: accounts_avatar accounts_avatar_last_update_id_fb78cd7e_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY accounts_avatar
    ADD CONSTRAINT accounts_avatar_last_update_id_fb78cd7e_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: accounts_duplicatedmtpuser accounts_duplicatedm_duplicate_user_id_8e640241_fk_accounts_; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY accounts_duplicatedmtpuser
    ADD CONSTRAINT accounts_duplicatedm_duplicate_user_id_8e640241_fk_accounts_ FOREIGN KEY (duplicate_user_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: accounts_duplicatedmtpuser accounts_duplicatedm_first_update_id_74474fc6_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY accounts_duplicatedmtpuser
    ADD CONSTRAINT accounts_duplicatedm_first_update_id_74474fc6_fk_sync_upda FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: accounts_duplicatedmtpuser accounts_duplicatedm_last_update_id_0e94b644_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY accounts_duplicatedmtpuser
    ADD CONSTRAINT accounts_duplicatedm_last_update_id_0e94b644_fk_sync_upda FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: accounts_duplicatedmtpuser accounts_duplicatedm_origin_user_id_a02eec79_fk_accounts_; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY accounts_duplicatedmtpuser
    ADD CONSTRAINT accounts_duplicatedm_origin_user_id_a02eec79_fk_accounts_ FOREIGN KEY (origin_user_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: accounts_duplicatedmtpuser accounts_duplicatedm_original_user_id_4f5856b3_fk_accounts_; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY accounts_duplicatedmtpuser
    ADD CONSTRAINT accounts_duplicatedm_original_user_id_4f5856b3_fk_accounts_ FOREIGN KEY (original_user_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: accounts_group accounts_group_first_update_id_6373b459_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY accounts_group
    ADD CONSTRAINT accounts_group_first_update_id_6373b459_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: accounts_group accounts_group_last_update_id_bd1db3b3_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY accounts_group
    ADD CONSTRAINT accounts_group_last_update_id_bd1db3b3_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: accounts_group accounts_group_parent_id_08d19d04_fk_accounts_group_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY accounts_group
    ADD CONSTRAINT accounts_group_parent_id_08d19d04_fk_accounts_group_id FOREIGN KEY (parent_id) REFERENCES accounts_group(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: accounts_group accounts_group_type_id_d35c7bfd_fk_accounts_grouptype_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY accounts_group
    ADD CONSTRAINT accounts_group_type_id_d35c7bfd_fk_accounts_grouptype_id FOREIGN KEY (type_id) REFERENCES accounts_grouptype(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: accounts_grouprole accounts_grouprole_first_update_id_ee2eb774_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY accounts_grouprole
    ADD CONSTRAINT accounts_grouprole_first_update_id_ee2eb774_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: accounts_grouprole accounts_grouprole_group_id_508d3345_fk_accounts_group_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY accounts_grouprole
    ADD CONSTRAINT accounts_grouprole_group_id_508d3345_fk_accounts_group_id FOREIGN KEY (group_id) REFERENCES accounts_group(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: accounts_grouprole accounts_grouprole_last_update_id_65d9ae5e_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY accounts_grouprole
    ADD CONSTRAINT accounts_grouprole_last_update_id_65d9ae5e_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: accounts_grouprole accounts_grouprole_user_id_9508a7a7_fk_accounts_mtpuser_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY accounts_grouprole
    ADD CONSTRAINT accounts_grouprole_user_id_9508a7a7_fk_accounts_mtpuser_id FOREIGN KEY (user_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: accounts_groupset accounts_groupset_first_update_id_3d8e011f_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY accounts_groupset
    ADD CONSTRAINT accounts_groupset_first_update_id_3d8e011f_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: accounts_groupset accounts_groupset_last_update_id_91bc5749_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY accounts_groupset
    ADD CONSTRAINT accounts_groupset_last_update_id_91bc5749_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: accounts_groupset_mgroups accounts_groupset_mg_group_id_54b51137_fk_accounts_; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY accounts_groupset_mgroups
    ADD CONSTRAINT accounts_groupset_mg_group_id_54b51137_fk_accounts_ FOREIGN KEY (group_id) REFERENCES accounts_group(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: accounts_groupset_mgroups accounts_groupset_mg_groupset_id_c1592f2c_fk_accounts_; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY accounts_groupset_mgroups
    ADD CONSTRAINT accounts_groupset_mg_groupset_id_c1592f2c_fk_accounts_ FOREIGN KEY (groupset_id) REFERENCES accounts_groupset(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: accounts_grouptype accounts_grouptype_first_update_id_b70bd515_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY accounts_grouptype
    ADD CONSTRAINT accounts_grouptype_first_update_id_b70bd515_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: accounts_grouptype accounts_grouptype_last_update_id_1cc359a6_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY accounts_grouptype
    ADD CONSTRAINT accounts_grouptype_last_update_id_1cc359a6_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: accounts_mtpuser accounts_mtpuser_first_update_id_63d6daa4_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY accounts_mtpuser
    ADD CONSTRAINT accounts_mtpuser_first_update_id_63d6daa4_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: accounts_mtpuser_groups accounts_mtpuser_gro_mtpuser_id_b0293661_fk_accounts_; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY accounts_mtpuser_groups
    ADD CONSTRAINT accounts_mtpuser_gro_mtpuser_id_b0293661_fk_accounts_ FOREIGN KEY (mtpuser_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: accounts_mtpuser_groups accounts_mtpuser_groups_group_id_55bda1e5_fk_auth_group_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY accounts_mtpuser_groups
    ADD CONSTRAINT accounts_mtpuser_groups_group_id_55bda1e5_fk_auth_group_id FOREIGN KEY (group_id) REFERENCES auth_group(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: accounts_mtpuser accounts_mtpuser_last_update_id_2bd2e8b5_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY accounts_mtpuser
    ADD CONSTRAINT accounts_mtpuser_last_update_id_2bd2e8b5_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: accounts_mtpuser_photos accounts_mtpuser_pho_avatar_id_9e328181_fk_accounts_; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY accounts_mtpuser_photos
    ADD CONSTRAINT accounts_mtpuser_pho_avatar_id_9e328181_fk_accounts_ FOREIGN KEY (avatar_id) REFERENCES accounts_avatar(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: accounts_mtpuser_photos accounts_mtpuser_pho_mtpuser_id_a1cb7dd7_fk_accounts_; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY accounts_mtpuser_photos
    ADD CONSTRAINT accounts_mtpuser_pho_mtpuser_id_a1cb7dd7_fk_accounts_ FOREIGN KEY (mtpuser_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: accounts_mtpuser accounts_mtpuser_photo_id_577b2faf_fk_accounts_avatar_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY accounts_mtpuser
    ADD CONSTRAINT accounts_mtpuser_photo_id_577b2faf_fk_accounts_avatar_id FOREIGN KEY (photo_id) REFERENCES accounts_avatar(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: accounts_mtpuser_user_permissions accounts_mtpuser_use_mtpuser_id_ef8fa2e7_fk_accounts_; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY accounts_mtpuser_user_permissions
    ADD CONSTRAINT accounts_mtpuser_use_mtpuser_id_ef8fa2e7_fk_accounts_ FOREIGN KEY (mtpuser_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: accounts_mtpuser_user_permissions accounts_mtpuser_use_permission_id_55868375_fk_auth_perm; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY accounts_mtpuser_user_permissions
    ADD CONSTRAINT accounts_mtpuser_use_permission_id_55868375_fk_auth_perm FOREIGN KEY (permission_id) REFERENCES auth_permission(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_assessableactivitypartuserscore assessments_assessab_activity_part_type_i_5ffa4faf_fk_django_co; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_assessableactivitypartuserscore
    ADD CONSTRAINT assessments_assessab_activity_part_type_i_5ffa4faf_fk_django_co FOREIGN KEY (activity_part_type_id) REFERENCES django_content_type(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_assessableactivityuserscore assessments_assessab_activity_type_id_f3e14b2c_fk_django_co; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_assessableactivityuserscore
    ADD CONSTRAINT assessments_assessab_activity_type_id_f3e14b2c_fk_django_co FOREIGN KEY (activity_type_id) REFERENCES django_content_type(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_assessableactivitypartuserscore assessments_assessab_first_update_id_79ef3127_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_assessableactivitypartuserscore
    ADD CONSTRAINT assessments_assessab_first_update_id_79ef3127_fk_sync_upda FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_assessableactivitypartuserscore assessments_assessab_last_update_id_ffba358f_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_assessableactivitypartuserscore
    ADD CONSTRAINT assessments_assessab_last_update_id_ffba358f_fk_sync_upda FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_assessableactivityuserscore assessments_assessab_session_id_3f3c6b9a_fk_trainings; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_assessableactivityuserscore
    ADD CONSTRAINT assessments_assessab_session_id_3f3c6b9a_fk_trainings FOREIGN KEY (session_id) REFERENCES trainings_trainingsession(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_assessableactivitypartuserscore assessments_assessab_session_id_892e0b28_fk_trainings; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_assessableactivitypartuserscore
    ADD CONSTRAINT assessments_assessab_session_id_892e0b28_fk_trainings FOREIGN KEY (session_id) REFERENCES trainings_trainingsession(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_assessableactivityuserscore assessments_assessab_user_id_01ae90eb_fk_accounts_; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_assessableactivityuserscore
    ADD CONSTRAINT assessments_assessab_user_id_01ae90eb_fk_accounts_ FOREIGN KEY (user_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_assessableactivitypartuserscore assessments_assessab_user_id_df8d09c4_fk_accounts_; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_assessableactivitypartuserscore
    ADD CONSTRAINT assessments_assessab_user_id_df8d09c4_fk_accounts_ FOREIGN KEY (user_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_certificationcompetencythreshold assessments_certific_competency_id_5344b642_fk_assessmen; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_certificationcompetencythreshold
    ADD CONSTRAINT assessments_certific_competency_id_5344b642_fk_assessmen FOREIGN KEY (competency_id) REFERENCES assessments_competency(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_certificationprogramuserstatus assessments_certific_first_update_id_1fb5e7fe_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_certificationprogramuserstatus
    ADD CONSTRAINT assessments_certific_first_update_id_1fb5e7fe_fk_sync_upda FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_certificationprogram assessments_certific_first_update_id_69bcc23b_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_certificationprogram
    ADD CONSTRAINT assessments_certific_first_update_id_69bcc23b_fk_sync_upda FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_certificationcompetencythreshold assessments_certific_first_update_id_787b32ba_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_certificationcompetencythreshold
    ADD CONSTRAINT assessments_certific_first_update_id_787b32ba_fk_sync_upda FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_certificationstatus assessments_certific_first_update_id_9a66342a_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_certificationstatus
    ADD CONSTRAINT assessments_certific_first_update_id_9a66342a_fk_sync_upda FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_certificationprogramuserstatus assessments_certific_last_update_id_436753c6_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_certificationprogramuserstatus
    ADD CONSTRAINT assessments_certific_last_update_id_436753c6_fk_sync_upda FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_certificationstatus assessments_certific_last_update_id_73eef193_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_certificationstatus
    ADD CONSTRAINT assessments_certific_last_update_id_73eef193_fk_sync_upda FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_certificationprogram assessments_certific_last_update_id_746dc56f_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_certificationprogram
    ADD CONSTRAINT assessments_certific_last_update_id_746dc56f_fk_sync_upda FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_certificationcompetencythreshold assessments_certific_last_update_id_ebb199f3_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_certificationcompetencythreshold
    ADD CONSTRAINT assessments_certific_last_update_id_ebb199f3_fk_sync_upda FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_certificationprogramuserstatus assessments_certific_program_id_1cc810a1_fk_assessmen; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_certificationprogramuserstatus
    ADD CONSTRAINT assessments_certific_program_id_1cc810a1_fk_assessmen FOREIGN KEY (program_id) REFERENCES assessments_certificationprogram(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_certificationstatus assessments_certific_program_id_c2594c80_fk_assessmen; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_certificationstatus
    ADD CONSTRAINT assessments_certific_program_id_c2594c80_fk_assessmen FOREIGN KEY (program_id) REFERENCES assessments_certificationprogram(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_certificationprogramuserstatus assessments_certific_session_id_bfa99f55_fk_trainings; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_certificationprogramuserstatus
    ADD CONSTRAINT assessments_certific_session_id_bfa99f55_fk_trainings FOREIGN KEY (session_id) REFERENCES trainings_trainingsession(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_certificationcompetencythreshold assessments_certific_status_id_27d344ba_fk_assessmen; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_certificationcompetencythreshold
    ADD CONSTRAINT assessments_certific_status_id_27d344ba_fk_assessmen FOREIGN KEY (status_id) REFERENCES assessments_certificationstatus(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_certificationprogramuserstatus assessments_certific_status_id_ccca99f4_fk_assessmen; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_certificationprogramuserstatus
    ADD CONSTRAINT assessments_certific_status_id_ccca99f4_fk_assessmen FOREIGN KEY (status_id) REFERENCES assessments_certificationstatus(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_certificationprogramuserstatus assessments_certific_sync_trigger_user_id_d0c9beb3_fk_accounts_; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_certificationprogramuserstatus
    ADD CONSTRAINT assessments_certific_sync_trigger_user_id_d0c9beb3_fk_accounts_ FOREIGN KEY (sync_trigger_user_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_certificationprogram assessments_certific_tree_id_0f89a1b1_fk_assessmen; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_certificationprogram
    ADD CONSTRAINT assessments_certific_tree_id_0f89a1b1_fk_assessmen FOREIGN KEY (tree_id) REFERENCES assessments_competencytree(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_certificationprogramuserstatus assessments_certific_user_id_cfae472a_fk_accounts_; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_certificationprogramuserstatus
    ADD CONSTRAINT assessments_certific_user_id_cfae472a_fk_accounts_ FOREIGN KEY (user_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_competencyuserscore assessments_competen_competency_id_29692b57_fk_assessmen; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_competencyuserscore
    ADD CONSTRAINT assessments_competen_competency_id_29692b57_fk_assessmen FOREIGN KEY (competency_id) REFERENCES assessments_competency(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_competency assessments_competen_first_update_id_16efeb4e_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_competency
    ADD CONSTRAINT assessments_competen_first_update_id_16efeb4e_fk_sync_upda FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_competencytree assessments_competen_first_update_id_b0eca5ae_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_competencytree
    ADD CONSTRAINT assessments_competen_first_update_id_b0eca5ae_fk_sync_upda FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_competencytree assessments_competen_group_id_00024468_fk_accounts_; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_competencytree
    ADD CONSTRAINT assessments_competen_group_id_00024468_fk_accounts_ FOREIGN KEY (group_id) REFERENCES accounts_group(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_competencytree assessments_competen_job_profile_id_8deb610e_fk_accounts_; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_competencytree
    ADD CONSTRAINT assessments_competen_job_profile_id_8deb610e_fk_accounts_ FOREIGN KEY (job_profile_id) REFERENCES accounts_group(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_competency assessments_competen_last_update_id_107c824e_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_competency
    ADD CONSTRAINT assessments_competen_last_update_id_107c824e_fk_sync_upda FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_competencytree assessments_competen_last_update_id_8f617aaa_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_competencytree
    ADD CONSTRAINT assessments_competen_last_update_id_8f617aaa_fk_sync_upda FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_competency assessments_competen_original_version_id_524be0eb_fk_assessmen; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_competency
    ADD CONSTRAINT assessments_competen_original_version_id_524be0eb_fk_assessmen FOREIGN KEY (original_version_id) REFERENCES assessments_competency(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_competencytree assessments_competen_original_version_id_d7d974bf_fk_assessmen; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_competencytree
    ADD CONSTRAINT assessments_competen_original_version_id_d7d974bf_fk_assessmen FOREIGN KEY (original_version_id) REFERENCES assessments_competencytree(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_competency assessments_competen_parent_version_id_d5a2afa0_fk_assessmen; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_competency
    ADD CONSTRAINT assessments_competen_parent_version_id_d5a2afa0_fk_assessmen FOREIGN KEY (parent_version_id) REFERENCES assessments_competency(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_competencytree assessments_competen_parent_version_id_eb6851a1_fk_assessmen; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_competencytree
    ADD CONSTRAINT assessments_competen_parent_version_id_eb6851a1_fk_assessmen FOREIGN KEY (parent_version_id) REFERENCES assessments_competencytree(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_competencytreeuserscore assessments_competen_session_id_b4f89be0_fk_trainings; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_competencytreeuserscore
    ADD CONSTRAINT assessments_competen_session_id_b4f89be0_fk_trainings FOREIGN KEY (session_id) REFERENCES trainings_trainingsession(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_competencyuserscore assessments_competen_session_id_f3e11562_fk_trainings; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_competencyuserscore
    ADD CONSTRAINT assessments_competen_session_id_f3e11562_fk_trainings FOREIGN KEY (session_id) REFERENCES trainings_trainingsession(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_competency assessments_competen_tree_id_a6007bb4_fk_assessmen; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_competency
    ADD CONSTRAINT assessments_competen_tree_id_a6007bb4_fk_assessmen FOREIGN KEY (tree_id) REFERENCES assessments_competencytree(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_competencytreeuserscore assessments_competen_tree_id_d7cc8b46_fk_assessmen; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_competencytreeuserscore
    ADD CONSTRAINT assessments_competen_tree_id_d7cc8b46_fk_assessmen FOREIGN KEY (tree_id) REFERENCES assessments_competencytree(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_competencyuserscore assessments_competen_user_id_2de5d336_fk_accounts_; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_competencyuserscore
    ADD CONSTRAINT assessments_competen_user_id_2de5d336_fk_accounts_ FOREIGN KEY (user_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_competencytreeuserscore assessments_competen_user_id_b9b1eb5f_fk_accounts_; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_competencytreeuserscore
    ADD CONSTRAINT assessments_competen_user_id_b9b1eb5f_fk_accounts_ FOREIGN KEY (user_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_curriculum assessments_curricul_business_unit_id_bc4d029a_fk_accounts_; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_curriculum
    ADD CONSTRAINT assessments_curricul_business_unit_id_bc4d029a_fk_accounts_ FOREIGN KEY (business_unit_id) REFERENCES accounts_group(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_curriculum_mgroups assessments_curricul_curriculum_id_c519f8da_fk_assessmen; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_curriculum_mgroups
    ADD CONSTRAINT assessments_curricul_curriculum_id_c519f8da_fk_assessmen FOREIGN KEY (curriculum_id) REFERENCES assessments_curriculum(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_curriculum_active_recommendation_levels assessments_curricul_curriculum_id_dc82863b_fk_assessmen; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_curriculum_active_recommendation_levels
    ADD CONSTRAINT assessments_curricul_curriculum_id_dc82863b_fk_assessmen FOREIGN KEY (curriculum_id) REFERENCES assessments_curriculum(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_curriculum assessments_curricul_first_update_id_471eea47_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_curriculum
    ADD CONSTRAINT assessments_curricul_first_update_id_471eea47_fk_sync_upda FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_curriculum_mgroups assessments_curricul_group_id_26bd75df_fk_accounts_; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_curriculum_mgroups
    ADD CONSTRAINT assessments_curricul_group_id_26bd75df_fk_accounts_ FOREIGN KEY (group_id) REFERENCES accounts_group(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_curriculum assessments_curricul_job_profile_id_57890b86_fk_accounts_; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_curriculum
    ADD CONSTRAINT assessments_curricul_job_profile_id_57890b86_fk_accounts_ FOREIGN KEY (job_profile_id) REFERENCES accounts_group(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_curriculum assessments_curricul_last_update_id_56d077ca_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_curriculum
    ADD CONSTRAINT assessments_curricul_last_update_id_56d077ca_fk_sync_upda FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_curriculum_active_recommendation_levels assessments_curricul_recommendationlevel__1701fb88_fk_assessmen; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_curriculum_active_recommendation_levels
    ADD CONSTRAINT assessments_curricul_recommendationlevel__1701fb88_fk_assessmen FOREIGN KEY (recommendationlevel_id) REFERENCES assessments_recommendationlevel(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_dimension assessments_dimensio_competency_id_038aa967_fk_assessmen; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_dimension
    ADD CONSTRAINT assessments_dimensio_competency_id_038aa967_fk_assessmen FOREIGN KEY (competency_id) REFERENCES assessments_competency(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_dimensionuserscore assessments_dimensio_dimension_id_a167227f_fk_assessmen; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_dimensionuserscore
    ADD CONSTRAINT assessments_dimensio_dimension_id_a167227f_fk_assessmen FOREIGN KEY (dimension_id) REFERENCES assessments_dimension(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_dimensiontrainingweight assessments_dimensio_dimension_id_f432fa06_fk_assessmen; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_dimensiontrainingweight
    ADD CONSTRAINT assessments_dimensio_dimension_id_f432fa06_fk_assessmen FOREIGN KEY (dimension_id) REFERENCES assessments_dimension(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_dimensiontrainingweight assessments_dimensio_first_update_id_1f69b2b5_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_dimensiontrainingweight
    ADD CONSTRAINT assessments_dimensio_first_update_id_1f69b2b5_fk_sync_upda FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_dimension assessments_dimensio_first_update_id_bf90e60c_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_dimension
    ADD CONSTRAINT assessments_dimensio_first_update_id_bf90e60c_fk_sync_upda FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_dimensiontrainingweight assessments_dimensio_last_update_id_71ba01be_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_dimensiontrainingweight
    ADD CONSTRAINT assessments_dimensio_last_update_id_71ba01be_fk_sync_upda FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_dimension assessments_dimensio_original_version_id_d1299eca_fk_assessmen; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_dimension
    ADD CONSTRAINT assessments_dimensio_original_version_id_d1299eca_fk_assessmen FOREIGN KEY (original_version_id) REFERENCES assessments_dimension(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_dimension assessments_dimensio_parent_version_id_f45c702c_fk_assessmen; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_dimension
    ADD CONSTRAINT assessments_dimensio_parent_version_id_f45c702c_fk_assessmen FOREIGN KEY (parent_version_id) REFERENCES assessments_dimension(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_dimensionuserscore assessments_dimensio_session_id_dfed6cc1_fk_trainings; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_dimensionuserscore
    ADD CONSTRAINT assessments_dimensio_session_id_dfed6cc1_fk_trainings FOREIGN KEY (session_id) REFERENCES trainings_trainingsession(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_dimensiontrainingweight assessments_dimensio_training_id_e0fde316_fk_trainings; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_dimensiontrainingweight
    ADD CONSTRAINT assessments_dimensio_training_id_e0fde316_fk_trainings FOREIGN KEY (training_id) REFERENCES trainings_training(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_dimensionuserscore assessments_dimensio_user_id_8db5191f_fk_accounts_; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_dimensionuserscore
    ADD CONSTRAINT assessments_dimensio_user_id_8db5191f_fk_accounts_ FOREIGN KEY (user_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_dimension assessments_dimension_last_update_id_0223ed8b_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_dimension
    ADD CONSTRAINT assessments_dimension_last_update_id_0223ed8b_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_lesson assessments_lesson_curriculum_id_bb465669_fk_assessmen; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_lesson
    ADD CONSTRAINT assessments_lesson_curriculum_id_bb465669_fk_assessmen FOREIGN KEY (curriculum_id) REFERENCES assessments_curriculum(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_lesson assessments_lesson_first_update_id_8926d418_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_lesson
    ADD CONSTRAINT assessments_lesson_first_update_id_8926d418_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_lesson assessments_lesson_last_update_id_ea5074dd_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_lesson
    ADD CONSTRAINT assessments_lesson_last_update_id_ea5074dd_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_lesson assessments_lesson_reference_id_54be8114_fk_assessmen; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_lesson
    ADD CONSTRAINT assessments_lesson_reference_id_54be8114_fk_assessmen FOREIGN KEY (reference_id) REFERENCES assessments_lessonreference(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_lesson assessments_lesson_topic_id_bd604f9a_fk_assessments_topic_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_lesson
    ADD CONSTRAINT assessments_lesson_topic_id_bd604f9a_fk_assessments_topic_id FOREIGN KEY (topic_id) REFERENCES assessments_topic(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_lessondimensionweight assessments_lessondi_dimension_id_6a036a2e_fk_assessmen; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_lessondimensionweight
    ADD CONSTRAINT assessments_lessondi_dimension_id_6a036a2e_fk_assessmen FOREIGN KEY (dimension_id) REFERENCES assessments_dimension(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_lessondimensionweight assessments_lessondi_first_update_id_01779482_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_lessondimensionweight
    ADD CONSTRAINT assessments_lessondi_first_update_id_01779482_fk_sync_upda FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_lessondimensionweight assessments_lessondi_last_update_id_09ca827e_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_lessondimensionweight
    ADD CONSTRAINT assessments_lessondi_last_update_id_09ca827e_fk_sync_upda FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_lessondimensionweight assessments_lessondi_lesson_id_3a783b70_fk_assessmen; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_lessondimensionweight
    ADD CONSTRAINT assessments_lessondi_lesson_id_3a783b70_fk_assessmen FOREIGN KEY (lesson_id) REFERENCES assessments_lesson(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_lessonreference assessments_lessonre_first_update_id_cc82b24f_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_lessonreference
    ADD CONSTRAINT assessments_lessonre_first_update_id_cc82b24f_fk_sync_upda FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_lessonrecommendationthreshold assessments_lessonre_first_update_id_d8d97e1d_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_lessonrecommendationthreshold
    ADD CONSTRAINT assessments_lessonre_first_update_id_d8d97e1d_fk_sync_upda FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_lessonreference assessments_lessonre_last_update_id_1375900e_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_lessonreference
    ADD CONSTRAINT assessments_lessonre_last_update_id_1375900e_fk_sync_upda FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_lessonrecommendationthreshold assessments_lessonre_last_update_id_660a50ec_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_lessonrecommendationthreshold
    ADD CONSTRAINT assessments_lessonre_last_update_id_660a50ec_fk_sync_upda FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_lessonrecommendationthreshold assessments_lessonre_lesson_id_3df78b8c_fk_assessmen; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_lessonrecommendationthreshold
    ADD CONSTRAINT assessments_lessonre_lesson_id_3df78b8c_fk_assessmen FOREIGN KEY (lesson_id) REFERENCES assessments_lesson(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_lessonrecommendationthreshold assessments_lessonre_level_id_8dae5a29_fk_assessmen; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_lessonrecommendationthreshold
    ADD CONSTRAINT assessments_lessonre_level_id_8dae5a29_fk_assessmen FOREIGN KEY (level_id) REFERENCES assessments_recommendationlevel(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_recommendationlevel assessments_recommen_first_update_id_e7bb626d_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_recommendationlevel
    ADD CONSTRAINT assessments_recommen_first_update_id_e7bb626d_fk_sync_upda FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_recommendationlevel assessments_recommen_last_update_id_8ced75f7_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_recommendationlevel
    ADD CONSTRAINT assessments_recommen_last_update_id_8ced75f7_fk_sync_upda FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_topic assessments_topic_curriculum_id_32e18fa6_fk_assessmen; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_topic
    ADD CONSTRAINT assessments_topic_curriculum_id_32e18fa6_fk_assessmen FOREIGN KEY (curriculum_id) REFERENCES assessments_curriculum(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_topic assessments_topic_first_update_id_2dbbd2be_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_topic
    ADD CONSTRAINT assessments_topic_first_update_id_2dbbd2be_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_topic assessments_topic_last_update_id_43473037_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_topic
    ADD CONSTRAINT assessments_topic_last_update_id_43473037_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_userlessonrecommendation assessments_userless_certification_id_dd4140a0_fk_assessmen; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_userlessonrecommendation
    ADD CONSTRAINT assessments_userless_certification_id_dd4140a0_fk_assessmen FOREIGN KEY (certification_id) REFERENCES assessments_certificationprogramuserstatus(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_userlessonrecommendation assessments_userless_first_update_id_978bd29e_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_userlessonrecommendation
    ADD CONSTRAINT assessments_userless_first_update_id_978bd29e_fk_sync_upda FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_userlessonrecommendation assessments_userless_last_update_id_d0902664_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_userlessonrecommendation
    ADD CONSTRAINT assessments_userless_last_update_id_d0902664_fk_sync_upda FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_userlessonrecommendation assessments_userless_lesson_id_e234db55_fk_assessmen; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_userlessonrecommendation
    ADD CONSTRAINT assessments_userless_lesson_id_e234db55_fk_assessmen FOREIGN KEY (lesson_id) REFERENCES assessments_lesson(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: assessments_userlessonrecommendation assessments_userless_level_id_8a774d26_fk_assessmen; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY assessments_userlessonrecommendation
    ADD CONSTRAINT assessments_userless_level_id_8a774d26_fk_assessmen FOREIGN KEY (level_id) REFERENCES assessments_recommendationlevel(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: auth_group_permissions auth_group_permissio_permission_id_84c5c92e_fk_auth_perm; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY auth_group_permissions
    ADD CONSTRAINT auth_group_permissio_permission_id_84c5c92e_fk_auth_perm FOREIGN KEY (permission_id) REFERENCES auth_permission(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: auth_group_permissions auth_group_permissions_group_id_b120cbf9_fk_auth_group_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY auth_group_permissions
    ADD CONSTRAINT auth_group_permissions_group_id_b120cbf9_fk_auth_group_id FOREIGN KEY (group_id) REFERENCES auth_group(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: auth_permission auth_permission_content_type_id_2f476e4b_fk_django_co; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY auth_permission
    ADD CONSTRAINT auth_permission_content_type_id_2f476e4b_fk_django_co FOREIGN KEY (content_type_id) REFERENCES django_content_type(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: brainstormers_brainstormerpropositiongroup brainstormers_brains_brainstormer_id_05e5a3f2_fk_brainstor; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY brainstormers_brainstormerpropositiongroup
    ADD CONSTRAINT brainstormers_brains_brainstormer_id_05e5a3f2_fk_brainstor FOREIGN KEY (brainstormer_id) REFERENCES brainstormers_brainstormer(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: brainstormers_brainstormerproposition brainstormers_brains_brainstormer_id_c8f3d742_fk_brainstor; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY brainstormers_brainstormerproposition
    ADD CONSTRAINT brainstormers_brains_brainstormer_id_c8f3d742_fk_brainstor FOREIGN KEY (brainstormer_id) REFERENCES brainstormers_brainstormer(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: brainstormers_brainstormerproposition_groups brainstormers_brains_brainstormerproposit_05473ce6_fk_brainstor; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY brainstormers_brainstormerproposition_groups
    ADD CONSTRAINT brainstormers_brains_brainstormerproposit_05473ce6_fk_brainstor FOREIGN KEY (brainstormerpropositiongroup_id) REFERENCES brainstormers_brainstormerpropositiongroup(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: brainstormers_brainstormerproposition_groups brainstormers_brains_brainstormerproposit_624aa184_fk_brainstor; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY brainstormers_brainstormerproposition_groups
    ADD CONSTRAINT brainstormers_brains_brainstormerproposit_624aa184_fk_brainstor FOREIGN KEY (brainstormerproposition_id) REFERENCES brainstormers_brainstormerproposition(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: brainstormers_brainstormer brainstormers_brains_first_update_id_28c04abf_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY brainstormers_brainstormer
    ADD CONSTRAINT brainstormers_brains_first_update_id_28c04abf_fk_sync_upda FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: brainstormers_brainstormerpropositiongroup brainstormers_brains_first_update_id_d533eaf3_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY brainstormers_brainstormerpropositiongroup
    ADD CONSTRAINT brainstormers_brains_first_update_id_d533eaf3_fk_sync_upda FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: brainstormers_brainstormerproposition brainstormers_brains_first_update_id_df91c09d_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY brainstormers_brainstormerproposition
    ADD CONSTRAINT brainstormers_brains_first_update_id_df91c09d_fk_sync_upda FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: brainstormers_brainstormerpropositiongroup brainstormers_brains_last_update_id_07f02d10_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY brainstormers_brainstormerpropositiongroup
    ADD CONSTRAINT brainstormers_brains_last_update_id_07f02d10_fk_sync_upda FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: brainstormers_brainstormer brainstormers_brains_last_update_id_e0119d39_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY brainstormers_brainstormer
    ADD CONSTRAINT brainstormers_brains_last_update_id_e0119d39_fk_sync_upda FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: brainstormers_brainstormerproposition brainstormers_brains_last_update_id_ffbe3c9e_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY brainstormers_brainstormerproposition
    ADD CONSTRAINT brainstormers_brains_last_update_id_ffbe3c9e_fk_sync_upda FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: brainstormers_brainstormer brainstormers_brains_session_id_05705033_fk_trainings; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY brainstormers_brainstormer
    ADD CONSTRAINT brainstormers_brains_session_id_05705033_fk_trainings FOREIGN KEY (session_id) REFERENCES trainings_trainingsession(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: brainstormers_brainstormertemplate brainstormers_brains_trainingactivity_ptr_a7db87d5_fk_trainings; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY brainstormers_brainstormertemplate
    ADD CONSTRAINT brainstormers_brains_trainingactivity_ptr_a7db87d5_fk_trainings FOREIGN KEY (trainingactivity_ptr_id) REFERENCES trainings_trainingactivity(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: brainstormers_brainstormerproposition brainstormers_brains_user_id_b6da9ff9_fk_accounts_; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY brainstormers_brainstormerproposition
    ADD CONSTRAINT brainstormers_brains_user_id_b6da9ff9_fk_accounts_ FOREIGN KEY (user_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: django_admin_log django_admin_log_content_type_id_c4bce8eb_fk_django_co; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY django_admin_log
    ADD CONSTRAINT django_admin_log_content_type_id_c4bce8eb_fk_django_co FOREIGN KEY (content_type_id) REFERENCES django_content_type(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: django_admin_log django_admin_log_user_id_c564eba6_fk_accounts_mtpuser_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY django_admin_log
    ADD CONSTRAINT django_admin_log_user_id_c564eba6_fk_accounts_mtpuser_id FOREIGN KEY (user_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: documents_backgroundexecution_mgroups documents_background_backgroundexecution__c4d9740d_fk_documents; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY documents_backgroundexecution_mgroups
    ADD CONSTRAINT documents_background_backgroundexecution__c4d9740d_fk_documents FOREIGN KEY (backgroundexecution_id) REFERENCES documents_backgroundexecution(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: documents_backgroundexecution_auto_mgroups documents_background_backgroundexecution__dc8663f4_fk_documents; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY documents_backgroundexecution_auto_mgroups
    ADD CONSTRAINT documents_background_backgroundexecution__dc8663f4_fk_documents FOREIGN KEY (backgroundexecution_id) REFERENCES documents_backgroundexecution(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: documents_backgroundexecution documents_background_first_update_id_67a033bd_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY documents_backgroundexecution
    ADD CONSTRAINT documents_background_first_update_id_67a033bd_fk_sync_upda FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: documents_backgroundexecution_mgroups documents_background_group_id_20e53e1e_fk_accounts_; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY documents_backgroundexecution_mgroups
    ADD CONSTRAINT documents_background_group_id_20e53e1e_fk_accounts_ FOREIGN KEY (group_id) REFERENCES accounts_group(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: documents_backgroundexecution_auto_mgroups documents_background_group_id_84209833_fk_accounts_; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY documents_backgroundexecution_auto_mgroups
    ADD CONSTRAINT documents_background_group_id_84209833_fk_accounts_ FOREIGN KEY (group_id) REFERENCES accounts_group(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: documents_backgroundexecution documents_background_last_update_id_00417dc7_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY documents_backgroundexecution
    ADD CONSTRAINT documents_background_last_update_id_00417dc7_fk_sync_upda FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: documents_document documents_document_trainingactivity_ptr_c4af1cc3_fk_trainings; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY documents_document
    ADD CONSTRAINT documents_document_trainingactivity_ptr_c4af1cc3_fk_trainings FOREIGN KEY (trainingactivity_ptr_id) REFERENCES trainings_trainingactivity(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: documents_note documents_note_first_update_id_b961d41e_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY documents_note
    ADD CONSTRAINT documents_note_first_update_id_b961d41e_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: documents_note documents_note_last_update_id_11d6a051_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY documents_note
    ADD CONSTRAINT documents_note_last_update_id_11d6a051_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: documents_note documents_note_session_id_c80e4c5d_fk_trainings; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY documents_note
    ADD CONSTRAINT documents_note_session_id_c80e4c5d_fk_trainings FOREIGN KEY (session_id) REFERENCES trainings_trainingsession(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: documents_note documents_note_user_id_cab59bae_fk_accounts_mtpuser_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY documents_note
    ADD CONSTRAINT documents_note_user_id_cab59bae_fk_accounts_mtpuser_id FOREIGN KEY (user_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: easy_thumbnails_thumbnail easy_thumbnails_thum_source_id_5b57bc77_fk_easy_thum; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY easy_thumbnails_thumbnail
    ADD CONSTRAINT easy_thumbnails_thum_source_id_5b57bc77_fk_easy_thum FOREIGN KEY (source_id) REFERENCES easy_thumbnails_source(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: easy_thumbnails_thumbnaildimensions easy_thumbnails_thum_thumbnail_id_c3a0c549_fk_easy_thum; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY easy_thumbnails_thumbnaildimensions
    ADD CONSTRAINT easy_thumbnails_thum_thumbnail_id_c3a0c549_fk_easy_thum FOREIGN KEY (thumbnail_id) REFERENCES easy_thumbnails_thumbnail(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: evaluations_criterion evaluations_criterio_exercise_id_ee84b308_fk_evaluatio; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY evaluations_criterion
    ADD CONSTRAINT evaluations_criterio_exercise_id_ee84b308_fk_evaluatio FOREIGN KEY (exercise_id) REFERENCES evaluations_exercise(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: evaluations_criterion evaluations_criterio_first_update_id_5ada29ce_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY evaluations_criterion
    ADD CONSTRAINT evaluations_criterio_first_update_id_5ada29ce_fk_sync_upda FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: evaluations_criterion evaluations_criterio_original_version_id_7cc338f0_fk_evaluatio; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY evaluations_criterion
    ADD CONSTRAINT evaluations_criterio_original_version_id_7cc338f0_fk_evaluatio FOREIGN KEY (original_version_id) REFERENCES evaluations_criterion(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: evaluations_criterion evaluations_criterio_parent_version_id_20db0827_fk_evaluatio; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY evaluations_criterion
    ADD CONSTRAINT evaluations_criterio_parent_version_id_20db0827_fk_evaluatio FOREIGN KEY (parent_version_id) REFERENCES evaluations_criterion(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: evaluations_criterion evaluations_criterion_last_update_id_e483ed86_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY evaluations_criterion
    ADD CONSTRAINT evaluations_criterion_last_update_id_e483ed86_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: evaluations_evaluationgrouppermission evaluations_evaluati_evaluation_id_594c7758_fk_evaluatio; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY evaluations_evaluationgrouppermission
    ADD CONSTRAINT evaluations_evaluati_evaluation_id_594c7758_fk_evaluatio FOREIGN KEY (evaluation_id) REFERENCES evaluations_evaluation(trainingactivity_ptr_id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: evaluations_evaluationgrouppermission evaluations_evaluati_first_update_id_9d256d94_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY evaluations_evaluationgrouppermission
    ADD CONSTRAINT evaluations_evaluati_first_update_id_9d256d94_fk_sync_upda FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: evaluations_evaluationgrouppermission evaluations_evaluati_group_id_23e6ee9d_fk_accounts_; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY evaluations_evaluationgrouppermission
    ADD CONSTRAINT evaluations_evaluati_group_id_23e6ee9d_fk_accounts_ FOREIGN KEY (group_id) REFERENCES accounts_group(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: evaluations_evaluationgrouppermission evaluations_evaluati_last_update_id_d341d1ec_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY evaluations_evaluationgrouppermission
    ADD CONSTRAINT evaluations_evaluati_last_update_id_d341d1ec_fk_sync_upda FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: evaluations_evaluation evaluations_evaluati_trainingactivity_ptr_e2089e32_fk_trainings; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY evaluations_evaluation
    ADD CONSTRAINT evaluations_evaluati_trainingactivity_ptr_e2089e32_fk_trainings FOREIGN KEY (trainingactivity_ptr_id) REFERENCES trainings_trainingactivity(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: evaluations_exercise evaluations_exercise_evaluation_id_6ca8d9e3_fk_evaluatio; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY evaluations_exercise
    ADD CONSTRAINT evaluations_exercise_evaluation_id_6ca8d9e3_fk_evaluatio FOREIGN KEY (evaluation_id) REFERENCES evaluations_evaluation(trainingactivity_ptr_id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: evaluations_exercise evaluations_exercise_first_update_id_8b0fb3b5_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY evaluations_exercise
    ADD CONSTRAINT evaluations_exercise_first_update_id_8b0fb3b5_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: evaluations_exercise evaluations_exercise_last_update_id_5eb3276e_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY evaluations_exercise
    ADD CONSTRAINT evaluations_exercise_last_update_id_5eb3276e_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: evaluations_exercise evaluations_exercise_original_version_id_9ad9b365_fk_evaluatio; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY evaluations_exercise
    ADD CONSTRAINT evaluations_exercise_original_version_id_9ad9b365_fk_evaluatio FOREIGN KEY (original_version_id) REFERENCES evaluations_exercise(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: evaluations_exercise evaluations_exercise_parent_version_id_72c3e4ac_fk_evaluatio; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY evaluations_exercise
    ADD CONSTRAINT evaluations_exercise_parent_version_id_72c3e4ac_fk_evaluatio FOREIGN KEY (parent_version_id) REFERENCES evaluations_exercise(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: evaluations_rating evaluations_rating_criterion_id_26029d37_fk_evaluatio; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY evaluations_rating
    ADD CONSTRAINT evaluations_rating_criterion_id_26029d37_fk_evaluatio FOREIGN KEY (criterion_id) REFERENCES evaluations_criterion(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: evaluations_rating evaluations_rating_first_update_id_d29ff404_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY evaluations_rating
    ADD CONSTRAINT evaluations_rating_first_update_id_d29ff404_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: evaluations_rating evaluations_rating_judge_id_9a343000_fk_accounts_mtpuser_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY evaluations_rating
    ADD CONSTRAINT evaluations_rating_judge_id_9a343000_fk_accounts_mtpuser_id FOREIGN KEY (judge_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: evaluations_rating evaluations_rating_last_update_id_6bd4785c_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY evaluations_rating
    ADD CONSTRAINT evaluations_rating_last_update_id_6bd4785c_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: evaluations_rating evaluations_rating_session_id_ebe11675_fk_trainings; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY evaluations_rating
    ADD CONSTRAINT evaluations_rating_session_id_ebe11675_fk_trainings FOREIGN KEY (session_id) REFERENCES trainings_trainingsession(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: evaluations_rating evaluations_rating_trainee_id_83e9be25_fk_accounts_mtpuser_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY evaluations_rating
    ADD CONSTRAINT evaluations_rating_trainee_id_83e9be25_fk_accounts_mtpuser_id FOREIGN KEY (trainee_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: eventlog_eventlog eventlog_eventlog_first_update_id_76546abb_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY eventlog_eventlog
    ADD CONSTRAINT eventlog_eventlog_first_update_id_76546abb_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: eventlog_eventlog eventlog_eventlog_last_update_id_a6b78006_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY eventlog_eventlog
    ADD CONSTRAINT eventlog_eventlog_last_update_id_a6b78006_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: eventlog_eventlog eventlog_eventlog_source_type_id_613fc1f5_fk_django_co; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY eventlog_eventlog
    ADD CONSTRAINT eventlog_eventlog_source_type_id_613fc1f5_fk_django_co FOREIGN KEY (source_type_id) REFERENCES django_content_type(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: eventlog_eventlog eventlog_eventlog_subject_type_id_cd2b8f6f_fk_django_co; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY eventlog_eventlog
    ADD CONSTRAINT eventlog_eventlog_subject_type_id_cd2b8f6f_fk_django_co FOREIGN KEY (subject_type_id) REFERENCES django_content_type(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: eventlog_eventlog eventlog_eventlog_target_type_id_592022bf_fk_django_co; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY eventlog_eventlog
    ADD CONSTRAINT eventlog_eventlog_target_type_id_592022bf_fk_django_co FOREIGN KEY (target_type_id) REFERENCES django_content_type(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: ideas_brainstorming ideas_brainstorming_trainingactivity_ptr_5164d5d9_fk_trainings; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY ideas_brainstorming
    ADD CONSTRAINT ideas_brainstorming_trainingactivity_ptr_5164d5d9_fk_trainings FOREIGN KEY (trainingactivity_ptr_id) REFERENCES trainings_trainingactivity(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: ideas_brainstormingidea ideas_brainstormingi_brainstorming_id_c98772e4_fk_ideas_bra; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY ideas_brainstormingidea
    ADD CONSTRAINT ideas_brainstormingi_brainstorming_id_c98772e4_fk_ideas_bra FOREIGN KEY (brainstorming_id) REFERENCES ideas_brainstorming(trainingactivity_ptr_id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: ideas_brainstormingidea_tags ideas_brainstormingi_brainstormingidea_id_95887a0d_fk_ideas_bra; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY ideas_brainstormingidea_tags
    ADD CONSTRAINT ideas_brainstormingi_brainstormingidea_id_95887a0d_fk_ideas_bra FOREIGN KEY (brainstormingidea_id) REFERENCES ideas_brainstormingidea(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: ideas_brainstormingidea_tags ideas_brainstormingi_brainstormingtag_id_b56cd23f_fk_ideas_bra; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY ideas_brainstormingidea_tags
    ADD CONSTRAINT ideas_brainstormingi_brainstormingtag_id_b56cd23f_fk_ideas_bra FOREIGN KEY (brainstormingtag_id) REFERENCES ideas_brainstormingtag(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: ideas_brainstormingidea ideas_brainstormingi_first_update_id_3982d423_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY ideas_brainstormingidea
    ADD CONSTRAINT ideas_brainstormingi_first_update_id_3982d423_fk_sync_upda FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: ideas_brainstormingidea ideas_brainstormingi_last_update_id_16d669d4_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY ideas_brainstormingidea
    ADD CONSTRAINT ideas_brainstormingi_last_update_id_16d669d4_fk_sync_upda FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: ideas_brainstormingidea ideas_brainstormingi_original_version_id_d9a64710_fk_ideas_bra; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY ideas_brainstormingidea
    ADD CONSTRAINT ideas_brainstormingi_original_version_id_d9a64710_fk_ideas_bra FOREIGN KEY (original_version_id) REFERENCES ideas_brainstormingidea(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: ideas_brainstormingidea ideas_brainstormingi_parent_version_id_908d5899_fk_ideas_bra; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY ideas_brainstormingidea
    ADD CONSTRAINT ideas_brainstormingi_parent_version_id_908d5899_fk_ideas_bra FOREIGN KEY (parent_version_id) REFERENCES ideas_brainstormingidea(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: ideas_brainstormingidea ideas_brainstormingi_session_id_5aaa962a_fk_trainings; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY ideas_brainstormingidea
    ADD CONSTRAINT ideas_brainstormingi_session_id_5aaa962a_fk_trainings FOREIGN KEY (session_id) REFERENCES trainings_trainingsession(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: ideas_brainstormingidea ideas_brainstormingidea_user_id_8e1bb64c_fk_accounts_mtpuser_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY ideas_brainstormingidea
    ADD CONSTRAINT ideas_brainstormingidea_user_id_8e1bb64c_fk_accounts_mtpuser_id FOREIGN KEY (user_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: ideas_brainstormingtag ideas_brainstormingt_brainstorming_id_298c2135_fk_ideas_bra; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY ideas_brainstormingtag
    ADD CONSTRAINT ideas_brainstormingt_brainstorming_id_298c2135_fk_ideas_bra FOREIGN KEY (brainstorming_id) REFERENCES ideas_brainstorming(trainingactivity_ptr_id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: ideas_brainstormingtag ideas_brainstormingt_first_update_id_aab0b49a_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY ideas_brainstormingtag
    ADD CONSTRAINT ideas_brainstormingt_first_update_id_aab0b49a_fk_sync_upda FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: ideas_brainstormingtag ideas_brainstormingt_last_update_id_82fdf9ce_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY ideas_brainstormingtag
    ADD CONSTRAINT ideas_brainstormingt_last_update_id_82fdf9ce_fk_sync_upda FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: ideas_brainstormingtag ideas_brainstormingt_original_version_id_fc63afcb_fk_ideas_bra; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY ideas_brainstormingtag
    ADD CONSTRAINT ideas_brainstormingt_original_version_id_fc63afcb_fk_ideas_bra FOREIGN KEY (original_version_id) REFERENCES ideas_brainstormingtag(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: ideas_brainstormingtag ideas_brainstormingt_parent_version_id_48078464_fk_ideas_bra; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY ideas_brainstormingtag
    ADD CONSTRAINT ideas_brainstormingt_parent_version_id_48078464_fk_ideas_bra FOREIGN KEY (parent_version_id) REFERENCES ideas_brainstormingtag(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: ideas_brainstormingtag ideas_brainstormingt_session_id_71e56942_fk_trainings; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY ideas_brainstormingtag
    ADD CONSTRAINT ideas_brainstormingt_session_id_71e56942_fk_trainings FOREIGN KEY (session_id) REFERENCES trainings_trainingsession(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: ideas_questionwall ideas_questionwall_trainingactivity_ptr_aa247603_fk_trainings; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY ideas_questionwall
    ADD CONSTRAINT ideas_questionwall_trainingactivity_ptr_aa247603_fk_trainings FOREIGN KEY (trainingactivity_ptr_id) REFERENCES trainings_trainingactivity(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: ideas_questionwallidea ideas_questionwallid_first_update_id_7c8ccb5a_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY ideas_questionwallidea
    ADD CONSTRAINT ideas_questionwallid_first_update_id_7c8ccb5a_fk_sync_upda FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: ideas_questionwallidea ideas_questionwallid_last_update_id_6813e850_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY ideas_questionwallidea
    ADD CONSTRAINT ideas_questionwallid_last_update_id_6813e850_fk_sync_upda FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: ideas_questionwallidea ideas_questionwallid_questionwall_id_94832f66_fk_ideas_que; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY ideas_questionwallidea
    ADD CONSTRAINT ideas_questionwallid_questionwall_id_94832f66_fk_ideas_que FOREIGN KEY (questionwall_id) REFERENCES ideas_questionwall(trainingactivity_ptr_id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: ideas_questionwallidea ideas_questionwallid_session_id_dac07a87_fk_trainings; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY ideas_questionwallidea
    ADD CONSTRAINT ideas_questionwallid_session_id_dac07a87_fk_trainings FOREIGN KEY (session_id) REFERENCES trainings_trainingsession(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: ideas_questionwallidea ideas_questionwallidea_user_id_ae97a8e7_fk_accounts_mtpuser_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY ideas_questionwallidea
    ADD CONSTRAINT ideas_questionwallidea_user_id_ae97a8e7_fk_accounts_mtpuser_id FOREIGN KEY (user_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: ideas_wordcloud ideas_wordcloud_trainingactivity_ptr_f105fb8d_fk_trainings; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY ideas_wordcloud
    ADD CONSTRAINT ideas_wordcloud_trainingactivity_ptr_f105fb8d_fk_trainings FOREIGN KEY (trainingactivity_ptr_id) REFERENCES trainings_trainingactivity(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: ideas_wordcloudidea ideas_wordcloudidea_first_update_id_5fcc94d2_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY ideas_wordcloudidea
    ADD CONSTRAINT ideas_wordcloudidea_first_update_id_5fcc94d2_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: ideas_wordcloudidea ideas_wordcloudidea_last_update_id_95e15562_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY ideas_wordcloudidea
    ADD CONSTRAINT ideas_wordcloudidea_last_update_id_95e15562_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: ideas_wordcloudidea ideas_wordcloudidea_session_id_9af604ef_fk_trainings; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY ideas_wordcloudidea
    ADD CONSTRAINT ideas_wordcloudidea_session_id_9af604ef_fk_trainings FOREIGN KEY (session_id) REFERENCES trainings_trainingsession(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: ideas_wordcloudidea ideas_wordcloudidea_user_id_b572ef05_fk_accounts_mtpuser_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY ideas_wordcloudidea
    ADD CONSTRAINT ideas_wordcloudidea_user_id_b572ef05_fk_accounts_mtpuser_id FOREIGN KEY (user_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: ideas_wordcloudidea ideas_wordcloudidea_wordcloud_id_e783267b_fk_ideas_wor; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY ideas_wordcloudidea
    ADD CONSTRAINT ideas_wordcloudidea_wordcloud_id_e783267b_fk_ideas_wor FOREIGN KEY (wordcloud_id) REFERENCES ideas_wordcloud(trainingactivity_ptr_id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: likes_like likes_like_author_id_b0089a86_fk_accounts_mtpuser_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY likes_like
    ADD CONSTRAINT likes_like_author_id_b0089a86_fk_accounts_mtpuser_id FOREIGN KEY (author_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: likes_like likes_like_content_type_id_8ffc2116_fk_django_content_type_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY likes_like
    ADD CONSTRAINT likes_like_content_type_id_8ffc2116_fk_django_content_type_id FOREIGN KEY (content_type_id) REFERENCES django_content_type(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: likes_like likes_like_first_update_id_bde7471f_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY likes_like
    ADD CONSTRAINT likes_like_first_update_id_bde7471f_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: likes_like likes_like_last_update_id_ed04d137_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY likes_like
    ADD CONSTRAINT likes_like_last_update_id_ed04d137_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: media_media media_media_first_update_id_56ba34e9_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY media_media
    ADD CONSTRAINT media_media_first_update_id_56ba34e9_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: media_media media_media_last_update_id_63ed63b1_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY media_media
    ADD CONSTRAINT media_media_last_update_id_63ed63b1_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: media_media media_media_original_version_id_b24f6d14_fk_media_media_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY media_media
    ADD CONSTRAINT media_media_original_version_id_b24f6d14_fk_media_media_id FOREIGN KEY (original_version_id) REFERENCES media_media(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: media_media media_media_parent_version_id_09e9389d_fk_media_media_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY media_media
    ADD CONSTRAINT media_media_parent_version_id_09e9389d_fk_media_media_id FOREIGN KEY (parent_version_id) REFERENCES media_media(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: media_media media_media_polymorphic_ctype_id_2bb85fe7_fk_django_co; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY media_media
    ADD CONSTRAINT media_media_polymorphic_ctype_id_2bb85fe7_fk_django_co FOREIGN KEY (polymorphic_ctype_id) REFERENCES django_content_type(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: media_note media_note_first_update_id_798ea82b_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY media_note
    ADD CONSTRAINT media_note_first_update_id_798ea82b_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: media_note media_note_last_update_id_b94bdd93_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY media_note
    ADD CONSTRAINT media_note_last_update_id_b94bdd93_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: media_note media_note_presentation_id_da582a3e_fk_media_pre; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY media_note
    ADD CONSTRAINT media_note_presentation_id_da582a3e_fk_media_pre FOREIGN KEY (presentation_id) REFERENCES media_presentation(trainingactivity_ptr_id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: media_note media_note_training_session_id_13fb761e_fk_trainings; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY media_note
    ADD CONSTRAINT media_note_training_session_id_13fb761e_fk_trainings FOREIGN KEY (training_session_id) REFERENCES trainings_trainingsession(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: media_note media_note_user_id_89f98ac9_fk_accounts_mtpuser_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY media_note
    ADD CONSTRAINT media_note_user_id_89f98ac9_fk_accounts_mtpuser_id FOREIGN KEY (user_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: media_pdfmedia media_pdfmedia_media_ptr_id_267fe617_fk_media_media_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY media_pdfmedia
    ADD CONSTRAINT media_pdfmedia_media_ptr_id_267fe617_fk_media_media_id FOREIGN KEY (media_ptr_id) REFERENCES media_media(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: media_presentation media_presentation_trainingactivity_ptr_85e679d8_fk_trainings; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY media_presentation
    ADD CONSTRAINT media_presentation_trainingactivity_ptr_85e679d8_fk_trainings FOREIGN KEY (trainingactivity_ptr_id) REFERENCES trainings_trainingactivity(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: media_presentationmedia media_presentationme_first_update_id_36fdefdd_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY media_presentationmedia
    ADD CONSTRAINT media_presentationme_first_update_id_36fdefdd_fk_sync_upda FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: media_presentationmedia media_presentationme_last_update_id_bea5c189_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY media_presentationmedia
    ADD CONSTRAINT media_presentationme_last_update_id_bea5c189_fk_sync_upda FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: media_presentationmedia media_presentationme_original_version_id_3437b328_fk_media_pre; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY media_presentationmedia
    ADD CONSTRAINT media_presentationme_original_version_id_3437b328_fk_media_pre FOREIGN KEY (original_version_id) REFERENCES media_presentationmedia(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: media_presentationmedia media_presentationme_parent_version_id_ad0cf80e_fk_media_pre; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY media_presentationmedia
    ADD CONSTRAINT media_presentationme_parent_version_id_ad0cf80e_fk_media_pre FOREIGN KEY (parent_version_id) REFERENCES media_presentationmedia(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: media_presentationmedia media_presentationme_presentation_id_71d46399_fk_media_pre; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY media_presentationmedia
    ADD CONSTRAINT media_presentationme_presentation_id_71d46399_fk_media_pre FOREIGN KEY (presentation_id) REFERENCES media_presentation(trainingactivity_ptr_id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: media_presentationmedia media_presentationmedia_media_id_6efc6068_fk_media_media_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY media_presentationmedia
    ADD CONSTRAINT media_presentationmedia_media_id_6efc6068_fk_media_media_id FOREIGN KEY (media_id) REFERENCES media_media(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: media_video media_video_media_id_d03aec64_fk_media_media_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY media_video
    ADD CONSTRAINT media_video_media_id_d03aec64_fk_media_media_id FOREIGN KEY (media_id) REFERENCES media_media(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: media_video media_video_trainingactivity_ptr_8fa9cf0c_fk_trainings; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY media_video
    ADD CONSTRAINT media_video_trainingactivity_ptr_8fa9cf0c_fk_trainings FOREIGN KEY (trainingactivity_ptr_id) REFERENCES trainings_trainingactivity(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: media_videomedia media_videomedia_media_ptr_id_718f2330_fk_media_media_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY media_videomedia
    ADD CONSTRAINT media_videomedia_media_ptr_id_718f2330_fk_media_media_id FOREIGN KEY (media_ptr_id) REFERENCES media_media(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: metaplans_metaplan metaplans_metaplan_first_update_id_406c538d_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY metaplans_metaplan
    ADD CONSTRAINT metaplans_metaplan_first_update_id_406c538d_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: metaplans_metaplan metaplans_metaplan_last_update_id_8ee6fc3d_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY metaplans_metaplan
    ADD CONSTRAINT metaplans_metaplan_last_update_id_8ee6fc3d_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: metaplans_metaplan metaplans_metaplan_session_id_db1b67a6_fk_trainings; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY metaplans_metaplan
    ADD CONSTRAINT metaplans_metaplan_session_id_db1b67a6_fk_trainings FOREIGN KEY (session_id) REFERENCES trainings_trainingsession(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: metaplans_metaplanproposition metaplans_metaplanpr_first_update_id_1f81d9fb_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY metaplans_metaplanproposition
    ADD CONSTRAINT metaplans_metaplanpr_first_update_id_1f81d9fb_fk_sync_upda FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: metaplans_metaplanproposition metaplans_metaplanpr_last_update_id_fa459f06_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY metaplans_metaplanproposition
    ADD CONSTRAINT metaplans_metaplanpr_last_update_id_fa459f06_fk_sync_upda FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: metaplans_metaplanproposition metaplans_metaplanpr_metaplan_id_d958bfef_fk_metaplans; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY metaplans_metaplanproposition
    ADD CONSTRAINT metaplans_metaplanpr_metaplan_id_d958bfef_fk_metaplans FOREIGN KEY (metaplan_id) REFERENCES metaplans_metaplan(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: metaplans_metaplanproposition metaplans_metaplanpr_user_id_2ccf9a4b_fk_accounts_; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY metaplans_metaplanproposition
    ADD CONSTRAINT metaplans_metaplanpr_user_id_2ccf9a4b_fk_accounts_ FOREIGN KEY (user_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: oauth2_provider_accesstoken oauth2_provider_acce_application_id_b22886e1_fk_oauth2_pr; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY oauth2_provider_accesstoken
    ADD CONSTRAINT oauth2_provider_acce_application_id_b22886e1_fk_oauth2_pr FOREIGN KEY (application_id) REFERENCES oauth2_provider_application(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: oauth2_provider_accesstoken oauth2_provider_acce_user_id_6e4c9a65_fk_accounts_; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY oauth2_provider_accesstoken
    ADD CONSTRAINT oauth2_provider_acce_user_id_6e4c9a65_fk_accounts_ FOREIGN KEY (user_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: oauth2_provider_application oauth2_provider_appl_user_id_79829054_fk_accounts_; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY oauth2_provider_application
    ADD CONSTRAINT oauth2_provider_appl_user_id_79829054_fk_accounts_ FOREIGN KEY (user_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: oauth2_provider_grant oauth2_provider_gran_application_id_81923564_fk_oauth2_pr; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY oauth2_provider_grant
    ADD CONSTRAINT oauth2_provider_gran_application_id_81923564_fk_oauth2_pr FOREIGN KEY (application_id) REFERENCES oauth2_provider_application(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: oauth2_provider_grant oauth2_provider_grant_user_id_e8f62af8_fk_accounts_mtpuser_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY oauth2_provider_grant
    ADD CONSTRAINT oauth2_provider_grant_user_id_e8f62af8_fk_accounts_mtpuser_id FOREIGN KEY (user_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: oauth2_provider_refreshtoken oauth2_provider_refr_access_token_id_775e84e8_fk_oauth2_pr; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY oauth2_provider_refreshtoken
    ADD CONSTRAINT oauth2_provider_refr_access_token_id_775e84e8_fk_oauth2_pr FOREIGN KEY (access_token_id) REFERENCES oauth2_provider_accesstoken(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: oauth2_provider_refreshtoken oauth2_provider_refr_application_id_2d1c311b_fk_oauth2_pr; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY oauth2_provider_refreshtoken
    ADD CONSTRAINT oauth2_provider_refr_application_id_2d1c311b_fk_oauth2_pr FOREIGN KEY (application_id) REFERENCES oauth2_provider_application(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: oauth2_provider_refreshtoken oauth2_provider_refr_user_id_da837fce_fk_accounts_; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY oauth2_provider_refreshtoken
    ADD CONSTRAINT oauth2_provider_refr_user_id_da837fce_fk_accounts_ FOREIGN KEY (user_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: photostories_photo photostories_photo_first_update_id_73ba73ef_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY photostories_photo
    ADD CONSTRAINT photostories_photo_first_update_id_73ba73ef_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: photostories_photo photostories_photo_last_update_id_be1263e3_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY photostories_photo
    ADD CONSTRAINT photostories_photo_last_update_id_be1263e3_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: photostories_photo photostories_photo_strip_id_ebc263a2_fk_photostories_strip_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY photostories_photo
    ADD CONSTRAINT photostories_photo_strip_id_ebc263a2_fk_photostories_strip_id FOREIGN KEY (strip_id) REFERENCES photostories_strip(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: photostories_photostory photostories_photost_trainingactivity_ptr_4ee9d36e_fk_trainings; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY photostories_photostory
    ADD CONSTRAINT photostories_photost_trainingactivity_ptr_4ee9d36e_fk_trainings FOREIGN KEY (trainingactivity_ptr_id) REFERENCES trainings_trainingactivity(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: photostories_strip photostories_strip_first_update_id_424af198_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY photostories_strip
    ADD CONSTRAINT photostories_strip_first_update_id_424af198_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: photostories_strip photostories_strip_last_update_id_b2311777_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY photostories_strip
    ADD CONSTRAINT photostories_strip_last_update_id_b2311777_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: photostories_strip photostories_strip_owner_id_eae16cfb_fk_accounts_mtpuser_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY photostories_strip
    ADD CONSTRAINT photostories_strip_owner_id_eae16cfb_fk_accounts_mtpuser_id FOREIGN KEY (owner_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: photostories_strip photostories_strip_photostory_id_9df6fa8e_fk_photostor; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY photostories_strip
    ADD CONSTRAINT photostories_strip_photostory_id_9df6fa8e_fk_photostor FOREIGN KEY (photostory_id) REFERENCES photostories_photostory(trainingactivity_ptr_id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: photostories_strip photostories_strip_session_id_eabbd78e_fk_trainings; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY photostories_strip
    ADD CONSTRAINT photostories_strip_session_id_eabbd78e_fk_trainings FOREIGN KEY (session_id) REFERENCES trainings_trainingsession(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pinax_notifications_noticesetting pinax_notifications__notice_type_id_718e929c_fk_pinax_not; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY pinax_notifications_noticesetting
    ADD CONSTRAINT pinax_notifications__notice_type_id_718e929c_fk_pinax_not FOREIGN KEY (notice_type_id) REFERENCES pinax_notifications_noticetype(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pinax_notifications_noticesetting pinax_notifications__scoping_content_type_e7f0ced8_fk_django_co; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY pinax_notifications_noticesetting
    ADD CONSTRAINT pinax_notifications__scoping_content_type_e7f0ced8_fk_django_co FOREIGN KEY (scoping_content_type_id) REFERENCES django_content_type(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: pinax_notifications_noticesetting pinax_notifications__user_id_7050ffe0_fk_accounts_; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY pinax_notifications_noticesetting
    ADD CONSTRAINT pinax_notifications__user_id_7050ffe0_fk_accounts_ FOREIGN KEY (user_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: questionnaires_answer questionnaires_answe_first_update_id_a07666a1_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY questionnaires_answer
    ADD CONSTRAINT questionnaires_answe_first_update_id_a07666a1_fk_sync_upda FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: questionnaires_answer questionnaires_answe_polymorphic_ctype_id_fba79b4d_fk_django_co; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY questionnaires_answer
    ADD CONSTRAINT questionnaires_answe_polymorphic_ctype_id_fba79b4d_fk_django_co FOREIGN KEY (polymorphic_ctype_id) REFERENCES django_content_type(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: questionnaires_answer questionnaires_answe_question_id_3fa3580a_fk_questionn; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY questionnaires_answer
    ADD CONSTRAINT questionnaires_answe_question_id_3fa3580a_fk_questionn FOREIGN KEY (question_id) REFERENCES questionnaires_question(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: questionnaires_answer questionnaires_answe_session_id_756707c0_fk_trainings; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY questionnaires_answer
    ADD CONSTRAINT questionnaires_answe_session_id_756707c0_fk_trainings FOREIGN KEY (session_id) REFERENCES trainings_trainingsession(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: questionnaires_answer questionnaires_answer_last_update_id_f81c5f23_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY questionnaires_answer
    ADD CONSTRAINT questionnaires_answer_last_update_id_f81c5f23_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: questionnaires_answer questionnaires_answer_user_id_23b90841_fk_accounts_mtpuser_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY questionnaires_answer
    ADD CONSTRAINT questionnaires_answer_user_id_23b90841_fk_accounts_mtpuser_id FOREIGN KEY (user_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: questionnaires_choicesanswer questionnaires_choic_answer_ptr_id_54ab6680_fk_questionn; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY questionnaires_choicesanswer
    ADD CONSTRAINT questionnaires_choic_answer_ptr_id_54ab6680_fk_questionn FOREIGN KEY (answer_ptr_id) REFERENCES questionnaires_answer(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: questionnaires_choicesanswer_choices questionnaires_choic_choice_id_0ccb9ff0_fk_questionn; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY questionnaires_choicesanswer_choices
    ADD CONSTRAINT questionnaires_choic_choice_id_0ccb9ff0_fk_questionn FOREIGN KEY (choice_id) REFERENCES questionnaires_choice(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: questionnaires_choicesanswer_choices questionnaires_choic_choicesanswer_id_2f5645dc_fk_questionn; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY questionnaires_choicesanswer_choices
    ADD CONSTRAINT questionnaires_choic_choicesanswer_id_2f5645dc_fk_questionn FOREIGN KEY (choicesanswer_id) REFERENCES questionnaires_choicesanswer(answer_ptr_id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: questionnaires_choice questionnaires_choic_first_update_id_61c0c686_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY questionnaires_choice
    ADD CONSTRAINT questionnaires_choic_first_update_id_61c0c686_fk_sync_upda FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: questionnaires_choice questionnaires_choic_original_version_id_1bb58e5c_fk_questionn; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY questionnaires_choice
    ADD CONSTRAINT questionnaires_choic_original_version_id_1bb58e5c_fk_questionn FOREIGN KEY (original_version_id) REFERENCES questionnaires_choice(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: questionnaires_choice questionnaires_choic_parent_version_id_fad7535e_fk_questionn; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY questionnaires_choice
    ADD CONSTRAINT questionnaires_choic_parent_version_id_fad7535e_fk_questionn FOREIGN KEY (parent_version_id) REFERENCES questionnaires_choice(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: questionnaires_choice questionnaires_choic_question_content_typ_f57b2332_fk_django_co; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY questionnaires_choice
    ADD CONSTRAINT questionnaires_choic_question_content_typ_f57b2332_fk_django_co FOREIGN KEY (question_content_type_id) REFERENCES django_content_type(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: questionnaires_choicesquestion questionnaires_choic_question_ptr_id_e2bc0760_fk_questionn; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY questionnaires_choicesquestion
    ADD CONSTRAINT questionnaires_choic_question_ptr_id_e2bc0760_fk_questionn FOREIGN KEY (question_ptr_id) REFERENCES questionnaires_question(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: questionnaires_choice questionnaires_choice_last_update_id_a0d369dc_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY questionnaires_choice
    ADD CONSTRAINT questionnaires_choice_last_update_id_a0d369dc_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: questionnaires_imagechoicesquestion questionnaires_image_question_ptr_id_58ff8a97_fk_questionn; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY questionnaires_imagechoicesquestion
    ADD CONSTRAINT questionnaires_image_question_ptr_id_58ff8a97_fk_questionn FOREIGN KEY (question_ptr_id) REFERENCES questionnaires_question(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: questionnaires_livepolling questionnaires_livep_trainingactivity_ptr_d78acacc_fk_trainings; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY questionnaires_livepolling
    ADD CONSTRAINT questionnaires_livep_trainingactivity_ptr_d78acacc_fk_trainings FOREIGN KEY (trainingactivity_ptr_id) REFERENCES trainings_trainingactivity(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: questionnaires_livequiz questionnaires_liveq_trainingactivity_ptr_3dffa3b7_fk_trainings; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY questionnaires_livequiz
    ADD CONSTRAINT questionnaires_liveq_trainingactivity_ptr_3dffa3b7_fk_trainings FOREIGN KEY (trainingactivity_ptr_id) REFERENCES trainings_trainingactivity(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: questionnaires_openanswer questionnaires_opena_answer_ptr_id_b24cb7c0_fk_questionn; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY questionnaires_openanswer
    ADD CONSTRAINT questionnaires_opena_answer_ptr_id_b24cb7c0_fk_questionn FOREIGN KEY (answer_ptr_id) REFERENCES questionnaires_answer(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: questionnaires_openquestion questionnaires_openq_question_ptr_id_135e5c2a_fk_questionn; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY questionnaires_openquestion
    ADD CONSTRAINT questionnaires_openq_question_ptr_id_135e5c2a_fk_questionn FOREIGN KEY (question_ptr_id) REFERENCES questionnaires_question(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: questionnaires_polling questionnaires_polli_trainingactivity_ptr_3c38deb2_fk_trainings; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY questionnaires_polling
    ADD CONSTRAINT questionnaires_polli_trainingactivity_ptr_3c38deb2_fk_trainings FOREIGN KEY (trainingactivity_ptr_id) REFERENCES trainings_trainingactivity(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: questionnaires_question questionnaires_quest_first_update_id_dde29588_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY questionnaires_question
    ADD CONSTRAINT questionnaires_quest_first_update_id_dde29588_fk_sync_upda FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: questionnaires_question questionnaires_quest_last_update_id_22d210e5_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY questionnaires_question
    ADD CONSTRAINT questionnaires_quest_last_update_id_22d210e5_fk_sync_upda FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: questionnaires_question questionnaires_quest_original_version_id_26a4b4e3_fk_questionn; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY questionnaires_question
    ADD CONSTRAINT questionnaires_quest_original_version_id_26a4b4e3_fk_questionn FOREIGN KEY (original_version_id) REFERENCES questionnaires_question(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: questionnaires_question questionnaires_quest_parent_version_id_ce795d06_fk_questionn; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY questionnaires_question
    ADD CONSTRAINT questionnaires_quest_parent_version_id_ce795d06_fk_questionn FOREIGN KEY (parent_version_id) REFERENCES questionnaires_question(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: questionnaires_question questionnaires_quest_polymorphic_ctype_id_d1a98141_fk_django_co; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY questionnaires_question
    ADD CONSTRAINT questionnaires_quest_polymorphic_ctype_id_d1a98141_fk_django_co FOREIGN KEY (polymorphic_ctype_id) REFERENCES django_content_type(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: questionnaires_question questionnaires_quest_questionnaire_conten_979f344d_fk_django_co; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY questionnaires_question
    ADD CONSTRAINT questionnaires_quest_questionnaire_conten_979f344d_fk_django_co FOREIGN KEY (questionnaire_content_type_id) REFERENCES django_content_type(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: questionnaires_quiz questionnaires_quiz_trainingactivity_ptr_41bcc80a_fk_trainings; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY questionnaires_quiz
    ADD CONSTRAINT questionnaires_quiz_trainingactivity_ptr_41bcc80a_fk_trainings FOREIGN KEY (trainingactivity_ptr_id) REFERENCES trainings_trainingactivity(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: roleplays_criterion_dimensions roleplays_criterion__criterion_id_fa41a9b7_fk_roleplays; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY roleplays_criterion_dimensions
    ADD CONSTRAINT roleplays_criterion__criterion_id_fa41a9b7_fk_roleplays FOREIGN KEY (criterion_id) REFERENCES roleplays_criterion(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: roleplays_criterion_dimensions roleplays_criterion__dimension_id_c860e738_fk_assessmen; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY roleplays_criterion_dimensions
    ADD CONSTRAINT roleplays_criterion__dimension_id_c860e738_fk_assessmen FOREIGN KEY (dimension_id) REFERENCES assessments_dimension(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: roleplays_criterion roleplays_criterion_activity_type_id_ce9291d3_fk_django_co; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY roleplays_criterion
    ADD CONSTRAINT roleplays_criterion_activity_type_id_ce9291d3_fk_django_co FOREIGN KEY (activity_type_id) REFERENCES django_content_type(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: roleplays_criterion roleplays_criterion_first_update_id_8960ae78_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY roleplays_criterion
    ADD CONSTRAINT roleplays_criterion_first_update_id_8960ae78_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: roleplays_criterion roleplays_criterion_last_update_id_4204e291_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY roleplays_criterion
    ADD CONSTRAINT roleplays_criterion_last_update_id_4204e291_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: roleplays_criterion roleplays_criterion_original_version_id_f2d6cd76_fk_roleplays; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY roleplays_criterion
    ADD CONSTRAINT roleplays_criterion_original_version_id_f2d6cd76_fk_roleplays FOREIGN KEY (original_version_id) REFERENCES roleplays_criterion(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: roleplays_criterion roleplays_criterion_parent_version_id_08f8b64d_fk_roleplays; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY roleplays_criterion
    ADD CONSTRAINT roleplays_criterion_parent_version_id_08f8b64d_fk_roleplays FOREIGN KEY (parent_version_id) REFERENCES roleplays_criterion(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: roleplays_criterion roleplays_criterion_step_id_dd14060f_fk_roleplays_step_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY roleplays_criterion
    ADD CONSTRAINT roleplays_criterion_step_id_dd14060f_fk_roleplays_step_id FOREIGN KEY (step_id) REFERENCES roleplays_step(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: roleplays_criterion roleplays_criterion_training_id_f02a123b_fk_trainings; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY roleplays_criterion
    ADD CONSTRAINT roleplays_criterion_training_id_f02a123b_fk_trainings FOREIGN KEY (training_id) REFERENCES trainings_training(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: roleplays_rating roleplays_rating_criterion_id_5d9e6947_fk_roleplays; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY roleplays_rating
    ADD CONSTRAINT roleplays_rating_criterion_id_5d9e6947_fk_roleplays FOREIGN KEY (criterion_id) REFERENCES roleplays_criterion(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: roleplays_rating roleplays_rating_first_update_id_1e1913fd_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY roleplays_rating
    ADD CONSTRAINT roleplays_rating_first_update_id_1e1913fd_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: roleplays_rating roleplays_rating_last_update_id_52847eb8_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY roleplays_rating
    ADD CONSTRAINT roleplays_rating_last_update_id_52847eb8_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: roleplays_rating roleplays_rating_trainee_id_132e2e30_fk_accounts_mtpuser_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY roleplays_rating
    ADD CONSTRAINT roleplays_rating_trainee_id_132e2e30_fk_accounts_mtpuser_id FOREIGN KEY (trainee_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: roleplays_rating roleplays_rating_training_session_id_30b88e56_fk_trainings; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY roleplays_rating
    ADD CONSTRAINT roleplays_rating_training_session_id_30b88e56_fk_trainings FOREIGN KEY (training_session_id) REFERENCES trainings_trainingsession(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: roleplays_roleplay roleplays_roleplay_trainingactivity_ptr_a82a2e3b_fk_trainings; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY roleplays_roleplay
    ADD CONSTRAINT roleplays_roleplay_trainingactivity_ptr_a82a2e3b_fk_trainings FOREIGN KEY (trainingactivity_ptr_id) REFERENCES trainings_trainingactivity(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: roleplays_step roleplays_step_first_update_id_b83d739c_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY roleplays_step
    ADD CONSTRAINT roleplays_step_first_update_id_b83d739c_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: roleplays_step roleplays_step_last_update_id_8376474a_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY roleplays_step
    ADD CONSTRAINT roleplays_step_last_update_id_8376474a_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: roleplays_step roleplays_step_original_version_id_be1ff1ab_fk_roleplays; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY roleplays_step
    ADD CONSTRAINT roleplays_step_original_version_id_be1ff1ab_fk_roleplays FOREIGN KEY (original_version_id) REFERENCES roleplays_step(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: roleplays_step roleplays_step_parent_version_id_f6148d02_fk_roleplays_step_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY roleplays_step
    ADD CONSTRAINT roleplays_step_parent_version_id_f6148d02_fk_roleplays_step_id FOREIGN KEY (parent_version_id) REFERENCES roleplays_step(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: saba_certificationprogramuserstatusdjangotask saba_certificationpr_certification_id_937be586_fk_assessmen; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY saba_certificationprogramuserstatusdjangotask
    ADD CONSTRAINT saba_certificationpr_certification_id_937be586_fk_assessmen FOREIGN KEY (certification_id) REFERENCES assessments_certificationprogramuserstatus(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: saba_certificationprogramuserstatusdjangotask saba_certificationpr_djangotask_ptr_id_39373f36_fk_tasks_dja; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY saba_certificationprogramuserstatusdjangotask
    ADD CONSTRAINT saba_certificationpr_djangotask_ptr_id_39373f36_fk_tasks_dja FOREIGN KEY (djangotask_ptr_id) REFERENCES tasks_djangotask(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: surveys_answer_choices surveys_answer_choices_answer_id_defd294e_fk_surveys_answer_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY surveys_answer_choices
    ADD CONSTRAINT surveys_answer_choices_answer_id_defd294e_fk_surveys_answer_id FOREIGN KEY (answer_id) REFERENCES surveys_answer(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: surveys_answer_choices surveys_answer_choices_choice_id_3ff3133b_fk_surveys_choice_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY surveys_answer_choices
    ADD CONSTRAINT surveys_answer_choices_choice_id_3ff3133b_fk_surveys_choice_id FOREIGN KEY (choice_id) REFERENCES surveys_choice(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: surveys_answer surveys_answer_first_update_id_19c74a38_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY surveys_answer
    ADD CONSTRAINT surveys_answer_first_update_id_19c74a38_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: surveys_answer surveys_answer_last_update_id_40905a68_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY surveys_answer
    ADD CONSTRAINT surveys_answer_last_update_id_40905a68_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: surveys_answer surveys_answer_question_id_c0166f3c_fk_surveys_question_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY surveys_answer
    ADD CONSTRAINT surveys_answer_question_id_c0166f3c_fk_surveys_question_id FOREIGN KEY (question_id) REFERENCES surveys_question(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: surveys_answer surveys_answer_survey_id_caa4663c_fk_surveys_survey_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY surveys_answer
    ADD CONSTRAINT surveys_answer_survey_id_caa4663c_fk_surveys_survey_id FOREIGN KEY (survey_id) REFERENCES surveys_survey(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: surveys_answer surveys_answer_trainee_id_798b67a2_fk_accounts_mtpuser_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY surveys_answer
    ADD CONSTRAINT surveys_answer_trainee_id_798b67a2_fk_accounts_mtpuser_id FOREIGN KEY (trainee_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: surveys_answer surveys_answer_training_session_id_4d5a3d7f_fk_trainings; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY surveys_answer
    ADD CONSTRAINT surveys_answer_training_session_id_4d5a3d7f_fk_trainings FOREIGN KEY (training_session_id) REFERENCES trainings_trainingsession(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: surveys_choice surveys_choice_first_update_id_c3be40eb_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY surveys_choice
    ADD CONSTRAINT surveys_choice_first_update_id_c3be40eb_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: surveys_choice surveys_choice_last_update_id_72fcceb4_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY surveys_choice
    ADD CONSTRAINT surveys_choice_last_update_id_72fcceb4_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: surveys_choice surveys_choice_question_id_03708b95_fk_surveys_question_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY surveys_choice
    ADD CONSTRAINT surveys_choice_question_id_03708b95_fk_surveys_question_id FOREIGN KEY (question_id) REFERENCES surveys_question(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: surveys_pool surveys_pool_author_id_0e27d828_fk_accounts_mtpuser_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY surveys_pool
    ADD CONSTRAINT surveys_pool_author_id_0e27d828_fk_accounts_mtpuser_id FOREIGN KEY (author_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: surveys_pool surveys_pool_first_update_id_12fb4727_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY surveys_pool
    ADD CONSTRAINT surveys_pool_first_update_id_12fb4727_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: surveys_pool surveys_pool_last_update_id_3a0b7b7d_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY surveys_pool
    ADD CONSTRAINT surveys_pool_last_update_id_3a0b7b7d_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: surveys_question surveys_question_first_update_id_079b26b7_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY surveys_question
    ADD CONSTRAINT surveys_question_first_update_id_079b26b7_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: surveys_question surveys_question_last_update_id_664309b2_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY surveys_question
    ADD CONSTRAINT surveys_question_last_update_id_664309b2_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: surveys_question surveys_question_pool_id_ece4bd36_fk_surveys_pool_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY surveys_question
    ADD CONSTRAINT surveys_question_pool_id_ece4bd36_fk_surveys_pool_id FOREIGN KEY (pool_id) REFERENCES surveys_pool(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: surveys_survey surveys_survey_first_update_id_912f3e48_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY surveys_survey
    ADD CONSTRAINT surveys_survey_first_update_id_912f3e48_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: surveys_survey surveys_survey_last_update_id_ad7c4f70_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY surveys_survey
    ADD CONSTRAINT surveys_survey_last_update_id_ad7c4f70_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: surveys_survey surveys_survey_trainer_id_4359abb7_fk_accounts_mtpuser_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY surveys_survey
    ADD CONSTRAINT surveys_survey_trainer_id_4359abb7_fk_accounts_mtpuser_id FOREIGN KEY (trainer_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: surveys_survey surveys_survey_training_id_dfe76f2e_fk_trainings_training_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY surveys_survey
    ADD CONSTRAINT surveys_survey_training_id_dfe76f2e_fk_trainings_training_id FOREIGN KEY (training_id) REFERENCES trainings_training(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: surveys_surveypool surveys_surveypool_first_update_id_385cea46_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY surveys_surveypool
    ADD CONSTRAINT surveys_surveypool_first_update_id_385cea46_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: surveys_surveypool surveys_surveypool_last_update_id_126372c2_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY surveys_surveypool
    ADD CONSTRAINT surveys_surveypool_last_update_id_126372c2_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: surveys_surveypool surveys_surveypool_pool_id_bf6a922c_fk_surveys_pool_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY surveys_surveypool
    ADD CONSTRAINT surveys_surveypool_pool_id_bf6a922c_fk_surveys_pool_id FOREIGN KEY (pool_id) REFERENCES surveys_pool(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: surveys_surveypool surveys_surveypool_survey_id_f7e1354c_fk_surveys_survey_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY surveys_surveypool
    ADD CONSTRAINT surveys_surveypool_survey_id_f7e1354c_fk_surveys_survey_id FOREIGN KEY (survey_id) REFERENCES surveys_survey(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: sync_clientversion sync_clientversion_first_update_id_042de255_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY sync_clientversion
    ADD CONSTRAINT sync_clientversion_first_update_id_042de255_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: sync_clientversion sync_clientversion_last_update_id_a4dee490_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY sync_clientversion
    ADD CONSTRAINT sync_clientversion_last_update_id_a4dee490_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: sync_localserver sync_localserver_first_update_id_91d68c99_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY sync_localserver
    ADD CONSTRAINT sync_localserver_first_update_id_91d68c99_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: sync_localserver sync_localserver_last_update_id_8fd69eca_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY sync_localserver
    ADD CONSTRAINT sync_localserver_last_update_id_8fd69eca_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: sync_localserverconnection sync_localserverconn_local_server_id_c9b4da93_fk_sync_loca; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY sync_localserverconnection
    ADD CONSTRAINT sync_localserverconn_local_server_id_c9b4da93_fk_sync_loca FOREIGN KEY (local_server_id) REFERENCES sync_localserver(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: sync_serverversion sync_serverversion_first_update_id_0faec7c8_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY sync_serverversion
    ADD CONSTRAINT sync_serverversion_first_update_id_0faec7c8_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: sync_serverversion sync_serverversion_last_update_id_0d241f62_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY sync_serverversion
    ADD CONSTRAINT sync_serverversion_last_update_id_0d241f62_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: tasks_djangotask tasks_djangotask_user_id_153aa0d7_fk_accounts_mtpuser_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY tasks_djangotask
    ADD CONSTRAINT tasks_djangotask_user_id_153aa0d7_fk_accounts_mtpuser_id FOREIGN KEY (user_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: themes_theme themes_theme_first_update_id_8969e755_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY themes_theme
    ADD CONSTRAINT themes_theme_first_update_id_8969e755_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: themes_theme themes_theme_last_update_id_70bc3ef2_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY themes_theme
    ADD CONSTRAINT themes_theme_last_update_id_70bc3ef2_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: trainings_training trainings_training_business_unit_id_cdf48cb8_fk_accounts_; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY trainings_training
    ADD CONSTRAINT trainings_training_business_unit_id_cdf48cb8_fk_accounts_ FOREIGN KEY (business_unit_id) REFERENCES accounts_group(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: trainings_training trainings_training_default_group_set_id_bf1e6c66_fk_accounts_; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY trainings_training
    ADD CONSTRAINT trainings_training_default_group_set_id_bf1e6c66_fk_accounts_ FOREIGN KEY (default_group_set_id) REFERENCES accounts_groupset(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: trainings_training trainings_training_first_update_id_6da8c12a_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY trainings_training
    ADD CONSTRAINT trainings_training_first_update_id_6da8c12a_fk_sync_update_id FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: trainings_training trainings_training_job_profile_id_49bc67a7_fk_accounts_group_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY trainings_training
    ADD CONSTRAINT trainings_training_job_profile_id_49bc67a7_fk_accounts_group_id FOREIGN KEY (job_profile_id) REFERENCES accounts_group(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: trainings_training trainings_training_last_update_id_fa6302d6_fk_sync_update_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY trainings_training
    ADD CONSTRAINT trainings_training_last_update_id_fa6302d6_fk_sync_update_id FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: trainings_training trainings_training_original_version_id_7e6c40d6_fk_trainings; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY trainings_training
    ADD CONSTRAINT trainings_training_original_version_id_7e6c40d6_fk_trainings FOREIGN KEY (original_version_id) REFERENCES trainings_training(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: trainings_training trainings_training_owner_id_298786e9_fk_accounts_mtpuser_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY trainings_training
    ADD CONSTRAINT trainings_training_owner_id_298786e9_fk_accounts_mtpuser_id FOREIGN KEY (owner_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: trainings_training trainings_training_parent_version_id_b48068a9_fk_trainings; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY trainings_training
    ADD CONSTRAINT trainings_training_parent_version_id_b48068a9_fk_trainings FOREIGN KEY (parent_version_id) REFERENCES trainings_training(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: trainings_training trainings_training_theme_id_3599e86d_fk_themes_theme_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY trainings_training
    ADD CONSTRAINT trainings_training_theme_id_3599e86d_fk_themes_theme_id FOREIGN KEY (theme_id) REFERENCES themes_theme(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: trainings_trainingactivity trainings_trainingac_first_update_id_8b326dc1_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY trainings_trainingactivity
    ADD CONSTRAINT trainings_trainingac_first_update_id_8b326dc1_fk_sync_upda FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: trainings_trainingactivitylibrarystatus trainings_trainingac_first_update_id_d6bd077d_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY trainings_trainingactivitylibrarystatus
    ADD CONSTRAINT trainings_trainingac_first_update_id_d6bd077d_fk_sync_upda FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: trainings_trainingactivity trainings_trainingac_last_update_id_31675740_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY trainings_trainingactivity
    ADD CONSTRAINT trainings_trainingac_last_update_id_31675740_fk_sync_upda FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: trainings_trainingactivitylibrarystatus trainings_trainingac_last_update_id_c3cc8141_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY trainings_trainingactivitylibrarystatus
    ADD CONSTRAINT trainings_trainingac_last_update_id_c3cc8141_fk_sync_upda FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: trainings_trainingactivity trainings_trainingac_library_status_id_89c60e6b_fk_trainings; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY trainings_trainingactivity
    ADD CONSTRAINT trainings_trainingac_library_status_id_89c60e6b_fk_trainings FOREIGN KEY (library_status_id) REFERENCES trainings_trainingactivitylibrarystatus(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: trainings_trainingactivity trainings_trainingac_original_version_id_799a1c1d_fk_trainings; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY trainings_trainingactivity
    ADD CONSTRAINT trainings_trainingac_original_version_id_799a1c1d_fk_trainings FOREIGN KEY (original_version_id) REFERENCES trainings_trainingactivity(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: trainings_trainingactivitylibrarystatus trainings_trainingac_owner_id_5bc1c76e_fk_accounts_; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY trainings_trainingactivitylibrarystatus
    ADD CONSTRAINT trainings_trainingac_owner_id_5bc1c76e_fk_accounts_ FOREIGN KEY (owner_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: trainings_trainingactivity trainings_trainingac_parent_version_id_25862965_fk_trainings; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY trainings_trainingactivity
    ADD CONSTRAINT trainings_trainingac_parent_version_id_25862965_fk_trainings FOREIGN KEY (parent_version_id) REFERENCES trainings_trainingactivity(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: trainings_trainingactivity trainings_trainingac_polymorphic_ctype_id_37c64b31_fk_django_co; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY trainings_trainingactivity
    ADD CONSTRAINT trainings_trainingac_polymorphic_ctype_id_37c64b31_fk_django_co FOREIGN KEY (polymorphic_ctype_id) REFERENCES django_content_type(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: trainings_trainingactivity trainings_trainingac_session_id_c3d0bbe8_fk_trainings; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY trainings_trainingactivity
    ADD CONSTRAINT trainings_trainingac_session_id_c3d0bbe8_fk_trainings FOREIGN KEY (session_id) REFERENCES trainings_trainingsession(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: trainings_trainingactivity trainings_trainingac_training_id_b0e26055_fk_trainings; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY trainings_trainingactivity
    ADD CONSTRAINT trainings_trainingac_training_id_b0e26055_fk_trainings FOREIGN KEY (training_id) REFERENCES trainings_training(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: trainings_trainingclientoptions trainings_trainingcl_first_update_id_896e9e5c_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY trainings_trainingclientoptions
    ADD CONSTRAINT trainings_trainingcl_first_update_id_896e9e5c_fk_sync_upda FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: trainings_trainingclientoptions trainings_trainingcl_last_update_id_e9a2300e_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY trainings_trainingclientoptions
    ADD CONSTRAINT trainings_trainingcl_last_update_id_e9a2300e_fk_sync_upda FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: trainings_trainingclientoptions trainings_trainingcl_original_version_id_0872acf4_fk_trainings; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY trainings_trainingclientoptions
    ADD CONSTRAINT trainings_trainingcl_original_version_id_0872acf4_fk_trainings FOREIGN KEY (original_version_id) REFERENCES trainings_trainingclientoptions(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: trainings_trainingclientoptions trainings_trainingcl_parent_version_id_678ee857_fk_trainings; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY trainings_trainingclientoptions
    ADD CONSTRAINT trainings_trainingcl_parent_version_id_678ee857_fk_trainings FOREIGN KEY (parent_version_id) REFERENCES trainings_trainingclientoptions(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: trainings_trainingclientoptions trainings_trainingcl_training_id_8bbe9326_fk_trainings; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY trainings_trainingclientoptions
    ADD CONSTRAINT trainings_trainingcl_training_id_8bbe9326_fk_trainings FOREIGN KEY (training_id) REFERENCES trainings_training(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: trainings_trainingsession trainings_trainingse_first_update_id_88e23cd7_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY trainings_trainingsession
    ADD CONSTRAINT trainings_trainingse_first_update_id_88e23cd7_fk_sync_upda FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: trainings_trainingsession trainings_trainingse_last_update_id_a559763f_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY trainings_trainingsession
    ADD CONSTRAINT trainings_trainingse_last_update_id_a559763f_fk_sync_upda FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: trainings_trainingsession_users trainings_trainingse_mtpuser_id_799bc950_fk_accounts_; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY trainings_trainingsession_users
    ADD CONSTRAINT trainings_trainingse_mtpuser_id_799bc950_fk_accounts_ FOREIGN KEY (mtpuser_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: trainings_trainingsession trainings_trainingse_trainer_id_8561f7ac_fk_accounts_; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY trainings_trainingsession
    ADD CONSTRAINT trainings_trainingse_trainer_id_8561f7ac_fk_accounts_ FOREIGN KEY (trainer_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: trainings_trainingsession trainings_trainingse_training_id_f3d78ba1_fk_trainings; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY trainings_trainingsession
    ADD CONSTRAINT trainings_trainingse_training_id_f3d78ba1_fk_trainings FOREIGN KEY (training_id) REFERENCES trainings_training(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: trainings_trainingsession_users trainings_trainingse_trainingsession_id_871cd616_fk_trainings; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY trainings_trainingsession_users
    ADD CONSTRAINT trainings_trainingse_trainingsession_id_871cd616_fk_trainings FOREIGN KEY (trainingsession_id) REFERENCES trainings_trainingsession(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: trainings_trainingtask trainings_trainingta_created_training_id_eebe628a_fk_trainings; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY trainings_trainingtask
    ADD CONSTRAINT trainings_trainingta_created_training_id_eebe628a_fk_trainings FOREIGN KEY (created_training_id) REFERENCES trainings_training(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: trainings_trainingtask trainings_trainingta_djangotask_ptr_id_34e7106a_fk_tasks_dja; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY trainings_trainingtask
    ADD CONSTRAINT trainings_trainingta_djangotask_ptr_id_34e7106a_fk_tasks_dja FOREIGN KEY (djangotask_ptr_id) REFERENCES tasks_djangotask(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: trainings_trainingtask trainings_trainingta_training_id_85297e1a_fk_trainings; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY trainings_trainingtask
    ADD CONSTRAINT trainings_trainingta_training_id_85297e1a_fk_trainings FOREIGN KEY (training_id) REFERENCES trainings_training(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: translation_translatablelanguage translation_translat_first_update_id_16457a3b_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY translation_translatablelanguage
    ADD CONSTRAINT translation_translat_first_update_id_16457a3b_fk_sync_upda FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: translation_translation translation_translat_first_update_id_7da93c50_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY translation_translation
    ADD CONSTRAINT translation_translat_first_update_id_7da93c50_fk_sync_upda FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: translation_translatablelanguage translation_translat_last_update_id_814fec70_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY translation_translatablelanguage
    ADD CONSTRAINT translation_translat_last_update_id_814fec70_fk_sync_upda FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: translation_translation translation_translat_last_update_id_c4257eef_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY translation_translation
    ADD CONSTRAINT translation_translat_last_update_id_c4257eef_fk_sync_upda FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: waffle_flag_groups waffle_flag_groups_flag_id_c11c0c05_fk_waffle_flag_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY waffle_flag_groups
    ADD CONSTRAINT waffle_flag_groups_flag_id_c11c0c05_fk_waffle_flag_id FOREIGN KEY (flag_id) REFERENCES waffle_flag(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: waffle_flag_groups waffle_flag_groups_group_id_a97c4f66_fk_auth_group_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY waffle_flag_groups
    ADD CONSTRAINT waffle_flag_groups_group_id_a97c4f66_fk_auth_group_id FOREIGN KEY (group_id) REFERENCES auth_group(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: waffle_flag_users waffle_flag_users_flag_id_833c37b0_fk_waffle_flag_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY waffle_flag_users
    ADD CONSTRAINT waffle_flag_users_flag_id_833c37b0_fk_waffle_flag_id FOREIGN KEY (flag_id) REFERENCES waffle_flag(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: waffle_flag_users waffle_flag_users_mtpuser_id_b4dd6d55_fk_accounts_mtpuser_id; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY waffle_flag_users
    ADD CONSTRAINT waffle_flag_users_mtpuser_id_b4dd6d55_fk_accounts_mtpuser_id FOREIGN KEY (mtpuser_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: workshops_workshop workshops_workshop_trainingactivity_ptr_2b76c801_fk_trainings; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY workshops_workshop
    ADD CONSTRAINT workshops_workshop_trainingactivity_ptr_2b76c801_fk_trainings FOREIGN KEY (trainingactivity_ptr_id) REFERENCES trainings_trainingactivity(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: workshops_workshopstepquestion workshops_workshopst_activity_type_id_83a5e2c6_fk_django_co; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY workshops_workshopstepquestion
    ADD CONSTRAINT workshops_workshopst_activity_type_id_83a5e2c6_fk_django_co FOREIGN KEY (activity_type_id) REFERENCES django_content_type(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: workshops_workshopstepquestionuseranswer workshops_workshopst_answer_id_b31873b0_fk_workshops; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY workshops_workshopstepquestionuseranswer
    ADD CONSTRAINT workshops_workshopst_answer_id_b31873b0_fk_workshops FOREIGN KEY (answer_id) REFERENCES workshops_workshopstepquestionanswer(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: workshops_workshopstepquestion_dimensions workshops_workshopst_dimension_id_292a0a1a_fk_assessmen; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY workshops_workshopstepquestion_dimensions
    ADD CONSTRAINT workshops_workshopst_dimension_id_292a0a1a_fk_assessmen FOREIGN KEY (dimension_id) REFERENCES assessments_dimension(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: workshops_workshopstepquestionanswer workshops_workshopst_first_update_id_8a13c35e_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY workshops_workshopstepquestionanswer
    ADD CONSTRAINT workshops_workshopst_first_update_id_8a13c35e_fk_sync_upda FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: workshops_workshopstepquestionuseranswer workshops_workshopst_first_update_id_8e4a2c98_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY workshops_workshopstepquestionuseranswer
    ADD CONSTRAINT workshops_workshopst_first_update_id_8e4a2c98_fk_sync_upda FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: workshops_workshopstep workshops_workshopst_first_update_id_a5c1f956_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY workshops_workshopstep
    ADD CONSTRAINT workshops_workshopst_first_update_id_a5c1f956_fk_sync_upda FOREIGN KEY (first_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: workshops_workshopstep workshops_workshopst_last_update_id_36f7804a_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY workshops_workshopstep
    ADD CONSTRAINT workshops_workshopst_last_update_id_36f7804a_fk_sync_upda FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: workshops_workshopstepquestionanswer workshops_workshopst_last_update_id_38bc0141_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY workshops_workshopstepquestionanswer
    ADD CONSTRAINT workshops_workshopst_last_update_id_38bc0141_fk_sync_upda FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: workshops_workshopstepquestionuseranswer workshops_workshopst_last_update_id_39155b34_fk_sync_upda; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY workshops_workshopstepquestionuseranswer
    ADD CONSTRAINT workshops_workshopst_last_update_id_39155b34_fk_sync_upda FOREIGN KEY (last_update_id) REFERENCES sync_update(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: workshops_workshopstepquestionanswer workshops_workshopst_original_version_id_6de17fa2_fk_workshops; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY workshops_workshopstepquestionanswer
    ADD CONSTRAINT workshops_workshopst_original_version_id_6de17fa2_fk_workshops FOREIGN KEY (original_version_id) REFERENCES workshops_workshopstepquestionanswer(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: workshops_workshopstep workshops_workshopst_original_version_id_98cc31ce_fk_workshops; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY workshops_workshopstep
    ADD CONSTRAINT workshops_workshopst_original_version_id_98cc31ce_fk_workshops FOREIGN KEY (original_version_id) REFERENCES workshops_workshopstep(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: workshops_workshopstepquestionanswer workshops_workshopst_parent_version_id_7a90b18a_fk_workshops; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY workshops_workshopstepquestionanswer
    ADD CONSTRAINT workshops_workshopst_parent_version_id_7a90b18a_fk_workshops FOREIGN KEY (parent_version_id) REFERENCES workshops_workshopstepquestionanswer(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: workshops_workshopstep workshops_workshopst_parent_version_id_c6e228b8_fk_workshops; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY workshops_workshopstep
    ADD CONSTRAINT workshops_workshopst_parent_version_id_c6e228b8_fk_workshops FOREIGN KEY (parent_version_id) REFERENCES workshops_workshopstep(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: workshops_workshopstep workshops_workshopst_polymorphic_ctype_id_83855d49_fk_django_co; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY workshops_workshopstep
    ADD CONSTRAINT workshops_workshopst_polymorphic_ctype_id_83855d49_fk_django_co FOREIGN KEY (polymorphic_ctype_id) REFERENCES django_content_type(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: workshops_workshopstepquestionanswer workshops_workshopst_question_id_1cb402c4_fk_workshops; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY workshops_workshopstepquestionanswer
    ADD CONSTRAINT workshops_workshopst_question_id_1cb402c4_fk_workshops FOREIGN KEY (question_id) REFERENCES workshops_workshopstepquestion(workshopstep_ptr_id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: workshops_workshopstepquestionuseranswer workshops_workshopst_question_id_3b4f07ac_fk_workshops; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY workshops_workshopstepquestionuseranswer
    ADD CONSTRAINT workshops_workshopst_question_id_3b4f07ac_fk_workshops FOREIGN KEY (question_id) REFERENCES workshops_workshopstepquestion(workshopstep_ptr_id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: workshops_workshopstepquestion workshops_workshopst_training_id_797e7620_fk_trainings; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY workshops_workshopstepquestion
    ADD CONSTRAINT workshops_workshopst_training_id_797e7620_fk_trainings FOREIGN KEY (training_id) REFERENCES trainings_training(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: workshops_workshopstepquestionuseranswer workshops_workshopst_training_session_id_125f3dbd_fk_trainings; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY workshops_workshopstepquestionuseranswer
    ADD CONSTRAINT workshops_workshopst_training_session_id_125f3dbd_fk_trainings FOREIGN KEY (training_session_id) REFERENCES trainings_trainingsession(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: workshops_workshopstepquestionuseranswer workshops_workshopst_user_id_95a9b07d_fk_accounts_; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY workshops_workshopstepquestionuseranswer
    ADD CONSTRAINT workshops_workshopst_user_id_95a9b07d_fk_accounts_ FOREIGN KEY (user_id) REFERENCES accounts_mtpuser(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: workshops_workshopstepquestion workshops_workshopst_workshopstep_ptr_id_946d1287_fk_workshops; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY workshops_workshopstepquestion
    ADD CONSTRAINT workshops_workshopst_workshopstep_ptr_id_946d1287_fk_workshops FOREIGN KEY (workshopstep_ptr_id) REFERENCES workshops_workshopstep(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: workshops_workshopstepimage workshops_workshopst_workshopstep_ptr_id_9aa8543c_fk_workshops; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY workshops_workshopstepimage
    ADD CONSTRAINT workshops_workshopst_workshopstep_ptr_id_9aa8543c_fk_workshops FOREIGN KEY (workshopstep_ptr_id) REFERENCES workshops_workshopstep(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: workshops_workshopstepquestion_dimensions workshops_workshopst_workshopstepquestion_e1637e83_fk_workshops; Type: FK CONSTRAINT; Schema: public; Owner: denoixclement
--

ALTER TABLE ONLY workshops_workshopstepquestion_dimensions
    ADD CONSTRAINT workshops_workshopst_workshopstepquestion_e1637e83_fk_workshops FOREIGN KEY (workshopstepquestion_id) REFERENCES workshops_workshopstepquestion(workshopstep_ptr_id) DEFERRABLE INITIALLY DEFERRED;


--
-- PostgreSQL database dump complete
--

