--
--



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

CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;


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

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





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

CREATE TABLE app_app (
    appid character varying(510) NOT NULL,
    appversion bigint NOT NULL,
    name character varying(510) DEFAULT NULL::character varying,
    published boolean,
    datecreated timestamp with time zone,
    datemodified timestamp with time zone,
    license text,
    description text,
    meta text
);


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

CREATE TABLE app_datalist (
    appid character varying(510) NOT NULL,
    appversion bigint NOT NULL,
    id character varying(510) NOT NULL,
    name character varying(510) DEFAULT NULL::character varying,
    description text,
    json text,
    datecreated timestamp with time zone,
    datemodified timestamp with time zone
);


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

CREATE TABLE app_env_variable (
    appid character varying(510) NOT NULL,
    appversion bigint NOT NULL,
    id character varying(510) NOT NULL,
    value text,
    remarks text
);


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

CREATE TABLE app_fd (
    id character varying(510) NOT NULL,
    datecreated timestamp with time zone,
    datemodified timestamp with time zone
);


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

CREATE TABLE app_fd_appcenter (
    id character varying(255) NOT NULL,
    datecreated timestamp without time zone,
    datemodified timestamp without time zone
);


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

CREATE TABLE app_form (
    appid character varying(510) NOT NULL,
    appversion bigint NOT NULL,
    formid character varying(510) NOT NULL,
    name character varying(510) DEFAULT NULL::character varying,
    datecreated timestamp with time zone,
    datemodified timestamp with time zone,
    tablename character varying(510) DEFAULT NULL::character varying,
    json text,
    description text
);


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

CREATE TABLE app_form_data_audit_trail (
    id character varying(255) NOT NULL,
    appid character varying(255),
    appversion character varying(255),
    formid character varying(255),
    tablename character varying(255),
    username character varying(255),
    action character varying(255),
    data text,
    datetime timestamp without time zone
);


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

CREATE TABLE app_message (
    appid character varying(510) NOT NULL,
    appversion bigint NOT NULL,
    ouid character varying(510) NOT NULL,
    messagekey character varying(510) DEFAULT NULL::character varying,
    locale character varying(510) DEFAULT NULL::character varying,
    message text
);


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

CREATE TABLE app_package (
    packageid character varying(510) NOT NULL,
    packageversion bigint NOT NULL,
    name character varying(510) DEFAULT NULL::character varying,
    datecreated timestamp with time zone,
    datemodified timestamp with time zone,
    appid character varying(510) DEFAULT NULL::character varying,
    appversion bigint
);


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

CREATE TABLE app_package_activity_form (
    processdefid character varying(510) NOT NULL,
    activitydefid character varying(510) NOT NULL,
    packageid character varying(510) NOT NULL,
    packageversion bigint NOT NULL,
    ouid character varying(510) DEFAULT NULL::character varying,
    type character varying(510) DEFAULT NULL::character varying,
    formid character varying(510) DEFAULT NULL::character varying,
    formurl character varying(510) DEFAULT NULL::character varying,
    formiframestyle character varying(510) DEFAULT NULL::character varying,
    autocontinue boolean,
    disablesaveasdraft boolean
);


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

CREATE TABLE app_package_activity_plugin (
    processdefid character varying(510) NOT NULL,
    activitydefid character varying(510) NOT NULL,
    packageid character varying(510) NOT NULL,
    packageversion bigint NOT NULL,
    ouid character varying(510) DEFAULT NULL::character varying,
    pluginname character varying(510) DEFAULT NULL::character varying,
    pluginproperties text
);


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

CREATE TABLE app_package_participant (
    processdefid character varying(510) NOT NULL,
    participantid character varying(510) NOT NULL,
    packageid character varying(510) NOT NULL,
    packageversion bigint NOT NULL,
    ouid character varying(510) DEFAULT NULL::character varying,
    type character varying(510) DEFAULT NULL::character varying,
    value text,
    pluginproperties text
);


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

CREATE TABLE app_plugin_default (
    appid character varying(510) NOT NULL,
    appversion bigint NOT NULL,
    id character varying(510) NOT NULL,
    pluginname character varying(510) DEFAULT NULL::character varying,
    plugindescription text,
    pluginproperties text
);


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

CREATE TABLE app_report_activity (
    uuid character varying(510) NOT NULL,
    activitydefid character varying(510) DEFAULT NULL::character varying,
    activityname character varying(510) DEFAULT NULL::character varying,
    processuid character varying(510) DEFAULT NULL::character varying
);


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

CREATE TABLE app_report_activity_instance (
    instanceid character varying(510) NOT NULL,
    performer character varying(510) DEFAULT NULL::character varying,
    state character varying(510) DEFAULT NULL::character varying,
    status character varying(510) DEFAULT NULL::character varying,
    nameofaccepteduser character varying(510) DEFAULT NULL::character varying,
    assignmentusers text,
    due timestamp with time zone,
    createdtime timestamp with time zone,
    startedtime timestamp with time zone,
    finishtime timestamp with time zone,
    delay bigint,
    timeconsumingfromcreatedtime bigint,
    timeconsumingfromstartedtime bigint,
    activityuid character varying(510) DEFAULT NULL::character varying,
    processinstanceid character varying(510) DEFAULT NULL::character varying
);


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

CREATE TABLE app_report_app (
    uuid character varying(510) NOT NULL,
    appid character varying(510) DEFAULT NULL::character varying,
    appversion character varying(510) DEFAULT NULL::character varying,
    appname character varying(510) DEFAULT NULL::character varying
);


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

CREATE TABLE app_report_package (
    uuid character varying(510) NOT NULL,
    packageid character varying(510) DEFAULT NULL::character varying,
    packagename character varying(510) DEFAULT NULL::character varying,
    packageversion character varying(510) DEFAULT NULL::character varying,
    appuid character varying(510) DEFAULT NULL::character varying
);


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

CREATE TABLE app_report_process (
    uuid character varying(510) NOT NULL,
    processdefid character varying(510) DEFAULT NULL::character varying,
    processname character varying(510) DEFAULT NULL::character varying,
    packageuid character varying(510) DEFAULT NULL::character varying
);


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

CREATE TABLE app_report_process_instance (
    instanceid character varying(510) NOT NULL,
    requester character varying(510) DEFAULT NULL::character varying,
    state character varying(510) DEFAULT NULL::character varying,
    due timestamp with time zone,
    startedtime timestamp with time zone,
    finishtime timestamp with time zone,
    delay bigint,
    timeconsumingfromstartedtime bigint,
    processuid character varying(510) DEFAULT NULL::character varying
);


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

CREATE TABLE app_resource (
    appid character varying(255) NOT NULL,
    appversion bigint NOT NULL,
    id character varying(255) NOT NULL,
    filesize bigint,
    permissionclass character varying(255),
    permissionproperties text
);


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

CREATE TABLE app_userview (
    appid character varying(510) NOT NULL,
    appversion bigint NOT NULL,
    id character varying(510) NOT NULL,
    name character varying(510) DEFAULT NULL::character varying,
    description text,
    json text,
    datecreated timestamp with time zone,
    datemodified timestamp with time zone
);


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

CREATE TABLE dir_department (
    id character varying(510) NOT NULL,
    name character varying(510) DEFAULT NULL::character varying,
    description character varying(510) DEFAULT NULL::character varying,
    organizationid character varying(510) DEFAULT NULL::character varying,
    hod character varying(510) DEFAULT NULL::character varying,
    parentid character varying(510) DEFAULT NULL::character varying
);


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

CREATE TABLE dir_employment (
    id character varying(510) NOT NULL,
    userid character varying(510) DEFAULT NULL::character varying,
    startdate date,
    enddate date,
    employeecode character varying(510) DEFAULT NULL::character varying,
    role character varying(510) DEFAULT NULL::character varying,
    gradeid character varying(510) DEFAULT NULL::character varying,
    departmentid character varying(510) DEFAULT NULL::character varying,
    organizationid character varying(510) DEFAULT NULL::character varying
);


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

CREATE TABLE dir_employment_report_to (
    employmentid character varying(510) NOT NULL,
    reporttoid character varying(510) NOT NULL,
    id character varying(510) DEFAULT NULL::character varying
);


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

CREATE TABLE dir_grade (
    id character varying(510) NOT NULL,
    name character varying(510) DEFAULT NULL::character varying,
    description character varying(510) DEFAULT NULL::character varying,
    organizationid character varying(510) DEFAULT NULL::character varying
);


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

CREATE TABLE dir_group (
    id character varying(510) NOT NULL,
    name character varying(510) DEFAULT NULL::character varying,
    description character varying(510) DEFAULT NULL::character varying,
    organizationid character varying(510) DEFAULT NULL::character varying
);


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

CREATE TABLE dir_organization (
    id character varying(510) NOT NULL,
    name character varying(510) DEFAULT NULL::character varying,
    description character varying(510) DEFAULT NULL::character varying,
    parentid character varying(510) DEFAULT NULL::character varying
);


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

CREATE TABLE dir_role (
    id character varying(510) NOT NULL,
    name character varying(510) DEFAULT NULL::character varying,
    description character varying(510) DEFAULT NULL::character varying
);


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

CREATE TABLE dir_user_group (
    groupid character varying(510) NOT NULL,
    userid character varying(510) NOT NULL
);


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

CREATE TABLE dir_user_meta (
    username character varying(255) NOT NULL,
    meta_key character varying(255) NOT NULL,
    meta_value text
);


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

CREATE TABLE dir_user_replacement (
    id character varying(255) NOT NULL,
    username character varying(255),
    replacementuser character varying(255),
    appid character varying(255),
    processids character varying(255),
    startdate timestamp without time zone,
    enddate timestamp without time zone
);


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

CREATE TABLE dir_user_role (
    roleid character varying(510) NOT NULL,
    userid character varying(510) NOT NULL
);


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

CREATE TABLE objectid (
    nextoid numeric(19,0) NOT NULL
);


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

CREATE TABLE shkactivities (
    id character varying(200) NOT NULL,
    activitysetdefinitionid character varying(180) DEFAULT NULL::character varying,
    activitydefinitionid character varying(180) NOT NULL,
    process numeric(19,0) NOT NULL,
    theresource numeric(19,0) DEFAULT NULL::numeric,
    pdefname character varying(400) NOT NULL,
    processid character varying(400) NOT NULL,
    resourceid character varying(200) DEFAULT NULL::character varying,
    state numeric(19,0) NOT NULL,
    blockactivityid character varying(200) DEFAULT NULL::character varying,
    performer character varying(200) DEFAULT NULL::character varying,
    isperformerasynchronous boolean,
    priority integer,
    name character varying(508) DEFAULT NULL::character varying,
    activated bigint NOT NULL,
    activatedtzo bigint NOT NULL,
    accepted bigint,
    acceptedtzo bigint,
    laststatetime bigint NOT NULL,
    laststatetimetzo bigint NOT NULL,
    limittime bigint NOT NULL,
    limittimetzo bigint NOT NULL,
    description character varying(508) DEFAULT NULL::character varying,
    oid numeric(19,0) NOT NULL,
    version integer NOT NULL
);


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

CREATE TABLE shkactivitydata (
    activity numeric(19,0) NOT NULL,
    variabledefinitionid character varying(200) NOT NULL,
    variabletype integer NOT NULL,
    variablevalue bytea,
    variablevaluexml text,
    variablevaluevchar character varying(8000) DEFAULT NULL::character varying,
    variablevaluedbl double precision,
    variablevaluelong bigint,
    variablevaluedate timestamp with time zone,
    variablevaluebool boolean,
    isresult boolean NOT NULL,
    ordno integer NOT NULL,
    cnt numeric(19,0) NOT NULL,
    oid numeric(19,0) NOT NULL,
    version integer NOT NULL
);


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

CREATE TABLE shkactivitydatablobs (
    activitydatawob numeric(19,0) NOT NULL,
    variablevalue bytea,
    ordno integer NOT NULL,
    oid numeric(19,0) NOT NULL,
    version integer NOT NULL
);


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

CREATE TABLE shkactivitydatawob (
    activity numeric(19,0) NOT NULL,
    variabledefinitionid character varying(200) NOT NULL,
    variabletype integer NOT NULL,
    variablevaluexml text,
    variablevaluevchar character varying(8000) DEFAULT NULL::character varying,
    variablevaluedbl double precision,
    variablevaluelong bigint,
    variablevaluedate timestamp with time zone,
    variablevaluebool boolean,
    isresult boolean NOT NULL,
    ordno integer NOT NULL,
    cnt numeric(19,0) NOT NULL,
    oid numeric(19,0) NOT NULL,
    version integer NOT NULL
);


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

CREATE TABLE shkactivitystateeventaudits (
    keyvalue character varying(60) NOT NULL,
    name character varying(100) NOT NULL,
    oid numeric(19,0) NOT NULL,
    version integer NOT NULL
);


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

CREATE TABLE shkactivitystates (
    keyvalue character varying(60) NOT NULL,
    name character varying(100) NOT NULL,
    oid numeric(19,0) NOT NULL,
    version integer NOT NULL
);


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

CREATE TABLE shkandjointable (
    process numeric(19,0) NOT NULL,
    blockactivity numeric(19,0) DEFAULT NULL::numeric,
    activitydefinitionid character varying(180) NOT NULL,
    activity numeric(19,0) NOT NULL,
    cnt numeric(19,0) NOT NULL,
    oid numeric(19,0) NOT NULL,
    version integer NOT NULL
);


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

CREATE TABLE shkassignmenteventaudits (
    recordedtime bigint NOT NULL,
    recordedtimetzo bigint NOT NULL,
    theusername character varying(200) NOT NULL,
    thetype numeric(19,0) NOT NULL,
    activityid character varying(200) NOT NULL,
    activityname character varying(508) DEFAULT NULL::character varying,
    processid character varying(200) NOT NULL,
    processname character varying(508) DEFAULT NULL::character varying,
    processfactoryname character varying(400) NOT NULL,
    processfactoryversion character varying(40) NOT NULL,
    activitydefinitionid character varying(180) NOT NULL,
    activitydefinitionname character varying(180) DEFAULT NULL::character varying,
    activitydefinitiontype integer NOT NULL,
    processdefinitionid character varying(180) NOT NULL,
    processdefinitionname character varying(180) DEFAULT NULL::character varying,
    packageid character varying(180) NOT NULL,
    oldresourceusername character varying(200) DEFAULT NULL::character varying,
    oldresourcename character varying(200) DEFAULT NULL::character varying,
    newresourceusername character varying(200) NOT NULL,
    newresourcename character varying(200) DEFAULT NULL::character varying,
    isaccepted boolean NOT NULL,
    cnt numeric(19,0) NOT NULL,
    oid numeric(19,0) NOT NULL,
    version integer NOT NULL
);


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

CREATE TABLE shkassignmentstable (
    activity numeric(19,0) NOT NULL,
    theresource numeric(19,0) NOT NULL,
    activityid character varying(200) NOT NULL,
    activityprocessid character varying(200) NOT NULL,
    activityprocessdefname character varying(400) NOT NULL,
    resourceid character varying(200) NOT NULL,
    isaccepted boolean NOT NULL,
    isvalid boolean NOT NULL,
    cnt numeric(19,0) NOT NULL,
    oid numeric(19,0) NOT NULL,
    version integer NOT NULL
);


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

CREATE TABLE shkcounters (
    name character varying(200) NOT NULL,
    the_number numeric(19,0) NOT NULL,
    oid numeric(19,0) NOT NULL,
    version integer NOT NULL
);


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

CREATE TABLE shkcreateprocesseventaudits (
    recordedtime bigint NOT NULL,
    recordedtimetzo bigint NOT NULL,
    theusername character varying(200) NOT NULL,
    thetype numeric(19,0) NOT NULL,
    processid character varying(200) NOT NULL,
    processname character varying(508) DEFAULT NULL::character varying,
    processfactoryname character varying(400) NOT NULL,
    processfactoryversion character varying(40) NOT NULL,
    processdefinitionid character varying(180) NOT NULL,
    processdefinitionname character varying(180) DEFAULT NULL::character varying,
    packageid character varying(180) NOT NULL,
    pactivityid character varying(200) DEFAULT NULL::character varying,
    pprocessid character varying(200) DEFAULT NULL::character varying,
    pprocessname character varying(508) DEFAULT NULL::character varying,
    pprocessfactoryname character varying(400) DEFAULT NULL::character varying,
    pprocessfactoryversion character varying(40) DEFAULT NULL::character varying,
    pactivitydefinitionid character varying(180) DEFAULT NULL::character varying,
    pactivitydefinitionname character varying(180) DEFAULT NULL::character varying,
    pprocessdefinitionid character varying(180) DEFAULT NULL::character varying,
    pprocessdefinitionname character varying(180) DEFAULT NULL::character varying,
    ppackageid character varying(180) DEFAULT NULL::character varying,
    cnt numeric(19,0) NOT NULL,
    oid numeric(19,0) NOT NULL,
    version integer NOT NULL
);


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

CREATE TABLE shkdataeventaudits (
    recordedtime bigint NOT NULL,
    recordedtimetzo bigint NOT NULL,
    theusername character varying(200) NOT NULL,
    thetype numeric(19,0) NOT NULL,
    activityid character varying(200) DEFAULT NULL::character varying,
    activityname character varying(508) DEFAULT NULL::character varying,
    processid character varying(200) NOT NULL,
    processname character varying(508) DEFAULT NULL::character varying,
    processfactoryname character varying(400) NOT NULL,
    processfactoryversion character varying(40) NOT NULL,
    activitydefinitionid character varying(180) DEFAULT NULL::character varying,
    activitydefinitionname character varying(180) DEFAULT NULL::character varying,
    activitydefinitiontype integer,
    processdefinitionid character varying(180) NOT NULL,
    processdefinitionname character varying(180) DEFAULT NULL::character varying,
    packageid character varying(180) NOT NULL,
    cnt numeric(19,0) NOT NULL,
    oid numeric(19,0) NOT NULL,
    version integer NOT NULL
);


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

CREATE TABLE shkdeadlines (
    process numeric(19,0) NOT NULL,
    activity numeric(19,0) NOT NULL,
    cnt numeric(19,0) NOT NULL,
    timelimit bigint NOT NULL,
    timelimittzo bigint NOT NULL,
    exceptionname character varying(200) NOT NULL,
    issynchronous boolean NOT NULL,
    isexecuted boolean NOT NULL,
    oid numeric(19,0) NOT NULL,
    version integer NOT NULL
);


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

CREATE TABLE shkeventtypes (
    keyvalue character varying(60) NOT NULL,
    name character varying(100) NOT NULL,
    oid numeric(19,0) NOT NULL,
    version integer NOT NULL
);


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

CREATE TABLE shkgroupgrouptable (
    sub_gid numeric(19,0) NOT NULL,
    groupid numeric(19,0) NOT NULL,
    oid numeric(19,0) NOT NULL,
    version integer NOT NULL
);


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

CREATE TABLE shkgrouptable (
    groupid character varying(200) NOT NULL,
    description character varying(508) DEFAULT NULL::character varying,
    oid numeric(19,0) NOT NULL,
    version integer NOT NULL
);


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

CREATE TABLE shkgroupuser (
    username character varying(200) NOT NULL,
    oid numeric(19,0) NOT NULL,
    version integer NOT NULL
);


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

CREATE TABLE shkgroupuserpacklevelpart (
    participantoid numeric(19,0) NOT NULL,
    useroid numeric(19,0) NOT NULL,
    oid numeric(19,0) NOT NULL,
    version integer NOT NULL
);


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

CREATE TABLE shkgroupuserproclevelpart (
    participantoid numeric(19,0) NOT NULL,
    useroid numeric(19,0) NOT NULL,
    oid numeric(19,0) NOT NULL,
    version integer NOT NULL
);


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

CREATE TABLE shkneweventauditdata (
    dataeventaudit numeric(19,0) NOT NULL,
    variabledefinitionid character varying(200) NOT NULL,
    variabletype integer NOT NULL,
    variablevalue bytea,
    variablevaluexml text,
    variablevaluevchar character varying(8000) DEFAULT NULL::character varying,
    variablevaluedbl double precision,
    variablevaluelong bigint,
    variablevaluedate timestamp with time zone,
    variablevaluebool boolean,
    ordno integer NOT NULL,
    cnt numeric(19,0) NOT NULL,
    oid numeric(19,0) NOT NULL,
    version integer NOT NULL
);


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

CREATE TABLE shkneweventauditdatablobs (
    neweventauditdatawob numeric(19,0) NOT NULL,
    variablevalue bytea,
    ordno integer NOT NULL,
    oid numeric(19,0) NOT NULL,
    version integer NOT NULL
);


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

CREATE TABLE shkneweventauditdatawob (
    dataeventaudit numeric(19,0) NOT NULL,
    variabledefinitionid character varying(200) NOT NULL,
    variabletype integer NOT NULL,
    variablevaluexml text,
    variablevaluevchar character varying(8000) DEFAULT NULL::character varying,
    variablevaluedbl double precision,
    variablevaluelong bigint,
    variablevaluedate timestamp with time zone,
    variablevaluebool boolean,
    ordno integer NOT NULL,
    cnt numeric(19,0) NOT NULL,
    oid numeric(19,0) NOT NULL,
    version integer NOT NULL
);


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

CREATE TABLE shknextxpdlversions (
    xpdlid character varying(180) NOT NULL,
    nextversion character varying(40) NOT NULL,
    oid numeric(19,0) NOT NULL,
    version integer NOT NULL
);


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

CREATE TABLE shknormaluser (
    username character varying(200) NOT NULL,
    oid numeric(19,0) NOT NULL,
    version integer NOT NULL
);


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

CREATE TABLE shkoldeventauditdata (
    dataeventaudit numeric(19,0) NOT NULL,
    variabledefinitionid character varying(200) NOT NULL,
    variabletype integer NOT NULL,
    variablevalue bytea,
    variablevaluexml text,
    variablevaluevchar character varying(8000) DEFAULT NULL::character varying,
    variablevaluedbl double precision,
    variablevaluelong bigint,
    variablevaluedate timestamp with time zone,
    variablevaluebool boolean,
    ordno integer NOT NULL,
    cnt numeric(19,0) NOT NULL,
    oid numeric(19,0) NOT NULL,
    version integer NOT NULL
);


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

CREATE TABLE shkoldeventauditdatablobs (
    oldeventauditdatawob numeric(19,0) NOT NULL,
    variablevalue bytea,
    ordno integer NOT NULL,
    oid numeric(19,0) NOT NULL,
    version integer NOT NULL
);


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

CREATE TABLE shkoldeventauditdatawob (
    dataeventaudit numeric(19,0) NOT NULL,
    variabledefinitionid character varying(200) NOT NULL,
    variabletype integer NOT NULL,
    variablevaluexml text,
    variablevaluevchar character varying(8000) DEFAULT NULL::character varying,
    variablevaluedbl double precision,
    variablevaluelong bigint,
    variablevaluedate timestamp with time zone,
    variablevaluebool boolean,
    ordno integer NOT NULL,
    cnt numeric(19,0) NOT NULL,
    oid numeric(19,0) NOT NULL,
    version integer NOT NULL
);


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

CREATE TABLE shkpacklevelparticipant (
    participant_id character varying(180) NOT NULL,
    packageoid numeric(19,0) NOT NULL,
    oid numeric(19,0) NOT NULL,
    version integer NOT NULL
);


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

CREATE TABLE shkpacklevelxpdlapp (
    application_id character varying(180) NOT NULL,
    packageoid numeric(19,0) NOT NULL,
    oid numeric(19,0) NOT NULL,
    version integer NOT NULL
);


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

CREATE TABLE shkpacklevelxpdlapptaappdetail (
    xpdl_appoid numeric(19,0) NOT NULL,
    toolagentoid numeric(19,0) NOT NULL,
    oid numeric(19,0) NOT NULL,
    version integer NOT NULL
);


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

CREATE TABLE shkpacklevelxpdlapptaappdetusr (
    xpdl_appoid numeric(19,0) NOT NULL,
    toolagentoid numeric(19,0) NOT NULL,
    oid numeric(19,0) NOT NULL,
    version integer NOT NULL
);


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

CREATE TABLE shkpacklevelxpdlapptaappuser (
    xpdl_appoid numeric(19,0) NOT NULL,
    toolagentoid numeric(19,0) NOT NULL,
    oid numeric(19,0) NOT NULL,
    version integer NOT NULL
);


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

CREATE TABLE shkpacklevelxpdlapptoolagntapp (
    xpdl_appoid numeric(19,0) NOT NULL,
    toolagentoid numeric(19,0) NOT NULL,
    oid numeric(19,0) NOT NULL,
    version integer NOT NULL
);


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

CREATE TABLE shkprocessdata (
    process numeric(19,0) NOT NULL,
    variabledefinitionid character varying(200) NOT NULL,
    variabletype integer NOT NULL,
    variablevalue bytea,
    variablevaluexml text,
    variablevaluevchar character varying(8000) DEFAULT NULL::character varying,
    variablevaluedbl double precision,
    variablevaluelong bigint,
    variablevaluedate timestamp with time zone,
    variablevaluebool boolean,
    ordno integer NOT NULL,
    cnt numeric(19,0) NOT NULL,
    oid numeric(19,0) NOT NULL,
    version integer NOT NULL
);


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

CREATE TABLE shkprocessdatablobs (
    processdatawob numeric(19,0) NOT NULL,
    variablevalue bytea,
    ordno integer NOT NULL,
    oid numeric(19,0) NOT NULL,
    version integer NOT NULL
);


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

CREATE TABLE shkprocessdatawob (
    process numeric(19,0) NOT NULL,
    variabledefinitionid character varying(200) NOT NULL,
    variabletype integer NOT NULL,
    variablevaluexml text,
    variablevaluevchar character varying(8000) DEFAULT NULL::character varying,
    variablevaluedbl double precision,
    variablevaluelong bigint,
    variablevaluedate timestamp with time zone,
    variablevaluebool boolean,
    ordno integer NOT NULL,
    cnt numeric(19,0) NOT NULL,
    oid numeric(19,0) NOT NULL,
    version integer NOT NULL
);


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

CREATE TABLE shkprocessdefinitions (
    name character varying(400) NOT NULL,
    packageid character varying(180) NOT NULL,
    processdefinitionid character varying(180) NOT NULL,
    processdefinitioncreated bigint NOT NULL,
    processdefinitionversion character varying(40) NOT NULL,
    state integer NOT NULL,
    oid numeric(19,0) NOT NULL,
    version integer NOT NULL
);


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

CREATE TABLE shkprocesses (
    syncversion bigint NOT NULL,
    id character varying(200) NOT NULL,
    processdefinition numeric(19,0) NOT NULL,
    pdefname character varying(400) NOT NULL,
    activityrequesterid character varying(200) DEFAULT NULL::character varying,
    activityrequesterprocessid character varying(200) DEFAULT NULL::character varying,
    resourcerequesterid character varying(200) NOT NULL,
    externalrequesterclassname character varying(508) DEFAULT NULL::character varying,
    state numeric(19,0) NOT NULL,
    priority integer,
    name character varying(508) DEFAULT NULL::character varying,
    created bigint NOT NULL,
    createdtzo bigint NOT NULL,
    started bigint,
    startedtzo bigint,
    laststatetime bigint NOT NULL,
    laststatetimetzo bigint NOT NULL,
    limittime bigint NOT NULL,
    limittimetzo bigint NOT NULL,
    description character varying(508) DEFAULT NULL::character varying,
    oid numeric(19,0) NOT NULL,
    version integer NOT NULL
);


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

CREATE TABLE shkprocessrequesters (
    id character varying(200) NOT NULL,
    activityrequester numeric(19,0) DEFAULT NULL::numeric,
    resourcerequester numeric(19,0) DEFAULT NULL::numeric,
    oid numeric(19,0) NOT NULL,
    version integer NOT NULL
);


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

CREATE TABLE shkprocessstateeventaudits (
    keyvalue character varying(60) NOT NULL,
    name character varying(100) NOT NULL,
    oid numeric(19,0) NOT NULL,
    version integer NOT NULL
);


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

CREATE TABLE shkprocessstates (
    keyvalue character varying(60) NOT NULL,
    name character varying(100) NOT NULL,
    oid numeric(19,0) NOT NULL,
    version integer NOT NULL
);


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

CREATE TABLE shkproclevelparticipant (
    participant_id character varying(180) NOT NULL,
    processoid numeric(19,0) NOT NULL,
    oid numeric(19,0) NOT NULL,
    version integer NOT NULL
);


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

CREATE TABLE shkproclevelxpdlapp (
    application_id character varying(180) NOT NULL,
    processoid numeric(19,0) NOT NULL,
    oid numeric(19,0) NOT NULL,
    version integer NOT NULL
);


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

CREATE TABLE shkproclevelxpdlapptaappdetail (
    xpdl_appoid numeric(19,0) NOT NULL,
    toolagentoid numeric(19,0) NOT NULL,
    oid numeric(19,0) NOT NULL,
    version integer NOT NULL
);


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

CREATE TABLE shkproclevelxpdlapptaappdetusr (
    xpdl_appoid numeric(19,0) NOT NULL,
    toolagentoid numeric(19,0) NOT NULL,
    oid numeric(19,0) NOT NULL,
    version integer NOT NULL
);


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

CREATE TABLE shkproclevelxpdlapptaappuser (
    xpdl_appoid numeric(19,0) NOT NULL,
    toolagentoid numeric(19,0) NOT NULL,
    oid numeric(19,0) NOT NULL,
    version integer NOT NULL
);


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

CREATE TABLE shkproclevelxpdlapptoolagntapp (
    xpdl_appoid numeric(19,0) NOT NULL,
    toolagentoid numeric(19,0) NOT NULL,
    oid numeric(19,0) NOT NULL,
    version integer NOT NULL
);


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

CREATE TABLE shkresourcestable (
    username character varying(200) NOT NULL,
    name character varying(200) DEFAULT NULL::character varying,
    oid numeric(19,0) NOT NULL,
    version integer NOT NULL
);


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

CREATE TABLE shkstateeventaudits (
    recordedtime bigint NOT NULL,
    recordedtimetzo bigint NOT NULL,
    theusername character varying(200) NOT NULL,
    thetype numeric(19,0) NOT NULL,
    activityid character varying(200) DEFAULT NULL::character varying,
    activityname character varying(508) DEFAULT NULL::character varying,
    processid character varying(200) NOT NULL,
    processname character varying(508) DEFAULT NULL::character varying,
    processfactoryname character varying(400) NOT NULL,
    processfactoryversion character varying(40) NOT NULL,
    activitydefinitionid character varying(180) DEFAULT NULL::character varying,
    activitydefinitionname character varying(180) DEFAULT NULL::character varying,
    activitydefinitiontype integer,
    processdefinitionid character varying(180) NOT NULL,
    processdefinitionname character varying(180) DEFAULT NULL::character varying,
    packageid character varying(180) NOT NULL,
    oldprocessstate numeric(19,0) DEFAULT NULL::numeric,
    newprocessstate numeric(19,0) DEFAULT NULL::numeric,
    oldactivitystate numeric(19,0) DEFAULT NULL::numeric,
    newactivitystate numeric(19,0) DEFAULT NULL::numeric,
    cnt numeric(19,0) NOT NULL,
    oid numeric(19,0) NOT NULL,
    version integer NOT NULL
);


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

CREATE TABLE shktoolagentapp (
    tool_agent_name character varying(500) NOT NULL,
    app_name character varying(180) NOT NULL,
    oid numeric(19,0) NOT NULL,
    version integer NOT NULL
);


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

CREATE TABLE shktoolagentappdetail (
    app_mode numeric(10,0) NOT NULL,
    toolagent_appoid numeric(19,0) NOT NULL,
    oid numeric(19,0) NOT NULL,
    version integer NOT NULL
);


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

CREATE TABLE shktoolagentappdetailuser (
    toolagent_appoid numeric(19,0) NOT NULL,
    useroid numeric(19,0) NOT NULL,
    oid numeric(19,0) NOT NULL,
    version integer NOT NULL
);


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

CREATE TABLE shktoolagentappuser (
    toolagent_appoid numeric(19,0) NOT NULL,
    useroid numeric(19,0) NOT NULL,
    oid numeric(19,0) NOT NULL,
    version integer NOT NULL
);


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

CREATE TABLE shkusergrouptable (
    userid numeric(19,0) NOT NULL,
    groupid numeric(19,0) NOT NULL,
    oid numeric(19,0) NOT NULL,
    version integer NOT NULL
);


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

CREATE TABLE shkuserpacklevelpart (
    participantoid numeric(19,0) NOT NULL,
    useroid numeric(19,0) NOT NULL,
    oid numeric(19,0) NOT NULL,
    version integer NOT NULL
);


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

CREATE TABLE shkuserproclevelparticipant (
    participantoid numeric(19,0) NOT NULL,
    useroid numeric(19,0) NOT NULL,
    oid numeric(19,0) NOT NULL,
    version integer NOT NULL
);


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

CREATE TABLE shkxpdlapplicationpackage (
    package_id character varying(180) NOT NULL,
    oid numeric(19,0) NOT NULL,
    version integer NOT NULL
);


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

CREATE TABLE shkxpdlapplicationprocess (
    process_id character varying(180) NOT NULL,
    packageoid numeric(19,0) NOT NULL,
    oid numeric(19,0) NOT NULL,
    version integer NOT NULL
);


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

CREATE TABLE shkxpdldata (
    xpdlcontent bytea,
    xpdlclasscontent bytea,
    xpdl numeric(19,0) NOT NULL,
    cnt numeric(19,0) NOT NULL,
    oid numeric(19,0) NOT NULL,
    version integer NOT NULL
);


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

CREATE TABLE shkxpdlhistory (
    xpdlid character varying(180) NOT NULL,
    xpdlversion character varying(40) NOT NULL,
    xpdlclassversion bigint NOT NULL,
    xpdluploadtime timestamp with time zone NOT NULL,
    xpdlhistoryuploadtime timestamp with time zone NOT NULL,
    oid numeric(19,0) NOT NULL,
    version integer NOT NULL
);


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

CREATE TABLE shkxpdlhistorydata (
    xpdlcontent bytea NOT NULL,
    xpdlclasscontent bytea NOT NULL,
    xpdlhistory numeric(19,0) NOT NULL,
    cnt numeric(19,0) NOT NULL,
    oid numeric(19,0) NOT NULL,
    version integer NOT NULL
);


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

CREATE TABLE shkxpdlparticipantpackage (
    package_id character varying(180) NOT NULL,
    oid numeric(19,0) NOT NULL,
    version integer NOT NULL
);


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

CREATE TABLE shkxpdlparticipantprocess (
    process_id character varying(180) NOT NULL,
    packageoid numeric(19,0) NOT NULL,
    oid numeric(19,0) NOT NULL,
    version integer NOT NULL
);


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

CREATE TABLE shkxpdlreferences (
    referredxpdlid character varying(180) NOT NULL,
    referringxpdl numeric(19,0) NOT NULL,
    referredxpdlnumber integer NOT NULL,
    oid numeric(19,0) NOT NULL,
    version integer NOT NULL
);


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

CREATE TABLE shkxpdls (
    xpdlid character varying(180) NOT NULL,
    xpdlversion character varying(40) NOT NULL,
    xpdlclassversion bigint NOT NULL,
    xpdluploadtime timestamp with time zone NOT NULL,
    oid numeric(19,0) NOT NULL,
    version integer NOT NULL
);


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

CREATE TABLE wf_audit_trail (
    id character varying(510) NOT NULL,
    username character varying(510) DEFAULT NULL::character varying,
    clazz character varying(510) DEFAULT NULL::character varying,
    method character varying(510) DEFAULT NULL::character varying,
    message text,
    "timestamp" timestamp with time zone,
    appid character varying(510) DEFAULT NULL::character varying,
    appversion character varying(510) DEFAULT NULL::character varying
);


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

CREATE TABLE wf_process_link (
    processid character varying(510) NOT NULL,
    parentprocessid character varying(510) DEFAULT NULL::character varying,
    originprocessid character varying(510) DEFAULT NULL::character varying
);


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

CREATE TABLE wf_report (
    activityinstanceid character varying(510) NOT NULL,
    processinstanceid character varying(510) DEFAULT NULL::character varying,
    priority character varying(510) DEFAULT NULL::character varying,
    createdtime timestamp with time zone,
    startedtime timestamp with time zone,
    datelimit bigint,
    due timestamp with time zone,
    delay bigint,
    finishtime timestamp with time zone,
    timeconsumingfromdatecreated bigint,
    timeconsumingfromdatestarted bigint,
    performer character varying(510) DEFAULT NULL::character varying,
    nameofaccepteduser character varying(510) DEFAULT NULL::character varying,
    status character varying(510) DEFAULT NULL::character varying,
    state character varying(510) DEFAULT NULL::character varying,
    packageid character varying(510) DEFAULT NULL::character varying,
    processdefid character varying(510) DEFAULT NULL::character varying,
    activitydefid character varying(510) DEFAULT NULL::character varying,
    assignmentusers text,
    appid character varying(510) DEFAULT NULL::character varying,
    appversion bigint
);


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

CREATE TABLE wf_report_activity (
    activitydefid character varying(510) NOT NULL,
    activityname character varying(510) DEFAULT NULL::character varying,
    description character varying(510) DEFAULT NULL::character varying,
    priority character varying(510) DEFAULT NULL::character varying
);


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

CREATE TABLE wf_report_package (
    packageid character varying(510) NOT NULL,
    packagename character varying(510) DEFAULT NULL::character varying
);


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

CREATE TABLE wf_report_process (
    processdefid character varying(510) NOT NULL,
    processname character varying(510) DEFAULT NULL::character varying,
    version character varying(510) DEFAULT NULL::character varying
);


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

CREATE TABLE wf_resource_bundle_message (
    id character varying(510) NOT NULL,
    messagekey character varying(510) DEFAULT NULL::character varying,
    locale character varying(510) DEFAULT NULL::character varying,
    message text
);


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

CREATE TABLE wf_setup (
    id character varying(510) NOT NULL,
    property character varying(510) DEFAULT NULL::character varying,
    value text,
    ordering integer
);


--
-- Data for Name: app_app; Type: TABLE DATA; Schema: public; Owner: -
--

COPY app_app (appid, appversion, name, published, datecreated, datemodified, license, description, meta) FROM stdin;
appcenter	1	App Center	t	2018-02-13 05:20:07.822+00	2018-02-13 05:20:09.031+00	oRIgWuw8ed5OmS98TSZFxocskOFXU0v3VPneM0k80NqSBK2r6RhNzTNTryZkuj4W	\N	\N
\.


--
-- Data for Name: app_datalist; Type: TABLE DATA; Schema: public; Owner: -
--

COPY app_datalist (appid, appversion, id, name, description, json, datecreated, datemodified) FROM stdin;
\.


--
-- Data for Name: app_env_variable; Type: TABLE DATA; Schema: public; Owner: -
--

COPY app_env_variable (appid, appversion, id, value, remarks) FROM stdin;
\.


--
-- Data for Name: app_fd; Type: TABLE DATA; Schema: public; Owner: -
--

COPY app_fd (id, datecreated, datemodified) FROM stdin;
\.


--
-- Data for Name: app_fd_appcenter; Type: TABLE DATA; Schema: public; Owner: -
--

COPY app_fd_appcenter (id, datecreated, datemodified) FROM stdin;
\.


--
-- Data for Name: app_form; Type: TABLE DATA; Schema: public; Owner: -
--

COPY app_form (appid, appversion, formid, name, datecreated, datemodified, tablename, json, description) FROM stdin;
appcenter	1	landing	Published Apps	2018-02-13 05:20:08.259+00	2018-02-13 05:20:08.259+00	appcenter	{"className":"org.joget.apps.form.model.Form","properties":{"id":"landing","loadBinder":{"className":"org.joget.apps.form.lib.WorkflowFormBinder","properties":{}},"tableName":"appcenter","description":"","postProcessorRunOn":"both","name":"Published Apps","storeBinder":{"className":"org.joget.apps.form.lib.WorkflowFormBinder","properties":{}},"postProcessor":{"className":"","properties":{}},"permission":{"className":"","properties":{}},"noPermissionMessage":""},"elements":[{"elements":[{"elements":[{"className":"org.joget.apps.form.lib.CustomHTML","properties":{"id":"admin_div","autoPopulate":"","value":"<style>\\n#appcenter_admin {\\n    text-align: center;\\n}\\n#appcenter_admin a {\\n    background: white;\\n    border: solid 1px #ddd;\\n    cursor: pointer;\\n    text-decoration: none;\\n    color: #555;\\n    margin-right: 5px;\\n    padding: 10px;\\n    box-shadow: 0 1px 1.5px 1px rgba(0,0,0,.12);\\n    border-radius: 4px;\\n    font-size: 14px;\\n    font-weight: 400;\\n    line-height: 1.42857143;\\n    display: inline-block;\\n}\\n@media (max-width:540px) {\\n    #appcenter_admin a {\\n        margin-top: -20px;\\n        margin-bottom: 20px;\\n    }\\n}\\n</style>\\n<div id=\\"appcenter_admin\\">\\n    <a href=\\"#\\" onclick=\\"appCreate();return false\\">#i18n.Design New App#</a>\\n    <a href=\\"#\\" onclick=\\"appImport();return false\\">#i18n.Import App#</a>\\n    <a href=\\"#\\" onclick='AdminBar.showQuickOverlay(\\"/jw/web/desktop/marketplace/app?url=\\" + encodeURIComponent(\\"https://marketplace.joget.org\\"));return false'>#i18n.Download from Marketplace#</a>\\n</div>","label":""}}],"className":"org.joget.apps.form.model.Column","properties":{"width":"100%"}}],"className":"org.joget.apps.form.model.Section","properties":{"id":"admin_section","loadBinder":{"className":"","properties":{}},"storeBinder":{"className":"","properties":{}},"permission":{"className":"org.joget.apps.userview.lib.BeanShellPermission","properties":{"script":"import org.joget.workflow.util.WorkflowUtil;\\nreturn !WorkflowUtil.isCurrentUserAnonymous() && WorkflowUtil.isCurrentUserInRole(WorkflowUtil.ROLE_ADMIN);\\n"}},"label":"","comment":""}},{"elements":[{"elements":[{"className":"org.joget.apps.form.lib.CustomHTML","properties":{"id":"published_apps","autoPopulate":"","value":"<link rel=\\"stylesheet\\" href=\\"/jw/css/appCenter.css\\" />\\n<div id=\\"main-action-help\\"><i class=\\"fa fa-info-circle\\"></i></div>\\n<div id=\\"search\\"></div>\\n<div id=\\"apps\\"></div>\\n<p>\\n<script src=\\"/jw/js/appCenter.js\\"></script>\\n<script>\\nAppCenter.searchFilter($(\\"#search\\"), $(\\"#apps\\")); \\nAppCenter.loadPublishedApps(\\"#apps\\");\\n</script>\\n</p>","label":""}}],"className":"org.joget.apps.form.model.Column","properties":{"width":"100%"}}],"className":"org.joget.apps.form.model.Section","properties":{"id":"apps_section","reverse":"","loadBinder":{"className":"","properties":{}},"visibilityControl":"","regex":"","storeBinder":{"className":"","properties":{}},"label":"","permission":{"className":"","properties":{}},"join":""}}]}	\N
\.


--
-- Data for Name: app_form_data_audit_trail; Type: TABLE DATA; Schema: public; Owner: -
--

COPY app_form_data_audit_trail (id, appid, appversion, formid, tablename, username, action, data, datetime) FROM stdin;
\.


--
-- Data for Name: app_message; Type: TABLE DATA; Schema: public; Owner: -
--

COPY app_message (appid, appversion, ouid, messagekey, locale, message) FROM stdin;
appcenter	1	<i class='fa fa-home'></i> Home_zh_CN	<i class='fa fa-home'></i> Home	zh_CN	<i class='fa fa-home'></i> 首页
appcenter	1	<i class='fa fa-home'></i> Home_zh_TW	<i class='fa fa-home'></i> Home	zh_TW	<i class='fa fa-home'></i> 首頁
appcenter	1	App Center_zh_CN	App Center	zh_CN	应用中心
appcenter	1	App Center_zh_TW	App Center	zh_TW	應用中心
appcenter	1	Design New App_zh_CN	Design New App	zh_CN	设计新应用程序
appcenter	1	Design New App_zh_TW	Design New App	zh_TW	設計新應用程序
appcenter	1	Download from Marketplace_zh_CN	Download from Marketplace	zh_CN	应用市场
appcenter	1	Download from Marketplace_zh_TW	Download from Marketplace	zh_TW	應用市場
appcenter	1	Import App_zh_CN	Import App	zh_CN	导入应用
appcenter	1	Import App_zh_TW	Import App	zh_TW	導入應用
appcenter	1	Powered by Joget_zh_CN	Powered by Joget	zh_CN	由Joget技术支持
appcenter	1	Powered by Joget_zh_TW	Powered by Joget	zh_TW	由Joget技術支持
appcenter	1	Published Apps_zh_CN	Published Apps	zh_CN	本地已发布
appcenter	1	Published Apps_zh_TW	Published Apps	zh_TW	本地已發布
\.


--
-- Data for Name: app_package; Type: TABLE DATA; Schema: public; Owner: -
--

COPY app_package (packageid, packageversion, name, datecreated, datemodified, appid, appversion) FROM stdin;
\.


--
-- Data for Name: app_package_activity_form; Type: TABLE DATA; Schema: public; Owner: -
--

COPY app_package_activity_form (processdefid, activitydefid, packageid, packageversion, ouid, type, formid, formurl, formiframestyle, autocontinue, disablesaveasdraft) FROM stdin;
\.


--
-- Data for Name: app_package_activity_plugin; Type: TABLE DATA; Schema: public; Owner: -
--

COPY app_package_activity_plugin (processdefid, activitydefid, packageid, packageversion, ouid, pluginname, pluginproperties) FROM stdin;
\.


--
-- Data for Name: app_package_participant; Type: TABLE DATA; Schema: public; Owner: -
--

COPY app_package_participant (processdefid, participantid, packageid, packageversion, ouid, type, value, pluginproperties) FROM stdin;
\.


--
-- Data for Name: app_plugin_default; Type: TABLE DATA; Schema: public; Owner: -
--

COPY app_plugin_default (appid, appversion, id, pluginname, plugindescription, pluginproperties) FROM stdin;
\.


--
-- Data for Name: app_report_activity; Type: TABLE DATA; Schema: public; Owner: -
--

COPY app_report_activity (uuid, activitydefid, activityname, processuid) FROM stdin;
\.


--
-- Data for Name: app_report_activity_instance; Type: TABLE DATA; Schema: public; Owner: -
--

COPY app_report_activity_instance (instanceid, performer, state, status, nameofaccepteduser, assignmentusers, due, createdtime, startedtime, finishtime, delay, timeconsumingfromcreatedtime, timeconsumingfromstartedtime, activityuid, processinstanceid) FROM stdin;
\.


--
-- Data for Name: app_report_app; Type: TABLE DATA; Schema: public; Owner: -
--

COPY app_report_app (uuid, appid, appversion, appname) FROM stdin;
\.


--
-- Data for Name: app_report_package; Type: TABLE DATA; Schema: public; Owner: -
--

COPY app_report_package (uuid, packageid, packagename, packageversion, appuid) FROM stdin;
\.


--
-- Data for Name: app_report_process; Type: TABLE DATA; Schema: public; Owner: -
--

COPY app_report_process (uuid, processdefid, processname, packageuid) FROM stdin;
\.


--
-- Data for Name: app_report_process_instance; Type: TABLE DATA; Schema: public; Owner: -
--

COPY app_report_process_instance (instanceid, requester, state, due, startedtime, finishtime, delay, timeconsumingfromstartedtime, processuid) FROM stdin;
\.


--
-- Data for Name: app_resource; Type: TABLE DATA; Schema: public; Owner: -
--

COPY app_resource (appid, appversion, id, filesize, permissionclass, permissionproperties) FROM stdin;
\.


--
-- Data for Name: app_userview; Type: TABLE DATA; Schema: public; Owner: -
--

COPY app_userview (appid, appversion, id, name, description, json, datecreated, datemodified) FROM stdin;
appcenter	1	v	Joget Workflow	\N	{"className":"org.joget.apps.userview.model.Userview","properties":{"id":"v","name":"Joget Workflow","description":"","welcomeMessage":"#date.EEE, d MMM yyyy#","logoutText":"Logout","footerMessage":"#i18n.Powered by Joget#"},"setting":{"properties":{"theme":{"className":"org.joget.plugin.enterprise.UniversalTheme","properties":{"horizontal_menu":"horizontal_inline","themeScheme":"light","primaryColor":"custom","customPrimary":"#7CA6D8","customPrimaryDark":"","customPrimaryLight":"","accentColor":"BLUE","buttonColor":"GREY","buttonTextColor":"WHITE","menuFontColor":"BLACK","fontColor":"WHITE","fav_icon":"","logo":"\\/jw\\/images\\/v3\\/logo.png","profile":"","userImage":"","inbox":"all","shortcutLinkLabel":"Shortcut","shortcut":[],"userMenu":[],"enableResponsiveSwitch":"true","removeAssignmentTitle":"","homeAttractBanner":"<div id=\\"banner\\"><h1>#i18n.App Center#<\\/h1><\\/div>","css":"\\/* banner image and title *\\/\\n#banner {\\n    background: url(\\/jw\\/home\\/banner.jpg);\\n    background-size: cover;\\n    height: 240px;\\n    width: 100%;\\n}\\n#banner h1 {\\n    margin-top: 0px;\\n    padding-top: 20px;\\n    color: white;\\n    text-align: center;\\n}\\nbody#home ul.breadcrumb {\\n    display: none;\\n}\\n\\n\\/* admin buttons *\\/\\n#appcenter_admin {\\n    position: absolute;\\n    top: -120px;\\n    text-align: center;\\n    display: block;\\n    margin: auto;\\n    width: 100%;\\n}\\n#admin_section, #admin_section .form-column, #admin_section .form-cell, #admin_section .form-cell-value {\\n    padding: 0px;\\n    margin: 0px;\\n    height: 0px;\\n}\\n@media (max-width: 540px) {\\n    #appcenter_admin {    \\n        top: -150px;\\n    }\\n}\\n","js":"","subheader":"","subfooter":"","disableHelpGuide":"","loginPageTop":"","loginPageBottom":""}},"userviewDescription":"","userview_thumbnail":"","hideThisUserviewInAppCenter":"true","permission":{"className":"","properties":{}},"__":""}},"categories":[{"className":"org.joget.apps.userview.model.UserviewCategory","properties":{"id":"category-EE74E4F4426241BD9BC3BC73B1D24AC7","label":"<i class='fa fa-home'><\\/i> Home"},"menus":[{"className":"org.joget.apps.userview.lib.FormMenu","properties":{"id":"28F7ADF73F204C8BBAAD32CF26587AE2","customId":"home","label":"Published Apps","formId":"landing","showInPopupDialog":"","readonly":"","readonlyLabel":"","messageShowAfterComplete":"","redirectUrlAfterComplete":"","redirectUrlOnCancel":"","redirectTargetOnCancel":"top","fieldPassover":"","fieldPassoverMethod":"append","paramName":"","submitButtonLabel":"","cancelButtonLabel":"","customHeader":"","customFooter":"","keyName":"","loadDataWithKey":"","userviewCacheScope":"","userviewCacheDuration":"20"}}]}]}	2018-02-13 05:20:08.797+00	2018-02-13 05:20:08.797+00
\.


--
-- Data for Name: dir_department; Type: TABLE DATA; Schema: public; Owner: -
--

COPY dir_department (id, name, description, organizationid, hod, parentid) FROM stdin;
\.


--
-- Data for Name: dir_employment; Type: TABLE DATA; Schema: public; Owner: -
--

COPY dir_employment (id, userid, startdate, enddate, employeecode, role, gradeid, departmentid, organizationid) FROM stdin;
\.


--
-- Data for Name: dir_employment_report_to; Type: TABLE DATA; Schema: public; Owner: -
--

COPY dir_employment_report_to (employmentid, reporttoid, id) FROM stdin;
\.


--
-- Data for Name: dir_grade; Type: TABLE DATA; Schema: public; Owner: -
--

COPY dir_grade (id, name, description, organizationid) FROM stdin;
\.


--
-- Data for Name: dir_group; Type: TABLE DATA; Schema: public; Owner: -
--

COPY dir_group (id, name, description, organizationid) FROM stdin;
\.


--
-- Data for Name: dir_organization; Type: TABLE DATA; Schema: public; Owner: -
--

COPY dir_organization (id, name, description, parentid) FROM stdin;
\.


--
-- Data for Name: dir_role; Type: TABLE DATA; Schema: public; Owner: -
--

COPY dir_role (id, name, description) FROM stdin;
ROLE_ADMIN	Admin	Administrator
ROLE_USER	User	Normal User
\.


--
-- Data for Name: dir_user_group; Type: TABLE DATA; Schema: public; Owner: -
--

COPY dir_user_group (groupid, userid) FROM stdin;
\.


--
-- Data for Name: dir_user_meta; Type: TABLE DATA; Schema: public; Owner: -
--

COPY dir_user_meta (username, meta_key, meta_value) FROM stdin;
\.


--
-- Data for Name: dir_user_replacement; Type: TABLE DATA; Schema: public; Owner: -
--

COPY dir_user_replacement (id, username, replacementuser, appid, processids, startdate, enddate) FROM stdin;
\.


--
-- Data for Name: dir_user_role; Type: TABLE DATA; Schema: public; Owner: -
--

COPY dir_user_role (roleid, userid) FROM stdin;
ROLE_ADMIN	admin
\.


--
-- Data for Name: objectid; Type: TABLE DATA; Schema: public; Owner: -
--

COPY objectid (nextoid) FROM stdin;
1000200
\.


--
-- Data for Name: shkactivities; Type: TABLE DATA; Schema: public; Owner: -
--

COPY shkactivities (id, activitysetdefinitionid, activitydefinitionid, process, theresource, pdefname, processid, resourceid, state, blockactivityid, performer, isperformerasynchronous, priority, name, activated, activatedtzo, accepted, acceptedtzo, laststatetime, laststatetimetzo, limittime, limittimetzo, description, oid, version) FROM stdin;
\.


--
-- Data for Name: shkactivitydata; Type: TABLE DATA; Schema: public; Owner: -
--

COPY shkactivitydata (activity, variabledefinitionid, variabletype, variablevalue, variablevaluexml, variablevaluevchar, variablevaluedbl, variablevaluelong, variablevaluedate, variablevaluebool, isresult, ordno, cnt, oid, version) FROM stdin;
\.


--
-- Data for Name: shkactivitydatablobs; Type: TABLE DATA; Schema: public; Owner: -
--

COPY shkactivitydatablobs (activitydatawob, variablevalue, ordno, oid, version) FROM stdin;
\.


--
-- Data for Name: shkactivitydatawob; Type: TABLE DATA; Schema: public; Owner: -
--

COPY shkactivitydatawob (activity, variabledefinitionid, variabletype, variablevaluexml, variablevaluevchar, variablevaluedbl, variablevaluelong, variablevaluedate, variablevaluebool, isresult, ordno, cnt, oid, version) FROM stdin;
\.


--
-- Data for Name: shkactivitystateeventaudits; Type: TABLE DATA; Schema: public; Owner: -
--

COPY shkactivitystateeventaudits (keyvalue, name, oid, version) FROM stdin;
\.


--
-- Data for Name: shkactivitystates; Type: TABLE DATA; Schema: public; Owner: -
--

COPY shkactivitystates (keyvalue, name, oid, version) FROM stdin;
open.running	open.running	1000001	0
open.not_running.not_started	open.not_running.not_started	1000003	0
open.not_running.suspended	open.not_running.suspended	1000005	0
closed.completed	closed.completed	1000007	0
closed.terminated	closed.terminated	1000009	0
closed.aborted	closed.aborted	1000011	0
\.


--
-- Data for Name: shkandjointable; Type: TABLE DATA; Schema: public; Owner: -
--

COPY shkandjointable (process, blockactivity, activitydefinitionid, activity, cnt, oid, version) FROM stdin;
\.


--
-- Data for Name: shkassignmenteventaudits; Type: TABLE DATA; Schema: public; Owner: -
--

COPY shkassignmenteventaudits (recordedtime, recordedtimetzo, theusername, thetype, activityid, activityname, processid, processname, processfactoryname, processfactoryversion, activitydefinitionid, activitydefinitionname, activitydefinitiontype, processdefinitionid, processdefinitionname, packageid, oldresourceusername, oldresourcename, newresourceusername, newresourcename, isaccepted, cnt, oid, version) FROM stdin;
\.


--
-- Data for Name: shkassignmentstable; Type: TABLE DATA; Schema: public; Owner: -
--

COPY shkassignmentstable (activity, theresource, activityid, activityprocessid, activityprocessdefname, resourceid, isaccepted, isvalid, cnt, oid, version) FROM stdin;
\.


--
-- Data for Name: shkcounters; Type: TABLE DATA; Schema: public; Owner: -
--

COPY shkcounters (name, the_number, oid, version) FROM stdin;
\.


--
-- Data for Name: shkcreateprocesseventaudits; Type: TABLE DATA; Schema: public; Owner: -
--

COPY shkcreateprocesseventaudits (recordedtime, recordedtimetzo, theusername, thetype, processid, processname, processfactoryname, processfactoryversion, processdefinitionid, processdefinitionname, packageid, pactivityid, pprocessid, pprocessname, pprocessfactoryname, pprocessfactoryversion, pactivitydefinitionid, pactivitydefinitionname, pprocessdefinitionid, pprocessdefinitionname, ppackageid, cnt, oid, version) FROM stdin;
\.


--
-- Data for Name: shkdataeventaudits; Type: TABLE DATA; Schema: public; Owner: -
--

COPY shkdataeventaudits (recordedtime, recordedtimetzo, theusername, thetype, activityid, activityname, processid, processname, processfactoryname, processfactoryversion, activitydefinitionid, activitydefinitionname, activitydefinitiontype, processdefinitionid, processdefinitionname, packageid, cnt, oid, version) FROM stdin;
\.


--
-- Data for Name: shkdeadlines; Type: TABLE DATA; Schema: public; Owner: -
--

COPY shkdeadlines (process, activity, cnt, timelimit, timelimittzo, exceptionname, issynchronous, isexecuted, oid, version) FROM stdin;
\.


--
-- Data for Name: shkeventtypes; Type: TABLE DATA; Schema: public; Owner: -
--

COPY shkeventtypes (keyvalue, name, oid, version) FROM stdin;
\.


--
-- Data for Name: shkgroupgrouptable; Type: TABLE DATA; Schema: public; Owner: -
--

COPY shkgroupgrouptable (sub_gid, groupid, oid, version) FROM stdin;
\.


--
-- Data for Name: shkgrouptable; Type: TABLE DATA; Schema: public; Owner: -
--

COPY shkgrouptable (groupid, description, oid, version) FROM stdin;
\.


--
-- Data for Name: shkgroupuser; Type: TABLE DATA; Schema: public; Owner: -
--

COPY shkgroupuser (username, oid, version) FROM stdin;
\.


--
-- Data for Name: shkgroupuserpacklevelpart; Type: TABLE DATA; Schema: public; Owner: -
--

COPY shkgroupuserpacklevelpart (participantoid, useroid, oid, version) FROM stdin;
\.


--
-- Data for Name: shkgroupuserproclevelpart; Type: TABLE DATA; Schema: public; Owner: -
--

COPY shkgroupuserproclevelpart (participantoid, useroid, oid, version) FROM stdin;
\.


--
-- Data for Name: shkneweventauditdata; Type: TABLE DATA; Schema: public; Owner: -
--

COPY shkneweventauditdata (dataeventaudit, variabledefinitionid, variabletype, variablevalue, variablevaluexml, variablevaluevchar, variablevaluedbl, variablevaluelong, variablevaluedate, variablevaluebool, ordno, cnt, oid, version) FROM stdin;
\.


--
-- Data for Name: shkneweventauditdatablobs; Type: TABLE DATA; Schema: public; Owner: -
--

COPY shkneweventauditdatablobs (neweventauditdatawob, variablevalue, ordno, oid, version) FROM stdin;
\.


--
-- Data for Name: shkneweventauditdatawob; Type: TABLE DATA; Schema: public; Owner: -
--

COPY shkneweventauditdatawob (dataeventaudit, variabledefinitionid, variabletype, variablevaluexml, variablevaluevchar, variablevaluedbl, variablevaluelong, variablevaluedate, variablevaluebool, ordno, cnt, oid, version) FROM stdin;
\.


--
-- Data for Name: shknextxpdlversions; Type: TABLE DATA; Schema: public; Owner: -
--

COPY shknextxpdlversions (xpdlid, nextversion, oid, version) FROM stdin;
\.


--
-- Data for Name: shknormaluser; Type: TABLE DATA; Schema: public; Owner: -
--

COPY shknormaluser (username, oid, version) FROM stdin;
\.


--
-- Data for Name: shkoldeventauditdata; Type: TABLE DATA; Schema: public; Owner: -
--

COPY shkoldeventauditdata (dataeventaudit, variabledefinitionid, variabletype, variablevalue, variablevaluexml, variablevaluevchar, variablevaluedbl, variablevaluelong, variablevaluedate, variablevaluebool, ordno, cnt, oid, version) FROM stdin;
\.


--
-- Data for Name: shkoldeventauditdatablobs; Type: TABLE DATA; Schema: public; Owner: -
--

COPY shkoldeventauditdatablobs (oldeventauditdatawob, variablevalue, ordno, oid, version) FROM stdin;
\.


--
-- Data for Name: shkoldeventauditdatawob; Type: TABLE DATA; Schema: public; Owner: -
--

COPY shkoldeventauditdatawob (dataeventaudit, variabledefinitionid, variabletype, variablevaluexml, variablevaluevchar, variablevaluedbl, variablevaluelong, variablevaluedate, variablevaluebool, ordno, cnt, oid, version) FROM stdin;
\.


--
-- Data for Name: shkpacklevelparticipant; Type: TABLE DATA; Schema: public; Owner: -
--

COPY shkpacklevelparticipant (participant_id, packageoid, oid, version) FROM stdin;
\.


--
-- Data for Name: shkpacklevelxpdlapp; Type: TABLE DATA; Schema: public; Owner: -
--

COPY shkpacklevelxpdlapp (application_id, packageoid, oid, version) FROM stdin;
\.


--
-- Data for Name: shkpacklevelxpdlapptaappdetail; Type: TABLE DATA; Schema: public; Owner: -
--

COPY shkpacklevelxpdlapptaappdetail (xpdl_appoid, toolagentoid, oid, version) FROM stdin;
\.


--
-- Data for Name: shkpacklevelxpdlapptaappdetusr; Type: TABLE DATA; Schema: public; Owner: -
--

COPY shkpacklevelxpdlapptaappdetusr (xpdl_appoid, toolagentoid, oid, version) FROM stdin;
\.


--
-- Data for Name: shkpacklevelxpdlapptaappuser; Type: TABLE DATA; Schema: public; Owner: -
--

COPY shkpacklevelxpdlapptaappuser (xpdl_appoid, toolagentoid, oid, version) FROM stdin;
\.


--
-- Data for Name: shkpacklevelxpdlapptoolagntapp; Type: TABLE DATA; Schema: public; Owner: -
--

COPY shkpacklevelxpdlapptoolagntapp (xpdl_appoid, toolagentoid, oid, version) FROM stdin;
\.


--
-- Data for Name: shkprocessdata; Type: TABLE DATA; Schema: public; Owner: -
--

COPY shkprocessdata (process, variabledefinitionid, variabletype, variablevalue, variablevaluexml, variablevaluevchar, variablevaluedbl, variablevaluelong, variablevaluedate, variablevaluebool, ordno, cnt, oid, version) FROM stdin;
\.


--
-- Data for Name: shkprocessdatablobs; Type: TABLE DATA; Schema: public; Owner: -
--

COPY shkprocessdatablobs (processdatawob, variablevalue, ordno, oid, version) FROM stdin;
\.


--
-- Data for Name: shkprocessdatawob; Type: TABLE DATA; Schema: public; Owner: -
--

COPY shkprocessdatawob (process, variabledefinitionid, variabletype, variablevaluexml, variablevaluevchar, variablevaluedbl, variablevaluelong, variablevaluedate, variablevaluebool, ordno, cnt, oid, version) FROM stdin;
\.


--
-- Data for Name: shkprocessdefinitions; Type: TABLE DATA; Schema: public; Owner: -
--

COPY shkprocessdefinitions (name, packageid, processdefinitionid, processdefinitioncreated, processdefinitionversion, state, oid, version) FROM stdin;
\.


--
-- Data for Name: shkprocesses; Type: TABLE DATA; Schema: public; Owner: -
--

COPY shkprocesses (syncversion, id, processdefinition, pdefname, activityrequesterid, activityrequesterprocessid, resourcerequesterid, externalrequesterclassname, state, priority, name, created, createdtzo, started, startedtzo, laststatetime, laststatetimetzo, limittime, limittimetzo, description, oid, version) FROM stdin;
\.


--
-- Data for Name: shkprocessrequesters; Type: TABLE DATA; Schema: public; Owner: -
--

COPY shkprocessrequesters (id, activityrequester, resourcerequester, oid, version) FROM stdin;
\.


--
-- Data for Name: shkprocessstateeventaudits; Type: TABLE DATA; Schema: public; Owner: -
--

COPY shkprocessstateeventaudits (keyvalue, name, oid, version) FROM stdin;
\.


--
-- Data for Name: shkprocessstates; Type: TABLE DATA; Schema: public; Owner: -
--

COPY shkprocessstates (keyvalue, name, oid, version) FROM stdin;
open.running	open.running	1000000	0
open.not_running.not_started	open.not_running.not_started	1000002	0
open.not_running.suspended	open.not_running.suspended	1000004	0
closed.completed	closed.completed	1000006	0
closed.terminated	closed.terminated	1000008	0
closed.aborted	closed.aborted	1000010	0
\.


--
-- Data for Name: shkproclevelparticipant; Type: TABLE DATA; Schema: public; Owner: -
--

COPY shkproclevelparticipant (participant_id, processoid, oid, version) FROM stdin;
\.


--
-- Data for Name: shkproclevelxpdlapp; Type: TABLE DATA; Schema: public; Owner: -
--

COPY shkproclevelxpdlapp (application_id, processoid, oid, version) FROM stdin;
\.


--
-- Data for Name: shkproclevelxpdlapptaappdetail; Type: TABLE DATA; Schema: public; Owner: -
--

COPY shkproclevelxpdlapptaappdetail (xpdl_appoid, toolagentoid, oid, version) FROM stdin;
\.


--
-- Data for Name: shkproclevelxpdlapptaappdetusr; Type: TABLE DATA; Schema: public; Owner: -
--

COPY shkproclevelxpdlapptaappdetusr (xpdl_appoid, toolagentoid, oid, version) FROM stdin;
\.


--
-- Data for Name: shkproclevelxpdlapptaappuser; Type: TABLE DATA; Schema: public; Owner: -
--

COPY shkproclevelxpdlapptaappuser (xpdl_appoid, toolagentoid, oid, version) FROM stdin;
\.


--
-- Data for Name: shkproclevelxpdlapptoolagntapp; Type: TABLE DATA; Schema: public; Owner: -
--

COPY shkproclevelxpdlapptoolagntapp (xpdl_appoid, toolagentoid, oid, version) FROM stdin;
\.


--
-- Data for Name: shkresourcestable; Type: TABLE DATA; Schema: public; Owner: -
--

COPY shkresourcestable (username, name, oid, version) FROM stdin;
\.


--
-- Data for Name: shkstateeventaudits; Type: TABLE DATA; Schema: public; Owner: -
--

COPY shkstateeventaudits (recordedtime, recordedtimetzo, theusername, thetype, activityid, activityname, processid, processname, processfactoryname, processfactoryversion, activitydefinitionid, activitydefinitionname, activitydefinitiontype, processdefinitionid, processdefinitionname, packageid, oldprocessstate, newprocessstate, oldactivitystate, newactivitystate, cnt, oid, version) FROM stdin;
\.


--
-- Data for Name: shktoolagentapp; Type: TABLE DATA; Schema: public; Owner: -
--

COPY shktoolagentapp (tool_agent_name, app_name, oid, version) FROM stdin;
\.


--
-- Data for Name: shktoolagentappdetail; Type: TABLE DATA; Schema: public; Owner: -
--

COPY shktoolagentappdetail (app_mode, toolagent_appoid, oid, version) FROM stdin;
\.


--
-- Data for Name: shktoolagentappdetailuser; Type: TABLE DATA; Schema: public; Owner: -
--

COPY shktoolagentappdetailuser (toolagent_appoid, useroid, oid, version) FROM stdin;
\.


--
-- Data for Name: shktoolagentappuser; Type: TABLE DATA; Schema: public; Owner: -
--

COPY shktoolagentappuser (toolagent_appoid, useroid, oid, version) FROM stdin;
\.


--
-- Data for Name: shkusergrouptable; Type: TABLE DATA; Schema: public; Owner: -
--

COPY shkusergrouptable (userid, groupid, oid, version) FROM stdin;
\.


--
-- Data for Name: shkuserpacklevelpart; Type: TABLE DATA; Schema: public; Owner: -
--

COPY shkuserpacklevelpart (participantoid, useroid, oid, version) FROM stdin;
\.


--
-- Data for Name: shkuserproclevelparticipant; Type: TABLE DATA; Schema: public; Owner: -
--

COPY shkuserproclevelparticipant (participantoid, useroid, oid, version) FROM stdin;
\.


--
-- Data for Name: shkxpdlapplicationpackage; Type: TABLE DATA; Schema: public; Owner: -
--

COPY shkxpdlapplicationpackage (package_id, oid, version) FROM stdin;
\.


--
-- Data for Name: shkxpdlapplicationprocess; Type: TABLE DATA; Schema: public; Owner: -
--

COPY shkxpdlapplicationprocess (process_id, packageoid, oid, version) FROM stdin;
\.


--
-- Data for Name: shkxpdldata; Type: TABLE DATA; Schema: public; Owner: -
--

COPY shkxpdldata (xpdlcontent, xpdlclasscontent, xpdl, cnt, oid, version) FROM stdin;
\.


--
-- Data for Name: shkxpdlhistory; Type: TABLE DATA; Schema: public; Owner: -
--

COPY shkxpdlhistory (xpdlid, xpdlversion, xpdlclassversion, xpdluploadtime, xpdlhistoryuploadtime, oid, version) FROM stdin;
\.


--
-- Data for Name: shkxpdlhistorydata; Type: TABLE DATA; Schema: public; Owner: -
--

COPY shkxpdlhistorydata (xpdlcontent, xpdlclasscontent, xpdlhistory, cnt, oid, version) FROM stdin;
\.


--
-- Data for Name: shkxpdlparticipantpackage; Type: TABLE DATA; Schema: public; Owner: -
--

COPY shkxpdlparticipantpackage (package_id, oid, version) FROM stdin;
\.


--
-- Data for Name: shkxpdlparticipantprocess; Type: TABLE DATA; Schema: public; Owner: -
--

COPY shkxpdlparticipantprocess (process_id, packageoid, oid, version) FROM stdin;
\.


--
-- Data for Name: shkxpdlreferences; Type: TABLE DATA; Schema: public; Owner: -
--

COPY shkxpdlreferences (referredxpdlid, referringxpdl, referredxpdlnumber, oid, version) FROM stdin;
\.


--
-- Data for Name: shkxpdls; Type: TABLE DATA; Schema: public; Owner: -
--

COPY shkxpdls (xpdlid, xpdlversion, xpdlclassversion, xpdluploadtime, oid, version) FROM stdin;
\.


--
-- Data for Name: wf_audit_trail; Type: TABLE DATA; Schema: public; Owner: -
--

COPY wf_audit_trail (id, username, clazz, method, message, "timestamp", appid, appversion) FROM stdin;
ff808081618d9a3f01618d9b1c3d0000	roleAnonymous	org.joget.apps.app.dao.AppDefinitionDaoImpl	saveOrUpdate	{id=appcenter, version=1, published=false}	2018-02-13 05:20:08.252+00	\N	\N
ff808081618d9a3f01618d9b1c4c0001	roleAnonymous	org.joget.apps.app.dao.FormDefinitionDaoImpl	add	{id=landing, appId=appcenter, appVersion=1}	2018-02-13 05:20:08.267+00	\N	\N
ff808081618d9a3f01618d9b1e620002	roleAnonymous	org.joget.apps.app.dao.UserviewDefinitionDaoImpl	add	{id=v, appId=appcenter, appVersion=1}	2018-02-13 05:20:08.802+00	\N	\N
ff808081618d9a3f01618d9b1e6f0003	roleAnonymous	org.joget.apps.app.dao.MessageDaoImpl	add	{id=<i class='fa fa-home'></i> Home_zh_CN, appId=appcenter, appVersion=1}	2018-02-13 05:20:08.815+00	\N	\N
ff808081618d9a3f01618d9b1e7a0004	roleAnonymous	org.joget.apps.app.dao.MessageDaoImpl	add	{id=<i class='fa fa-home'></i> Home_zh_TW, appId=appcenter, appVersion=1}	2018-02-13 05:20:08.825+00	\N	\N
ff808081618d9a3f01618d9b1e820005	roleAnonymous	org.joget.apps.app.dao.MessageDaoImpl	add	{id=App Center_zh_CN, appId=appcenter, appVersion=1}	2018-02-13 05:20:08.834+00	\N	\N
ff808081618d9a3f01618d9b1e8a0006	roleAnonymous	org.joget.apps.app.dao.MessageDaoImpl	add	{id=App Center_zh_TW, appId=appcenter, appVersion=1}	2018-02-13 05:20:08.841+00	\N	\N
ff808081618d9a3f01618d9b1e920007	roleAnonymous	org.joget.apps.app.dao.MessageDaoImpl	add	{id=Design New App_zh_CN, appId=appcenter, appVersion=1}	2018-02-13 05:20:08.849+00	\N	\N
ff808081618d9a3f01618d9b1e990008	roleAnonymous	org.joget.apps.app.dao.MessageDaoImpl	add	{id=Design New App_zh_TW, appId=appcenter, appVersion=1}	2018-02-13 05:20:08.857+00	\N	\N
ff808081618d9a3f01618d9b1ea10009	roleAnonymous	org.joget.apps.app.dao.MessageDaoImpl	add	{id=Download from Marketplace_zh_CN, appId=appcenter, appVersion=1}	2018-02-13 05:20:08.865+00	\N	\N
ff808081618d9a3f01618d9b1ea7000a	roleAnonymous	org.joget.apps.app.dao.MessageDaoImpl	add	{id=Download from Marketplace_zh_TW, appId=appcenter, appVersion=1}	2018-02-13 05:20:08.871+00	\N	\N
ff808081618d9a3f01618d9b1ead000b	roleAnonymous	org.joget.apps.app.dao.MessageDaoImpl	add	{id=Import App_zh_CN, appId=appcenter, appVersion=1}	2018-02-13 05:20:08.877+00	\N	\N
ff808081618d9a3f01618d9b1eb4000c	roleAnonymous	org.joget.apps.app.dao.MessageDaoImpl	add	{id=Import App_zh_TW, appId=appcenter, appVersion=1}	2018-02-13 05:20:08.884+00	\N	\N
ff808081618d9a3f01618d9b1ebb000d	roleAnonymous	org.joget.apps.app.dao.MessageDaoImpl	add	{id=Powered by Joget_zh_CN, appId=appcenter, appVersion=1}	2018-02-13 05:20:08.891+00	\N	\N
ff808081618d9a3f01618d9b1ec1000e	roleAnonymous	org.joget.apps.app.dao.MessageDaoImpl	add	{id=Powered by Joget_zh_TW, appId=appcenter, appVersion=1}	2018-02-13 05:20:08.897+00	\N	\N
ff808081618d9a3f01618d9b1ec8000f	roleAnonymous	org.joget.apps.app.dao.MessageDaoImpl	add	{id=Published Apps_zh_CN, appId=appcenter, appVersion=1}	2018-02-13 05:20:08.903+00	\N	\N
ff808081618d9a3f01618d9b1ece0010	roleAnonymous	org.joget.apps.app.dao.MessageDaoImpl	add	{id=Published Apps_zh_TW, appId=appcenter, appVersion=1}	2018-02-13 05:20:08.91+00	\N	\N
ff808081618d9a3f01618d9b1f800011	roleAnonymous	org.joget.apps.app.dao.AppDefinitionDaoImpl	saveOrUpdate	{id=appcenter, version=1, published=true}	2018-02-13 05:20:09.088+00	appcenter	1
\.


--
-- Data for Name: wf_process_link; Type: TABLE DATA; Schema: public; Owner: -
--

COPY wf_process_link (processid, parentprocessid, originprocessid) FROM stdin;
\.


--
-- Data for Name: wf_report; Type: TABLE DATA; Schema: public; Owner: -
--

COPY wf_report (activityinstanceid, processinstanceid, priority, createdtime, startedtime, datelimit, due, delay, finishtime, timeconsumingfromdatecreated, timeconsumingfromdatestarted, performer, nameofaccepteduser, status, state, packageid, processdefid, activitydefid, assignmentusers, appid, appversion) FROM stdin;
\.


--
-- Data for Name: wf_report_activity; Type: TABLE DATA; Schema: public; Owner: -
--

COPY wf_report_activity (activitydefid, activityname, description, priority) FROM stdin;
\.


--
-- Data for Name: wf_report_package; Type: TABLE DATA; Schema: public; Owner: -
--

COPY wf_report_package (packageid, packagename) FROM stdin;
\.


--
-- Data for Name: wf_report_process; Type: TABLE DATA; Schema: public; Owner: -
--

COPY wf_report_process (processdefid, processname, version) FROM stdin;
\.


--
-- Data for Name: wf_resource_bundle_message; Type: TABLE DATA; Schema: public; Owner: -
--

COPY wf_resource_bundle_message (id, messagekey, locale, message) FROM stdin;
\.


--
-- Data for Name: wf_setup; Type: TABLE DATA; Schema: public; Owner: -
--

COPY wf_setup (id, property, value, ordering) FROM stdin;
ff808081618d9a3f01618d9b2b180012	defaultUserview	appcenter/v	\N
\.


--
-- Name: app_app_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY app_app
    ADD CONSTRAINT app_app_pkey PRIMARY KEY (appid, appversion);


--
-- Name: app_datalist_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY app_datalist
    ADD CONSTRAINT app_datalist_pkey PRIMARY KEY (appid, appversion, id);


--
-- Name: app_env_variable_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY app_env_variable
    ADD CONSTRAINT app_env_variable_pkey PRIMARY KEY (appid, appversion, id);


--
-- Name: app_fd_appcenter_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY app_fd_appcenter
    ADD CONSTRAINT app_fd_appcenter_pkey PRIMARY KEY (id);


--
-- Name: app_fd_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY app_fd
    ADD CONSTRAINT app_fd_pkey PRIMARY KEY (id);


--
-- Name: app_form_data_audit_trail_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY app_form_data_audit_trail
    ADD CONSTRAINT app_form_data_audit_trail_pkey PRIMARY KEY (id);


--
-- Name: app_form_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY app_form
    ADD CONSTRAINT app_form_pkey PRIMARY KEY (appid, appversion, formid);


--
-- Name: app_message_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY app_message
    ADD CONSTRAINT app_message_pkey PRIMARY KEY (appid, appversion, ouid);


--
-- Name: app_package_activity_form_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY app_package_activity_form
    ADD CONSTRAINT app_package_activity_form_pkey PRIMARY KEY (processdefid, activitydefid, packageid, packageversion);


--
-- Name: app_package_activity_plugin_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY app_package_activity_plugin
    ADD CONSTRAINT app_package_activity_plugin_pkey PRIMARY KEY (processdefid, activitydefid, packageid, packageversion);


--
-- Name: app_package_participant_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY app_package_participant
    ADD CONSTRAINT app_package_participant_pkey PRIMARY KEY (processdefid, participantid, packageid, packageversion);


--
-- Name: app_package_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY app_package
    ADD CONSTRAINT app_package_pkey PRIMARY KEY (packageid, packageversion);


--
-- Name: app_plugin_default_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY app_plugin_default
    ADD CONSTRAINT app_plugin_default_pkey PRIMARY KEY (appid, appversion, id);


--
-- Name: app_report_activity_instance_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY app_report_activity_instance
    ADD CONSTRAINT app_report_activity_instance_pkey PRIMARY KEY (instanceid);


--
-- Name: app_report_activity_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY app_report_activity
    ADD CONSTRAINT app_report_activity_pkey PRIMARY KEY (uuid);


--
-- Name: app_report_app_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY app_report_app
    ADD CONSTRAINT app_report_app_pkey PRIMARY KEY (uuid);


--
-- Name: app_report_package_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY app_report_package
    ADD CONSTRAINT app_report_package_pkey PRIMARY KEY (uuid);


--
-- Name: app_report_process_instance_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY app_report_process_instance
    ADD CONSTRAINT app_report_process_instance_pkey PRIMARY KEY (instanceid);


--
-- Name: app_report_process_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY app_report_process
    ADD CONSTRAINT app_report_process_pkey PRIMARY KEY (uuid);


--
-- Name: app_resource_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY app_resource
    ADD CONSTRAINT app_resource_pkey PRIMARY KEY (appid, appversion, id);


--
-- Name: app_userview_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY app_userview
    ADD CONSTRAINT app_userview_pkey PRIMARY KEY (appid, appversion, id);


--
-- Name: dir_department_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY dir_department
    ADD CONSTRAINT dir_department_pkey PRIMARY KEY (id);


--
-- Name: dir_employment_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY dir_employment
    ADD CONSTRAINT dir_employment_pkey PRIMARY KEY (id);


--
-- Name: dir_employment_report_to_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY dir_employment_report_to
    ADD CONSTRAINT dir_employment_report_to_pkey PRIMARY KEY (employmentid, reporttoid);


--
-- Name: dir_grade_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY dir_grade
    ADD CONSTRAINT dir_grade_pkey PRIMARY KEY (id);


--
-- Name: dir_group_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY dir_group
    ADD CONSTRAINT dir_group_pkey PRIMARY KEY (id);


--
-- Name: dir_organization_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY dir_organization
    ADD CONSTRAINT dir_organization_pkey PRIMARY KEY (id);


--
-- Name: dir_role_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY dir_role
    ADD CONSTRAINT dir_role_pkey PRIMARY KEY (id);


--
-- Name: dir_user_group_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY dir_user_group
    ADD CONSTRAINT dir_user_group_pkey PRIMARY KEY (userid, groupid);


--
-- Name: dir_user_meta_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY dir_user_meta
    ADD CONSTRAINT dir_user_meta_pkey PRIMARY KEY (username, meta_key);


--
-- Name: dir_user_replacement_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY dir_user_replacement
    ADD CONSTRAINT dir_user_replacement_pkey PRIMARY KEY (id);


--
-- Name: dir_user_role_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY dir_user_role
    ADD CONSTRAINT dir_user_role_pkey PRIMARY KEY (userid, roleid);


--
-- Name: objectid_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY objectid
    ADD CONSTRAINT objectid_pkey PRIMARY KEY (nextoid);


--
-- Name: shkactivities_id_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkactivities
    ADD CONSTRAINT shkactivities_id_key UNIQUE (id);


--
-- Name: shkactivities_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkactivities
    ADD CONSTRAINT shkactivities_pkey PRIMARY KEY (oid);


--
-- Name: shkactivitydata_activity_variabledefinitionid_ordno_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkactivitydata
    ADD CONSTRAINT shkactivitydata_activity_variabledefinitionid_ordno_key UNIQUE (activity, variabledefinitionid, ordno);


--
-- Name: shkactivitydata_cnt_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkactivitydata
    ADD CONSTRAINT shkactivitydata_cnt_key UNIQUE (cnt);


--
-- Name: shkactivitydata_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkactivitydata
    ADD CONSTRAINT shkactivitydata_pkey PRIMARY KEY (oid);


--
-- Name: shkactivitydatablobs_activitydatawob_ordno_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkactivitydatablobs
    ADD CONSTRAINT shkactivitydatablobs_activitydatawob_ordno_key UNIQUE (activitydatawob, ordno);


--
-- Name: shkactivitydatablobs_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkactivitydatablobs
    ADD CONSTRAINT shkactivitydatablobs_pkey PRIMARY KEY (oid);


--
-- Name: shkactivitydatawob_activity_variabledefinitionid_ordno_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkactivitydatawob
    ADD CONSTRAINT shkactivitydatawob_activity_variabledefinitionid_ordno_key UNIQUE (activity, variabledefinitionid, ordno);


--
-- Name: shkactivitydatawob_cnt_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkactivitydatawob
    ADD CONSTRAINT shkactivitydatawob_cnt_key UNIQUE (cnt);


--
-- Name: shkactivitydatawob_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkactivitydatawob
    ADD CONSTRAINT shkactivitydatawob_pkey PRIMARY KEY (oid);


--
-- Name: shkactivitystateeventaudits_keyvalue_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkactivitystateeventaudits
    ADD CONSTRAINT shkactivitystateeventaudits_keyvalue_key UNIQUE (keyvalue);


--
-- Name: shkactivitystateeventaudits_name_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkactivitystateeventaudits
    ADD CONSTRAINT shkactivitystateeventaudits_name_key UNIQUE (name);


--
-- Name: shkactivitystateeventaudits_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkactivitystateeventaudits
    ADD CONSTRAINT shkactivitystateeventaudits_pkey PRIMARY KEY (oid);


--
-- Name: shkactivitystates_keyvalue_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkactivitystates
    ADD CONSTRAINT shkactivitystates_keyvalue_key UNIQUE (keyvalue);


--
-- Name: shkactivitystates_name_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkactivitystates
    ADD CONSTRAINT shkactivitystates_name_key UNIQUE (name);


--
-- Name: shkactivitystates_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkactivitystates
    ADD CONSTRAINT shkactivitystates_pkey PRIMARY KEY (oid);


--
-- Name: shkandjointable_cnt_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkandjointable
    ADD CONSTRAINT shkandjointable_cnt_key UNIQUE (cnt);


--
-- Name: shkandjointable_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkandjointable
    ADD CONSTRAINT shkandjointable_pkey PRIMARY KEY (oid);


--
-- Name: shkassignmenteventaudits_cnt_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkassignmenteventaudits
    ADD CONSTRAINT shkassignmenteventaudits_cnt_key UNIQUE (cnt);


--
-- Name: shkassignmenteventaudits_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkassignmenteventaudits
    ADD CONSTRAINT shkassignmenteventaudits_pkey PRIMARY KEY (oid);


--
-- Name: shkassignmentstable_activity_theresource_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkassignmentstable
    ADD CONSTRAINT shkassignmentstable_activity_theresource_key UNIQUE (activity, theresource);


--
-- Name: shkassignmentstable_cnt_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkassignmentstable
    ADD CONSTRAINT shkassignmentstable_cnt_key UNIQUE (cnt);


--
-- Name: shkassignmentstable_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkassignmentstable
    ADD CONSTRAINT shkassignmentstable_pkey PRIMARY KEY (oid);


--
-- Name: shkcounters_name_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkcounters
    ADD CONSTRAINT shkcounters_name_key UNIQUE (name);


--
-- Name: shkcounters_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkcounters
    ADD CONSTRAINT shkcounters_pkey PRIMARY KEY (oid);


--
-- Name: shkcreateprocesseventaudits_cnt_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkcreateprocesseventaudits
    ADD CONSTRAINT shkcreateprocesseventaudits_cnt_key UNIQUE (cnt);


--
-- Name: shkcreateprocesseventaudits_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkcreateprocesseventaudits
    ADD CONSTRAINT shkcreateprocesseventaudits_pkey PRIMARY KEY (oid);


--
-- Name: shkdataeventaudits_cnt_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkdataeventaudits
    ADD CONSTRAINT shkdataeventaudits_cnt_key UNIQUE (cnt);


--
-- Name: shkdataeventaudits_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkdataeventaudits
    ADD CONSTRAINT shkdataeventaudits_pkey PRIMARY KEY (oid);


--
-- Name: shkdeadlines_cnt_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkdeadlines
    ADD CONSTRAINT shkdeadlines_cnt_key UNIQUE (cnt);


--
-- Name: shkdeadlines_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkdeadlines
    ADD CONSTRAINT shkdeadlines_pkey PRIMARY KEY (oid);


--
-- Name: shkeventtypes_keyvalue_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkeventtypes
    ADD CONSTRAINT shkeventtypes_keyvalue_key UNIQUE (keyvalue);


--
-- Name: shkeventtypes_name_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkeventtypes
    ADD CONSTRAINT shkeventtypes_name_key UNIQUE (name);


--
-- Name: shkeventtypes_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkeventtypes
    ADD CONSTRAINT shkeventtypes_pkey PRIMARY KEY (oid);


--
-- Name: shkgroupgrouptable_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkgroupgrouptable
    ADD CONSTRAINT shkgroupgrouptable_pkey PRIMARY KEY (oid);


--
-- Name: shkgroupgrouptable_sub_gid_groupid_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkgroupgrouptable
    ADD CONSTRAINT shkgroupgrouptable_sub_gid_groupid_key UNIQUE (sub_gid, groupid);


--
-- Name: shkgrouptable_groupid_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkgrouptable
    ADD CONSTRAINT shkgrouptable_groupid_key UNIQUE (groupid);


--
-- Name: shkgrouptable_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkgrouptable
    ADD CONSTRAINT shkgrouptable_pkey PRIMARY KEY (oid);


--
-- Name: shkgroupuser_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkgroupuser
    ADD CONSTRAINT shkgroupuser_pkey PRIMARY KEY (oid);


--
-- Name: shkgroupuser_username_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkgroupuser
    ADD CONSTRAINT shkgroupuser_username_key UNIQUE (username);


--
-- Name: shkgroupuserpacklevelpart_participantoid_useroid_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkgroupuserpacklevelpart
    ADD CONSTRAINT shkgroupuserpacklevelpart_participantoid_useroid_key UNIQUE (participantoid, useroid);


--
-- Name: shkgroupuserpacklevelpart_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkgroupuserpacklevelpart
    ADD CONSTRAINT shkgroupuserpacklevelpart_pkey PRIMARY KEY (oid);


--
-- Name: shkgroupuserproclevelpart_participantoid_useroid_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkgroupuserproclevelpart
    ADD CONSTRAINT shkgroupuserproclevelpart_participantoid_useroid_key UNIQUE (participantoid, useroid);


--
-- Name: shkgroupuserproclevelpart_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkgroupuserproclevelpart
    ADD CONSTRAINT shkgroupuserproclevelpart_pkey PRIMARY KEY (oid);


--
-- Name: shkneweventauditdata_cnt_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkneweventauditdata
    ADD CONSTRAINT shkneweventauditdata_cnt_key UNIQUE (cnt);


--
-- Name: shkneweventauditdata_dataeventaudit_variabledefinitionid_or_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkneweventauditdata
    ADD CONSTRAINT shkneweventauditdata_dataeventaudit_variabledefinitionid_or_key UNIQUE (dataeventaudit, variabledefinitionid, ordno);


--
-- Name: shkneweventauditdata_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkneweventauditdata
    ADD CONSTRAINT shkneweventauditdata_pkey PRIMARY KEY (oid);


--
-- Name: shkneweventauditdatablobs_neweventauditdatawob_ordno_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkneweventauditdatablobs
    ADD CONSTRAINT shkneweventauditdatablobs_neweventauditdatawob_ordno_key UNIQUE (neweventauditdatawob, ordno);


--
-- Name: shkneweventauditdatablobs_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkneweventauditdatablobs
    ADD CONSTRAINT shkneweventauditdatablobs_pkey PRIMARY KEY (oid);


--
-- Name: shkneweventauditdatawob_cnt_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkneweventauditdatawob
    ADD CONSTRAINT shkneweventauditdatawob_cnt_key UNIQUE (cnt);


--
-- Name: shkneweventauditdatawob_dataeventaudit_variabledefinitionid_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkneweventauditdatawob
    ADD CONSTRAINT shkneweventauditdatawob_dataeventaudit_variabledefinitionid_key UNIQUE (dataeventaudit, variabledefinitionid, ordno);


--
-- Name: shkneweventauditdatawob_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkneweventauditdatawob
    ADD CONSTRAINT shkneweventauditdatawob_pkey PRIMARY KEY (oid);


--
-- Name: shknextxpdlversions_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shknextxpdlversions
    ADD CONSTRAINT shknextxpdlversions_pkey PRIMARY KEY (oid);


--
-- Name: shknextxpdlversions_xpdlid_nextversion_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shknextxpdlversions
    ADD CONSTRAINT shknextxpdlversions_xpdlid_nextversion_key UNIQUE (xpdlid, nextversion);


--
-- Name: shknormaluser_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shknormaluser
    ADD CONSTRAINT shknormaluser_pkey PRIMARY KEY (oid);


--
-- Name: shknormaluser_username_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shknormaluser
    ADD CONSTRAINT shknormaluser_username_key UNIQUE (username);


--
-- Name: shkoldeventauditdata_cnt_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkoldeventauditdata
    ADD CONSTRAINT shkoldeventauditdata_cnt_key UNIQUE (cnt);


--
-- Name: shkoldeventauditdata_dataeventaudit_variabledefinitionid_or_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkoldeventauditdata
    ADD CONSTRAINT shkoldeventauditdata_dataeventaudit_variabledefinitionid_or_key UNIQUE (dataeventaudit, variabledefinitionid, ordno);


--
-- Name: shkoldeventauditdata_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkoldeventauditdata
    ADD CONSTRAINT shkoldeventauditdata_pkey PRIMARY KEY (oid);


--
-- Name: shkoldeventauditdatablobs_oldeventauditdatawob_ordno_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkoldeventauditdatablobs
    ADD CONSTRAINT shkoldeventauditdatablobs_oldeventauditdatawob_ordno_key UNIQUE (oldeventauditdatawob, ordno);


--
-- Name: shkoldeventauditdatablobs_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkoldeventauditdatablobs
    ADD CONSTRAINT shkoldeventauditdatablobs_pkey PRIMARY KEY (oid);


--
-- Name: shkoldeventauditdatawob_cnt_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkoldeventauditdatawob
    ADD CONSTRAINT shkoldeventauditdatawob_cnt_key UNIQUE (cnt);


--
-- Name: shkoldeventauditdatawob_dataeventaudit_variabledefinitionid_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkoldeventauditdatawob
    ADD CONSTRAINT shkoldeventauditdatawob_dataeventaudit_variabledefinitionid_key UNIQUE (dataeventaudit, variabledefinitionid, ordno);


--
-- Name: shkoldeventauditdatawob_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkoldeventauditdatawob
    ADD CONSTRAINT shkoldeventauditdatawob_pkey PRIMARY KEY (oid);


--
-- Name: shkpacklevelparticipant_participant_id_packageoid_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkpacklevelparticipant
    ADD CONSTRAINT shkpacklevelparticipant_participant_id_packageoid_key UNIQUE (participant_id, packageoid);


--
-- Name: shkpacklevelparticipant_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkpacklevelparticipant
    ADD CONSTRAINT shkpacklevelparticipant_pkey PRIMARY KEY (oid);


--
-- Name: shkpacklevelxpdlapp_application_id_packageoid_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkpacklevelxpdlapp
    ADD CONSTRAINT shkpacklevelxpdlapp_application_id_packageoid_key UNIQUE (application_id, packageoid);


--
-- Name: shkpacklevelxpdlapp_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkpacklevelxpdlapp
    ADD CONSTRAINT shkpacklevelxpdlapp_pkey PRIMARY KEY (oid);


--
-- Name: shkpacklevelxpdlapptaappdetail_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkpacklevelxpdlapptaappdetail
    ADD CONSTRAINT shkpacklevelxpdlapptaappdetail_pkey PRIMARY KEY (oid);


--
-- Name: shkpacklevelxpdlapptaappdetail_xpdl_appoid_toolagentoid_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkpacklevelxpdlapptaappdetail
    ADD CONSTRAINT shkpacklevelxpdlapptaappdetail_xpdl_appoid_toolagentoid_key UNIQUE (xpdl_appoid, toolagentoid);


--
-- Name: shkpacklevelxpdlapptaappdetusr_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkpacklevelxpdlapptaappdetusr
    ADD CONSTRAINT shkpacklevelxpdlapptaappdetusr_pkey PRIMARY KEY (oid);


--
-- Name: shkpacklevelxpdlapptaappdetusr_xpdl_appoid_toolagentoid_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkpacklevelxpdlapptaappdetusr
    ADD CONSTRAINT shkpacklevelxpdlapptaappdetusr_xpdl_appoid_toolagentoid_key UNIQUE (xpdl_appoid, toolagentoid);


--
-- Name: shkpacklevelxpdlapptaappuser_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkpacklevelxpdlapptaappuser
    ADD CONSTRAINT shkpacklevelxpdlapptaappuser_pkey PRIMARY KEY (oid);


--
-- Name: shkpacklevelxpdlapptaappuser_xpdl_appoid_toolagentoid_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkpacklevelxpdlapptaappuser
    ADD CONSTRAINT shkpacklevelxpdlapptaappuser_xpdl_appoid_toolagentoid_key UNIQUE (xpdl_appoid, toolagentoid);


--
-- Name: shkpacklevelxpdlapptoolagntapp_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkpacklevelxpdlapptoolagntapp
    ADD CONSTRAINT shkpacklevelxpdlapptoolagntapp_pkey PRIMARY KEY (oid);


--
-- Name: shkpacklevelxpdlapptoolagntapp_xpdl_appoid_toolagentoid_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkpacklevelxpdlapptoolagntapp
    ADD CONSTRAINT shkpacklevelxpdlapptoolagntapp_xpdl_appoid_toolagentoid_key UNIQUE (xpdl_appoid, toolagentoid);


--
-- Name: shkprocessdata_cnt_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkprocessdata
    ADD CONSTRAINT shkprocessdata_cnt_key UNIQUE (cnt);


--
-- Name: shkprocessdata_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkprocessdata
    ADD CONSTRAINT shkprocessdata_pkey PRIMARY KEY (oid);


--
-- Name: shkprocessdata_process_variabledefinitionid_ordno_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkprocessdata
    ADD CONSTRAINT shkprocessdata_process_variabledefinitionid_ordno_key UNIQUE (process, variabledefinitionid, ordno);


--
-- Name: shkprocessdatablobs_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkprocessdatablobs
    ADD CONSTRAINT shkprocessdatablobs_pkey PRIMARY KEY (oid);


--
-- Name: shkprocessdatablobs_processdatawob_ordno_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkprocessdatablobs
    ADD CONSTRAINT shkprocessdatablobs_processdatawob_ordno_key UNIQUE (processdatawob, ordno);


--
-- Name: shkprocessdatawob_cnt_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkprocessdatawob
    ADD CONSTRAINT shkprocessdatawob_cnt_key UNIQUE (cnt);


--
-- Name: shkprocessdatawob_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkprocessdatawob
    ADD CONSTRAINT shkprocessdatawob_pkey PRIMARY KEY (oid);


--
-- Name: shkprocessdatawob_process_variabledefinitionid_ordno_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkprocessdatawob
    ADD CONSTRAINT shkprocessdatawob_process_variabledefinitionid_ordno_key UNIQUE (process, variabledefinitionid, ordno);


--
-- Name: shkprocessdefinitions_name_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkprocessdefinitions
    ADD CONSTRAINT shkprocessdefinitions_name_key UNIQUE (name);


--
-- Name: shkprocessdefinitions_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkprocessdefinitions
    ADD CONSTRAINT shkprocessdefinitions_pkey PRIMARY KEY (oid);


--
-- Name: shkprocesses_id_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkprocesses
    ADD CONSTRAINT shkprocesses_id_key UNIQUE (id);


--
-- Name: shkprocesses_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkprocesses
    ADD CONSTRAINT shkprocesses_pkey PRIMARY KEY (oid);


--
-- Name: shkprocessrequesters_id_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkprocessrequesters
    ADD CONSTRAINT shkprocessrequesters_id_key UNIQUE (id);


--
-- Name: shkprocessrequesters_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkprocessrequesters
    ADD CONSTRAINT shkprocessrequesters_pkey PRIMARY KEY (oid);


--
-- Name: shkprocessstateeventaudits_keyvalue_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkprocessstateeventaudits
    ADD CONSTRAINT shkprocessstateeventaudits_keyvalue_key UNIQUE (keyvalue);


--
-- Name: shkprocessstateeventaudits_name_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkprocessstateeventaudits
    ADD CONSTRAINT shkprocessstateeventaudits_name_key UNIQUE (name);


--
-- Name: shkprocessstateeventaudits_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkprocessstateeventaudits
    ADD CONSTRAINT shkprocessstateeventaudits_pkey PRIMARY KEY (oid);


--
-- Name: shkprocessstates_keyvalue_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkprocessstates
    ADD CONSTRAINT shkprocessstates_keyvalue_key UNIQUE (keyvalue);


--
-- Name: shkprocessstates_name_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkprocessstates
    ADD CONSTRAINT shkprocessstates_name_key UNIQUE (name);


--
-- Name: shkprocessstates_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkprocessstates
    ADD CONSTRAINT shkprocessstates_pkey PRIMARY KEY (oid);


--
-- Name: shkproclevelparticipant_participant_id_processoid_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkproclevelparticipant
    ADD CONSTRAINT shkproclevelparticipant_participant_id_processoid_key UNIQUE (participant_id, processoid);


--
-- Name: shkproclevelparticipant_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkproclevelparticipant
    ADD CONSTRAINT shkproclevelparticipant_pkey PRIMARY KEY (oid);


--
-- Name: shkproclevelxpdlapp_application_id_processoid_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkproclevelxpdlapp
    ADD CONSTRAINT shkproclevelxpdlapp_application_id_processoid_key UNIQUE (application_id, processoid);


--
-- Name: shkproclevelxpdlapp_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkproclevelxpdlapp
    ADD CONSTRAINT shkproclevelxpdlapp_pkey PRIMARY KEY (oid);


--
-- Name: shkproclevelxpdlapptaappdetail_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkproclevelxpdlapptaappdetail
    ADD CONSTRAINT shkproclevelxpdlapptaappdetail_pkey PRIMARY KEY (oid);


--
-- Name: shkproclevelxpdlapptaappdetail_xpdl_appoid_toolagentoid_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkproclevelxpdlapptaappdetail
    ADD CONSTRAINT shkproclevelxpdlapptaappdetail_xpdl_appoid_toolagentoid_key UNIQUE (xpdl_appoid, toolagentoid);


--
-- Name: shkproclevelxpdlapptaappdetusr_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkproclevelxpdlapptaappdetusr
    ADD CONSTRAINT shkproclevelxpdlapptaappdetusr_pkey PRIMARY KEY (oid);


--
-- Name: shkproclevelxpdlapptaappdetusr_xpdl_appoid_toolagentoid_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkproclevelxpdlapptaappdetusr
    ADD CONSTRAINT shkproclevelxpdlapptaappdetusr_xpdl_appoid_toolagentoid_key UNIQUE (xpdl_appoid, toolagentoid);


--
-- Name: shkproclevelxpdlapptaappuser_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkproclevelxpdlapptaappuser
    ADD CONSTRAINT shkproclevelxpdlapptaappuser_pkey PRIMARY KEY (oid);


--
-- Name: shkproclevelxpdlapptaappuser_xpdl_appoid_toolagentoid_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkproclevelxpdlapptaappuser
    ADD CONSTRAINT shkproclevelxpdlapptaappuser_xpdl_appoid_toolagentoid_key UNIQUE (xpdl_appoid, toolagentoid);


--
-- Name: shkproclevelxpdlapptoolagntapp_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkproclevelxpdlapptoolagntapp
    ADD CONSTRAINT shkproclevelxpdlapptoolagntapp_pkey PRIMARY KEY (oid);


--
-- Name: shkproclevelxpdlapptoolagntapp_xpdl_appoid_toolagentoid_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkproclevelxpdlapptoolagntapp
    ADD CONSTRAINT shkproclevelxpdlapptoolagntapp_xpdl_appoid_toolagentoid_key UNIQUE (xpdl_appoid, toolagentoid);


--
-- Name: shkresourcestable_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkresourcestable
    ADD CONSTRAINT shkresourcestable_pkey PRIMARY KEY (oid);


--
-- Name: shkresourcestable_username_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkresourcestable
    ADD CONSTRAINT shkresourcestable_username_key UNIQUE (username);


--
-- Name: shkstateeventaudits_cnt_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkstateeventaudits
    ADD CONSTRAINT shkstateeventaudits_cnt_key UNIQUE (cnt);


--
-- Name: shkstateeventaudits_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkstateeventaudits
    ADD CONSTRAINT shkstateeventaudits_pkey PRIMARY KEY (oid);


--
-- Name: shktoolagentapp_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shktoolagentapp
    ADD CONSTRAINT shktoolagentapp_pkey PRIMARY KEY (oid);


--
-- Name: shktoolagentapp_tool_agent_name_app_name_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shktoolagentapp
    ADD CONSTRAINT shktoolagentapp_tool_agent_name_app_name_key UNIQUE (tool_agent_name, app_name);


--
-- Name: shktoolagentappdetail_app_mode_toolagent_appoid_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shktoolagentappdetail
    ADD CONSTRAINT shktoolagentappdetail_app_mode_toolagent_appoid_key UNIQUE (app_mode, toolagent_appoid);


--
-- Name: shktoolagentappdetail_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shktoolagentappdetail
    ADD CONSTRAINT shktoolagentappdetail_pkey PRIMARY KEY (oid);


--
-- Name: shktoolagentappdetailuser_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shktoolagentappdetailuser
    ADD CONSTRAINT shktoolagentappdetailuser_pkey PRIMARY KEY (oid);


--
-- Name: shktoolagentappdetailuser_toolagent_appoid_useroid_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shktoolagentappdetailuser
    ADD CONSTRAINT shktoolagentappdetailuser_toolagent_appoid_useroid_key UNIQUE (toolagent_appoid, useroid);


--
-- Name: shktoolagentappuser_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shktoolagentappuser
    ADD CONSTRAINT shktoolagentappuser_pkey PRIMARY KEY (oid);


--
-- Name: shktoolagentappuser_toolagent_appoid_useroid_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shktoolagentappuser
    ADD CONSTRAINT shktoolagentappuser_toolagent_appoid_useroid_key UNIQUE (toolagent_appoid, useroid);


--
-- Name: shkusergrouptable_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkusergrouptable
    ADD CONSTRAINT shkusergrouptable_pkey PRIMARY KEY (oid);


--
-- Name: shkusergrouptable_userid_groupid_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkusergrouptable
    ADD CONSTRAINT shkusergrouptable_userid_groupid_key UNIQUE (userid, groupid);


--
-- Name: shkuserpacklevelpart_participantoid_useroid_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkuserpacklevelpart
    ADD CONSTRAINT shkuserpacklevelpart_participantoid_useroid_key UNIQUE (participantoid, useroid);


--
-- Name: shkuserpacklevelpart_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkuserpacklevelpart
    ADD CONSTRAINT shkuserpacklevelpart_pkey PRIMARY KEY (oid);


--
-- Name: shkuserproclevelparticipant_participantoid_useroid_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkuserproclevelparticipant
    ADD CONSTRAINT shkuserproclevelparticipant_participantoid_useroid_key UNIQUE (participantoid, useroid);


--
-- Name: shkuserproclevelparticipant_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkuserproclevelparticipant
    ADD CONSTRAINT shkuserproclevelparticipant_pkey PRIMARY KEY (oid);


--
-- Name: shkxpdlapplicationpackage_package_id_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkxpdlapplicationpackage
    ADD CONSTRAINT shkxpdlapplicationpackage_package_id_key UNIQUE (package_id);


--
-- Name: shkxpdlapplicationpackage_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkxpdlapplicationpackage
    ADD CONSTRAINT shkxpdlapplicationpackage_pkey PRIMARY KEY (oid);


--
-- Name: shkxpdlapplicationprocess_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkxpdlapplicationprocess
    ADD CONSTRAINT shkxpdlapplicationprocess_pkey PRIMARY KEY (oid);


--
-- Name: shkxpdlapplicationprocess_process_id_packageoid_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkxpdlapplicationprocess
    ADD CONSTRAINT shkxpdlapplicationprocess_process_id_packageoid_key UNIQUE (process_id, packageoid);


--
-- Name: shkxpdldata_cnt_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkxpdldata
    ADD CONSTRAINT shkxpdldata_cnt_key UNIQUE (cnt);


--
-- Name: shkxpdldata_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkxpdldata
    ADD CONSTRAINT shkxpdldata_pkey PRIMARY KEY (oid);


--
-- Name: shkxpdldata_xpdl_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkxpdldata
    ADD CONSTRAINT shkxpdldata_xpdl_key UNIQUE (xpdl);


--
-- Name: shkxpdlhistory_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkxpdlhistory
    ADD CONSTRAINT shkxpdlhistory_pkey PRIMARY KEY (oid);


--
-- Name: shkxpdlhistory_xpdlid_xpdlversion_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkxpdlhistory
    ADD CONSTRAINT shkxpdlhistory_xpdlid_xpdlversion_key UNIQUE (xpdlid, xpdlversion);


--
-- Name: shkxpdlhistorydata_cnt_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkxpdlhistorydata
    ADD CONSTRAINT shkxpdlhistorydata_cnt_key UNIQUE (cnt);


--
-- Name: shkxpdlhistorydata_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkxpdlhistorydata
    ADD CONSTRAINT shkxpdlhistorydata_pkey PRIMARY KEY (oid);


--
-- Name: shkxpdlparticipantpackage_package_id_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkxpdlparticipantpackage
    ADD CONSTRAINT shkxpdlparticipantpackage_package_id_key UNIQUE (package_id);


--
-- Name: shkxpdlparticipantpackage_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkxpdlparticipantpackage
    ADD CONSTRAINT shkxpdlparticipantpackage_pkey PRIMARY KEY (oid);


--
-- Name: shkxpdlparticipantprocess_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkxpdlparticipantprocess
    ADD CONSTRAINT shkxpdlparticipantprocess_pkey PRIMARY KEY (oid);


--
-- Name: shkxpdlparticipantprocess_process_id_packageoid_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkxpdlparticipantprocess
    ADD CONSTRAINT shkxpdlparticipantprocess_process_id_packageoid_key UNIQUE (process_id, packageoid);


--
-- Name: shkxpdlreferences_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkxpdlreferences
    ADD CONSTRAINT shkxpdlreferences_pkey PRIMARY KEY (oid);


--
-- Name: shkxpdlreferences_referredxpdlid_referringxpdl_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkxpdlreferences
    ADD CONSTRAINT shkxpdlreferences_referredxpdlid_referringxpdl_key UNIQUE (referredxpdlid, referringxpdl);


--
-- Name: shkxpdls_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkxpdls
    ADD CONSTRAINT shkxpdls_pkey PRIMARY KEY (oid);


--
-- Name: shkxpdls_xpdlid_xpdlversion_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkxpdls
    ADD CONSTRAINT shkxpdls_xpdlid_xpdlversion_key UNIQUE (xpdlid, xpdlversion);


--
-- Name: wf_audit_trail_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY wf_audit_trail
    ADD CONSTRAINT wf_audit_trail_pkey PRIMARY KEY (id);


--
-- Name: wf_process_link_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY wf_process_link
    ADD CONSTRAINT wf_process_link_pkey PRIMARY KEY (processid);


--
-- Name: wf_report_activity_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY wf_report_activity
    ADD CONSTRAINT wf_report_activity_pkey PRIMARY KEY (activitydefid);


--
-- Name: wf_report_package_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY wf_report_package
    ADD CONSTRAINT wf_report_package_pkey PRIMARY KEY (packageid);


--
-- Name: wf_report_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY wf_report
    ADD CONSTRAINT wf_report_pkey PRIMARY KEY (activityinstanceid);


--
-- Name: wf_report_process_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY wf_report_process
    ADD CONSTRAINT wf_report_process_pkey PRIMARY KEY (processdefid);


--
-- Name: wf_resource_bundle_message_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY wf_resource_bundle_message
    ADD CONSTRAINT wf_resource_bundle_message_pkey PRIMARY KEY (id);


--
-- Name: wf_setup_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY wf_setup
    ADD CONSTRAINT wf_setup_pkey PRIMARY KEY (id);


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

CREATE INDEX app_datalist_appid_appversion_idx ON app_datalist USING btree (appid, appversion);


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

CREATE INDEX app_env_variable_appid_appversion_idx ON app_env_variable USING btree (appid, appversion);


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

CREATE INDEX app_form_appid_appversion_idx ON app_form USING btree (appid, appversion);


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

CREATE INDEX app_message_appid_appversion_idx ON app_message USING btree (appid, appversion);


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

CREATE INDEX app_package_activity_form_packageid_packageversion_idx ON app_package_activity_form USING btree (packageid, packageversion);


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

CREATE INDEX app_package_activity_plugin_packageid_packageversion_idx ON app_package_activity_plugin USING btree (packageid, packageversion);


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

CREATE INDEX app_package_appid_appversion_idx ON app_package USING btree (appid, appversion);


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

CREATE INDEX app_package_participant_packageid_packageversion_idx ON app_package_participant USING btree (packageid, packageversion);


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

CREATE INDEX app_plugin_default_appid_appversion_idx ON app_plugin_default USING btree (appid, appversion);


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

CREATE INDEX app_report_activity_instance_activityuid_idx ON app_report_activity_instance USING btree (activityuid);


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

CREATE INDEX app_report_activity_instance_processinstanceid_idx ON app_report_activity_instance USING btree (processinstanceid);


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

CREATE INDEX app_report_activity_processuid_idx ON app_report_activity USING btree (processuid);


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

CREATE INDEX app_report_package_appuid_idx ON app_report_package USING btree (appuid);


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

CREATE INDEX app_report_process_instance_processuid_idx ON app_report_process_instance USING btree (processuid);


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

CREATE INDEX app_report_process_packageuid_idx ON app_report_process USING btree (packageuid);


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

CREATE INDEX app_userview_appid_appversion_idx ON app_userview USING btree (appid, appversion);


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

CREATE INDEX dir_department_hod_idx ON dir_department USING btree (hod);


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

CREATE INDEX dir_department_organizationid_idx ON dir_department USING btree (organizationid);


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

CREATE INDEX dir_department_parentid_idx ON dir_department USING btree (parentid);


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

CREATE INDEX dir_employment_departmentid_idx ON dir_employment USING btree (departmentid);


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

CREATE INDEX dir_employment_gradeid_idx ON dir_employment USING btree (gradeid);


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

CREATE INDEX dir_employment_organizationid_idx ON dir_employment USING btree (organizationid);


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

CREATE INDEX dir_employment_report_to_employmentid_idx ON dir_employment_report_to USING btree (employmentid);


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

CREATE INDEX dir_employment_report_to_reporttoid_idx ON dir_employment_report_to USING btree (reporttoid);


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

CREATE INDEX dir_employment_userid_idx ON dir_employment USING btree (userid);


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

CREATE INDEX dir_grade_organizationid_idx ON dir_grade USING btree (organizationid);


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

CREATE INDEX dir_group_organizationid_idx ON dir_group USING btree (organizationid);


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

CREATE INDEX dir_organization_parentid_idx ON dir_organization USING btree (parentid);


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

CREATE INDEX dir_user_group_groupid_idx ON dir_user_group USING btree (groupid);


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

CREATE INDEX dir_user_group_userid_idx ON dir_user_group USING btree (userid);


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

CREATE INDEX dir_user_role_roleid_idx ON dir_user_role USING btree (roleid);


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

CREATE INDEX dir_user_role_userid_idx ON dir_user_role USING btree (userid);


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

CREATE INDEX idx_name ON app_app USING btree (name);


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

CREATE INDEX shkactivities_process_idx ON shkactivities USING btree (process);


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

CREATE INDEX shkactivities_state_idx ON shkactivities USING btree (state);


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

CREATE INDEX shkactivities_theresource_idx ON shkactivities USING btree (theresource);


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

CREATE INDEX shkactivitydata_activity_idx ON shkactivitydata USING btree (activity);


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

CREATE INDEX shkactivitydatablobs_activitydatawob_idx ON shkactivitydatablobs USING btree (activitydatawob);


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

CREATE INDEX shkactivitydatawob_activity_idx ON shkactivitydatawob USING btree (activity);


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

CREATE INDEX shkandjointable_activity_idx ON shkandjointable USING btree (activity);


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

CREATE INDEX shkandjointable_blockactivity_idx ON shkandjointable USING btree (blockactivity);


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

CREATE INDEX shkandjointable_process_idx ON shkandjointable USING btree (process);


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

CREATE INDEX shkassignmenteventaudits_thetype_idx ON shkassignmenteventaudits USING btree (thetype);


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

CREATE INDEX shkassignmentstable_activity_idx ON shkassignmentstable USING btree (activity);


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

CREATE INDEX shkassignmentstable_theresource_idx ON shkassignmentstable USING btree (theresource);


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

CREATE INDEX shkcreateprocesseventaudits_thetype_idx ON shkcreateprocesseventaudits USING btree (thetype);


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

CREATE INDEX shkdataeventaudits_thetype_idx ON shkdataeventaudits USING btree (thetype);


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

CREATE INDEX shkdeadlines_activity_idx ON shkdeadlines USING btree (activity);


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

CREATE INDEX shkdeadlines_process_idx ON shkdeadlines USING btree (process);


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

CREATE INDEX shkgroupgrouptable_groupid_idx ON shkgroupgrouptable USING btree (groupid);


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

CREATE INDEX shkgroupgrouptable_sub_gid_idx ON shkgroupgrouptable USING btree (sub_gid);


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

CREATE INDEX shkgroupuserpacklevelpart_participantoid_idx ON shkgroupuserpacklevelpart USING btree (participantoid);


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

CREATE INDEX shkgroupuserpacklevelpart_useroid_idx ON shkgroupuserpacklevelpart USING btree (useroid);


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

CREATE INDEX shkgroupuserproclevelpart_participantoid_idx ON shkgroupuserproclevelpart USING btree (participantoid);


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

CREATE INDEX shkgroupuserproclevelpart_useroid_idx ON shkgroupuserproclevelpart USING btree (useroid);


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

CREATE INDEX shkneweventauditdata_dataeventaudit_idx ON shkneweventauditdata USING btree (dataeventaudit);


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

CREATE INDEX shkneweventauditdatablobs_neweventauditdatawob_idx ON shkneweventauditdatablobs USING btree (neweventauditdatawob);


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

CREATE INDEX shkneweventauditdatawob_dataeventaudit_idx ON shkneweventauditdatawob USING btree (dataeventaudit);


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

CREATE INDEX shkoldeventauditdata_dataeventaudit_idx ON shkoldeventauditdata USING btree (dataeventaudit);


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

CREATE INDEX shkoldeventauditdatablobs_oldeventauditdatawob_idx ON shkoldeventauditdatablobs USING btree (oldeventauditdatawob);


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

CREATE INDEX shkoldeventauditdatawob_dataeventaudit_idx ON shkoldeventauditdatawob USING btree (dataeventaudit);


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

CREATE INDEX shkpacklevelparticipant_packageoid_idx ON shkpacklevelparticipant USING btree (packageoid);


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

CREATE INDEX shkpacklevelxpdlapp_packageoid_idx ON shkpacklevelxpdlapp USING btree (packageoid);


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

CREATE INDEX shkpacklevelxpdlapptaappdetail_toolagentoid_idx ON shkpacklevelxpdlapptaappdetail USING btree (toolagentoid);


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

CREATE INDEX shkpacklevelxpdlapptaappdetail_xpdl_appoid_idx ON shkpacklevelxpdlapptaappdetail USING btree (xpdl_appoid);


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

CREATE INDEX shkpacklevelxpdlapptaappdetusr_toolagentoid_idx ON shkpacklevelxpdlapptaappdetusr USING btree (toolagentoid);


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

CREATE INDEX shkpacklevelxpdlapptaappdetusr_xpdl_appoid_idx ON shkpacklevelxpdlapptaappdetusr USING btree (xpdl_appoid);


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

CREATE INDEX shkpacklevelxpdlapptaappuser_toolagentoid_idx ON shkpacklevelxpdlapptaappuser USING btree (toolagentoid);


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

CREATE INDEX shkpacklevelxpdlapptaappuser_xpdl_appoid_idx ON shkpacklevelxpdlapptaappuser USING btree (xpdl_appoid);


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

CREATE INDEX shkpacklevelxpdlapptoolagntapp_toolagentoid_idx ON shkpacklevelxpdlapptoolagntapp USING btree (toolagentoid);


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

CREATE INDEX shkpacklevelxpdlapptoolagntapp_xpdl_appoid_idx ON shkpacklevelxpdlapptoolagntapp USING btree (xpdl_appoid);


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

CREATE INDEX shkprocessdata_process_idx ON shkprocessdata USING btree (process);


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

CREATE INDEX shkprocessdatablobs_processdatawob_idx ON shkprocessdatablobs USING btree (processdatawob);


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

CREATE INDEX shkprocessdatawob_process_idx ON shkprocessdatawob USING btree (process);


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

CREATE INDEX shkprocesses_processdefinition_idx ON shkprocesses USING btree (processdefinition);


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

CREATE INDEX shkprocesses_state_idx ON shkprocesses USING btree (state);


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

CREATE INDEX shkprocessrequesters_activityrequester_idx ON shkprocessrequesters USING btree (activityrequester);


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

CREATE INDEX shkprocessrequesters_resourcerequester_idx ON shkprocessrequesters USING btree (resourcerequester);


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

CREATE INDEX shkproclevelparticipant_processoid_idx ON shkproclevelparticipant USING btree (processoid);


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

CREATE INDEX shkproclevelxpdlapp_processoid_idx ON shkproclevelxpdlapp USING btree (processoid);


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

CREATE INDEX shkproclevelxpdlapptaappdetail_toolagentoid_idx ON shkproclevelxpdlapptaappdetail USING btree (toolagentoid);


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

CREATE INDEX shkproclevelxpdlapptaappdetail_xpdl_appoid_idx ON shkproclevelxpdlapptaappdetail USING btree (xpdl_appoid);


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

CREATE INDEX shkproclevelxpdlapptaappdetusr_toolagentoid_idx ON shkproclevelxpdlapptaappdetusr USING btree (toolagentoid);


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

CREATE INDEX shkproclevelxpdlapptaappdetusr_xpdl_appoid_idx ON shkproclevelxpdlapptaappdetusr USING btree (xpdl_appoid);


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

CREATE INDEX shkproclevelxpdlapptaappuser_toolagentoid_idx ON shkproclevelxpdlapptaappuser USING btree (toolagentoid);


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

CREATE INDEX shkproclevelxpdlapptaappuser_xpdl_appoid_idx ON shkproclevelxpdlapptaappuser USING btree (xpdl_appoid);


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

CREATE INDEX shkproclevelxpdlapptoolagntapp_toolagentoid_idx ON shkproclevelxpdlapptoolagntapp USING btree (toolagentoid);


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

CREATE INDEX shkproclevelxpdlapptoolagntapp_xpdl_appoid_idx ON shkproclevelxpdlapptoolagntapp USING btree (xpdl_appoid);


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

CREATE INDEX shkstateeventaudits_newactivitystate_idx ON shkstateeventaudits USING btree (newactivitystate);


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

CREATE INDEX shkstateeventaudits_newprocessstate_idx ON shkstateeventaudits USING btree (newprocessstate);


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

CREATE INDEX shkstateeventaudits_oldactivitystate_idx ON shkstateeventaudits USING btree (oldactivitystate);


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

CREATE INDEX shkstateeventaudits_oldprocessstate_idx ON shkstateeventaudits USING btree (oldprocessstate);


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

CREATE INDEX shkstateeventaudits_thetype_idx ON shkstateeventaudits USING btree (thetype);


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

CREATE INDEX shktoolagentappdetail_toolagent_appoid_idx ON shktoolagentappdetail USING btree (toolagent_appoid);


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

CREATE INDEX shktoolagentappdetailuser_toolagent_appoid_idx ON shktoolagentappdetailuser USING btree (toolagent_appoid);


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

CREATE INDEX shktoolagentappdetailuser_useroid_idx ON shktoolagentappdetailuser USING btree (useroid);


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

CREATE INDEX shktoolagentappuser_toolagent_appoid_idx ON shktoolagentappuser USING btree (toolagent_appoid);


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

CREATE INDEX shktoolagentappuser_useroid_idx ON shktoolagentappuser USING btree (useroid);


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

CREATE INDEX shkusergrouptable_groupid_idx ON shkusergrouptable USING btree (groupid);


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

CREATE INDEX shkusergrouptable_userid_idx ON shkusergrouptable USING btree (userid);


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

CREATE INDEX shkuserpacklevelpart_participantoid_idx ON shkuserpacklevelpart USING btree (participantoid);


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

CREATE INDEX shkuserpacklevelpart_useroid_idx ON shkuserpacklevelpart USING btree (useroid);


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

CREATE INDEX shkuserproclevelparticipant_participantoid_idx ON shkuserproclevelparticipant USING btree (participantoid);


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

CREATE INDEX shkuserproclevelparticipant_useroid_idx ON shkuserproclevelparticipant USING btree (useroid);


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

CREATE INDEX shkxpdlapplicationprocess_packageoid_idx ON shkxpdlapplicationprocess USING btree (packageoid);


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

CREATE INDEX shkxpdldata_xpdl_idx ON shkxpdldata USING btree (xpdl);


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

CREATE INDEX shkxpdlhistorydata_xpdlhistory_idx ON shkxpdlhistorydata USING btree (xpdlhistory);


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

CREATE INDEX shkxpdlparticipantprocess_packageoid_idx ON shkxpdlparticipantprocess USING btree (packageoid);


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

CREATE INDEX shkxpdlreferences_referringxpdl_idx ON shkxpdlreferences USING btree (referringxpdl);


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

CREATE INDEX wf_report_activitydefid_idx ON wf_report USING btree (activitydefid);


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

CREATE INDEX wf_report_packageid_idx ON wf_report USING btree (packageid);


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

CREATE INDEX wf_report_processdefid_idx ON wf_report USING btree (processdefid);


--
-- Name: fk2f0367fd159b6639; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY dir_user_group
    ADD CONSTRAINT fk2f0367fd159b6639 FOREIGN KEY (groupid) REFERENCES dir_group(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: fk2f0367fdce539211; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY dir_user_group
    ADD CONSTRAINT fk2f0367fdce539211 FOREIGN KEY (userid) REFERENCES dir_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: fk351d7bf2918f93d; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY app_report_process_instance
    ADD CONSTRAINT fk351d7bf2918f93d FOREIGN KEY (processuid) REFERENCES app_report_process(uuid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: fk45957822462ef4c7; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY app_form
    ADD CONSTRAINT fk45957822462ef4c7 FOREIGN KEY (appid, appversion) REFERENCES app_app(appid, appversion) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: fk536229452787e613; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY dir_employment_report_to
    ADD CONSTRAINT fk536229452787e613 FOREIGN KEY (employmentid) REFERENCES dir_employment(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: fk53622945f4068416; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY dir_employment_report_to
    ADD CONSTRAINT fk53622945f4068416 FOREIGN KEY (reporttoid) REFERENCES dir_employment(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: fk55a15fa5961bd498; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY dir_organization
    ADD CONSTRAINT fk55a15fa5961bd498 FOREIGN KEY (parentid) REFERENCES dir_organization(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: fk5c5fe738c8fe3ca7; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY dir_user_role
    ADD CONSTRAINT fk5c5fe738c8fe3ca7 FOREIGN KEY (roleid) REFERENCES dir_role(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: fk5c5fe738ce539211; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY dir_user_role
    ADD CONSTRAINT fk5c5fe738ce539211 FOREIGN KEY (userid) REFERENCES dir_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: fk5e33d79c918f93d; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY app_report_activity
    ADD CONSTRAINT fk5e33d79c918f93d FOREIGN KEY (processuid) REFERENCES app_report_process(uuid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: fk5e9247a6462ef4c7; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY app_datalist
    ADD CONSTRAINT fk5e9247a6462ef4c7 FOREIGN KEY (appid, appversion) REFERENCES app_app(appid, appversion) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: fk6d7bf59c5f255bcc; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY app_package_participant
    ADD CONSTRAINT fk6d7bf59c5f255bcc FOREIGN KEY (packageid, packageversion) REFERENCES app_package(packageid, packageversion) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: fk740a62ec462ef4c7; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY app_env_variable
    ADD CONSTRAINT fk740a62ec462ef4c7 FOREIGN KEY (appid, appversion) REFERENCES app_app(appid, appversion) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: fk7a835713462ef4c7; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY app_plugin_default
    ADD CONSTRAINT fk7a835713462ef4c7 FOREIGN KEY (appid, appversion) REFERENCES app_app(appid, appversion) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: fk852ea428462ef4c7; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY app_package
    ADD CONSTRAINT fk852ea428462ef4c7 FOREIGN KEY (appid, appversion) REFERENCES app_app(appid, appversion) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: fk9c6abdd8b06e2043; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY app_report_activity_instance
    ADD CONSTRAINT fk9c6abdd8b06e2043 FOREIGN KEY (activityuid) REFERENCES app_report_activity(uuid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: fk9c6abdd8d4610a90; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY app_report_activity_instance
    ADD CONSTRAINT fk9c6abdd8d4610a90 FOREIGN KEY (processinstanceid) REFERENCES app_report_process_instance(instanceid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: fk_nnvkg0h6yy8o3f4yjhd20ury0; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY app_resource
    ADD CONSTRAINT fk_nnvkg0h6yy8o3f4yjhd20ury0 FOREIGN KEY (appid, appversion) REFERENCES app_app(appid, appversion);


--
-- Name: fka8d741d5f255bcc; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY app_package_activity_form
    ADD CONSTRAINT fka8d741d5f255bcc FOREIGN KEY (packageid, packageversion) REFERENCES app_package(packageid, packageversion) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: fkade8644c5f255bcc; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY app_package_activity_plugin
    ADD CONSTRAINT fkade8644c5f255bcc FOREIGN KEY (packageid, packageversion) REFERENCES app_package(packageid, packageversion) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: fkb943cca47a4e8f48; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY wf_report
    ADD CONSTRAINT fkb943cca47a4e8f48 FOREIGN KEY (packageid) REFERENCES wf_report_package(packageid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: fkb943cca4a39d6461; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY wf_report
    ADD CONSTRAINT fkb943cca4a39d6461 FOREIGN KEY (processdefid) REFERENCES wf_report_process(processdefid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: fkb943cca4cb863f; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY wf_report
    ADD CONSTRAINT fkb943cca4cb863f FOREIGN KEY (activitydefid) REFERENCES wf_report_activity(activitydefid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: fkbc9a49a518cebae1; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY dir_grade
    ADD CONSTRAINT fkbc9a49a518cebae1 FOREIGN KEY (organizationid) REFERENCES dir_organization(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: fkbc9a804d18cebae1; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY dir_group
    ADD CONSTRAINT fkbc9a804d18cebae1 FOREIGN KEY (organizationid) REFERENCES dir_organization(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: fkbd580a19e475abc; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY app_report_package
    ADD CONSTRAINT fkbd580a19e475abc FOREIGN KEY (appuid) REFERENCES app_report_app(uuid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: fkc6620ade14ce02e9; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY dir_employment
    ADD CONSTRAINT fkc6620ade14ce02e9 FOREIGN KEY (gradeid) REFERENCES dir_grade(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: fkc6620ade18cebae1; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY dir_employment
    ADD CONSTRAINT fkc6620ade18cebae1 FOREIGN KEY (organizationid) REFERENCES dir_organization(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: fkc6620ade716ae35f; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY dir_employment
    ADD CONSTRAINT fkc6620ade716ae35f FOREIGN KEY (departmentid) REFERENCES dir_department(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: fkc6620adece539211; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY dir_employment
    ADD CONSTRAINT fkc6620adece539211 FOREIGN KEY (userid) REFERENCES dir_user(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: fkdafff442d40695dd; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY app_report_process
    ADD CONSTRAINT fkdafff442d40695dd FOREIGN KEY (packageuid) REFERENCES app_report_package(uuid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: fke411d54e462ef4c7; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY app_userview
    ADD CONSTRAINT fke411d54e462ef4c7 FOREIGN KEY (appid, appversion) REFERENCES app_app(appid, appversion) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: fkee346fe9462ef4c7; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY app_message
    ADD CONSTRAINT fkee346fe9462ef4c7 FOREIGN KEY (appid, appversion) REFERENCES app_app(appid, appversion) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: fkeee8aa4418cebae1; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY dir_department
    ADD CONSTRAINT fkeee8aa4418cebae1 FOREIGN KEY (organizationid) REFERENCES dir_organization(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: fkeee8aa4480db1449; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY dir_department
    ADD CONSTRAINT fkeee8aa4480db1449 FOREIGN KEY (hod) REFERENCES dir_employment(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: fkeee8aa44ef6bb2b7; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY dir_department
    ADD CONSTRAINT fkeee8aa44ef6bb2b7 FOREIGN KEY (parentid) REFERENCES dir_department(id) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkactivities_process; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkactivities
    ADD CONSTRAINT shkactivities_process FOREIGN KEY (process) REFERENCES shkprocesses(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkactivities_state; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkactivities
    ADD CONSTRAINT shkactivities_state FOREIGN KEY (state) REFERENCES shkactivitystates(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkactivities_theresource; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkactivities
    ADD CONSTRAINT shkactivities_theresource FOREIGN KEY (theresource) REFERENCES shkresourcestable(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkactivitydata_activity; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkactivitydata
    ADD CONSTRAINT shkactivitydata_activity FOREIGN KEY (activity) REFERENCES shkactivities(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkactivitydatablobs_activitydatawob; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkactivitydatablobs
    ADD CONSTRAINT shkactivitydatablobs_activitydatawob FOREIGN KEY (activitydatawob) REFERENCES shkactivitydatawob(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkactivitydatawob_activity; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkactivitydatawob
    ADD CONSTRAINT shkactivitydatawob_activity FOREIGN KEY (activity) REFERENCES shkactivities(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkandjointable_activity; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkandjointable
    ADD CONSTRAINT shkandjointable_activity FOREIGN KEY (activity) REFERENCES shkactivities(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkandjointable_blockactivity; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkandjointable
    ADD CONSTRAINT shkandjointable_blockactivity FOREIGN KEY (blockactivity) REFERENCES shkactivities(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkandjointable_process; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkandjointable
    ADD CONSTRAINT shkandjointable_process FOREIGN KEY (process) REFERENCES shkprocesses(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkassignmenteventaudits_thetype; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkassignmenteventaudits
    ADD CONSTRAINT shkassignmenteventaudits_thetype FOREIGN KEY (thetype) REFERENCES shkeventtypes(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkassignmentstable_activity; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkassignmentstable
    ADD CONSTRAINT shkassignmentstable_activity FOREIGN KEY (activity) REFERENCES shkactivities(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkassignmentstable_theresource; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkassignmentstable
    ADD CONSTRAINT shkassignmentstable_theresource FOREIGN KEY (theresource) REFERENCES shkresourcestable(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkcreateprocesseventaudits_thetype; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkcreateprocesseventaudits
    ADD CONSTRAINT shkcreateprocesseventaudits_thetype FOREIGN KEY (thetype) REFERENCES shkeventtypes(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkdataeventaudits_thetype; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkdataeventaudits
    ADD CONSTRAINT shkdataeventaudits_thetype FOREIGN KEY (thetype) REFERENCES shkeventtypes(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkdeadlines_activity; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkdeadlines
    ADD CONSTRAINT shkdeadlines_activity FOREIGN KEY (activity) REFERENCES shkactivities(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkdeadlines_process; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkdeadlines
    ADD CONSTRAINT shkdeadlines_process FOREIGN KEY (process) REFERENCES shkprocesses(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkgroupgrouptable_groupid; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkgroupgrouptable
    ADD CONSTRAINT shkgroupgrouptable_groupid FOREIGN KEY (groupid) REFERENCES shkgrouptable(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkgroupgrouptable_sub_gid; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkgroupgrouptable
    ADD CONSTRAINT shkgroupgrouptable_sub_gid FOREIGN KEY (sub_gid) REFERENCES shkgrouptable(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkgroupuserpacklevelpart_participantoid; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkgroupuserpacklevelpart
    ADD CONSTRAINT shkgroupuserpacklevelpart_participantoid FOREIGN KEY (participantoid) REFERENCES shkpacklevelparticipant(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkgroupuserpacklevelpart_useroid; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkgroupuserpacklevelpart
    ADD CONSTRAINT shkgroupuserpacklevelpart_useroid FOREIGN KEY (useroid) REFERENCES shkgroupuser(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkgroupuserproclevelpart_participantoid; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkgroupuserproclevelpart
    ADD CONSTRAINT shkgroupuserproclevelpart_participantoid FOREIGN KEY (participantoid) REFERENCES shkproclevelparticipant(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkgroupuserproclevelpart_useroid; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkgroupuserproclevelpart
    ADD CONSTRAINT shkgroupuserproclevelpart_useroid FOREIGN KEY (useroid) REFERENCES shkgroupuser(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkneweventauditdata_dataeventaudit; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkneweventauditdata
    ADD CONSTRAINT shkneweventauditdata_dataeventaudit FOREIGN KEY (dataeventaudit) REFERENCES shkdataeventaudits(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkneweventauditdatablobs_neweventauditdatawob; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkneweventauditdatablobs
    ADD CONSTRAINT shkneweventauditdatablobs_neweventauditdatawob FOREIGN KEY (neweventauditdatawob) REFERENCES shkneweventauditdatawob(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkneweventauditdatawob_dataeventaudit; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkneweventauditdatawob
    ADD CONSTRAINT shkneweventauditdatawob_dataeventaudit FOREIGN KEY (dataeventaudit) REFERENCES shkdataeventaudits(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkoldeventauditdata_dataeventaudit; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkoldeventauditdata
    ADD CONSTRAINT shkoldeventauditdata_dataeventaudit FOREIGN KEY (dataeventaudit) REFERENCES shkdataeventaudits(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkoldeventauditdatablobs_oldeventauditdatawob; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkoldeventauditdatablobs
    ADD CONSTRAINT shkoldeventauditdatablobs_oldeventauditdatawob FOREIGN KEY (oldeventauditdatawob) REFERENCES shkoldeventauditdatawob(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkoldeventauditdatawob_dataeventaudit; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkoldeventauditdatawob
    ADD CONSTRAINT shkoldeventauditdatawob_dataeventaudit FOREIGN KEY (dataeventaudit) REFERENCES shkdataeventaudits(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkpacklevelparticipant_packageoid; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkpacklevelparticipant
    ADD CONSTRAINT shkpacklevelparticipant_packageoid FOREIGN KEY (packageoid) REFERENCES shkxpdlparticipantpackage(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkpacklevelxpdlapp_packageoid; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkpacklevelxpdlapp
    ADD CONSTRAINT shkpacklevelxpdlapp_packageoid FOREIGN KEY (packageoid) REFERENCES shkxpdlapplicationpackage(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkpacklevelxpdlapptaappdetail_toolagentoid; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkpacklevelxpdlapptaappdetail
    ADD CONSTRAINT shkpacklevelxpdlapptaappdetail_toolagentoid FOREIGN KEY (toolagentoid) REFERENCES shktoolagentappdetail(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkpacklevelxpdlapptaappdetail_xpdl_appoid; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkpacklevelxpdlapptaappdetail
    ADD CONSTRAINT shkpacklevelxpdlapptaappdetail_xpdl_appoid FOREIGN KEY (xpdl_appoid) REFERENCES shkpacklevelxpdlapp(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkpacklevelxpdlapptaappdetusr_toolagentoid; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkpacklevelxpdlapptaappdetusr
    ADD CONSTRAINT shkpacklevelxpdlapptaappdetusr_toolagentoid FOREIGN KEY (toolagentoid) REFERENCES shktoolagentappdetailuser(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkpacklevelxpdlapptaappdetusr_xpdl_appoid; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkpacklevelxpdlapptaappdetusr
    ADD CONSTRAINT shkpacklevelxpdlapptaappdetusr_xpdl_appoid FOREIGN KEY (xpdl_appoid) REFERENCES shkpacklevelxpdlapp(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkpacklevelxpdlapptaappuser_toolagentoid; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkpacklevelxpdlapptaappuser
    ADD CONSTRAINT shkpacklevelxpdlapptaappuser_toolagentoid FOREIGN KEY (toolagentoid) REFERENCES shktoolagentappuser(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkpacklevelxpdlapptaappuser_xpdl_appoid; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkpacklevelxpdlapptaappuser
    ADD CONSTRAINT shkpacklevelxpdlapptaappuser_xpdl_appoid FOREIGN KEY (xpdl_appoid) REFERENCES shkpacklevelxpdlapp(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkpacklevelxpdlapptoolagntapp_toolagentoid; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkpacklevelxpdlapptoolagntapp
    ADD CONSTRAINT shkpacklevelxpdlapptoolagntapp_toolagentoid FOREIGN KEY (toolagentoid) REFERENCES shktoolagentapp(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkpacklevelxpdlapptoolagntapp_xpdl_appoid; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkpacklevelxpdlapptoolagntapp
    ADD CONSTRAINT shkpacklevelxpdlapptoolagntapp_xpdl_appoid FOREIGN KEY (xpdl_appoid) REFERENCES shkpacklevelxpdlapp(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkprocessdata_process; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkprocessdata
    ADD CONSTRAINT shkprocessdata_process FOREIGN KEY (process) REFERENCES shkprocesses(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkprocessdatablobs_processdatawob; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkprocessdatablobs
    ADD CONSTRAINT shkprocessdatablobs_processdatawob FOREIGN KEY (processdatawob) REFERENCES shkprocessdatawob(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkprocessdatawob_process; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkprocessdatawob
    ADD CONSTRAINT shkprocessdatawob_process FOREIGN KEY (process) REFERENCES shkprocesses(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkprocesses_processdefinition; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkprocesses
    ADD CONSTRAINT shkprocesses_processdefinition FOREIGN KEY (processdefinition) REFERENCES shkprocessdefinitions(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkprocesses_state; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkprocesses
    ADD CONSTRAINT shkprocesses_state FOREIGN KEY (state) REFERENCES shkprocessstates(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkprocessrequesters_activityrequester; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkprocessrequesters
    ADD CONSTRAINT shkprocessrequesters_activityrequester FOREIGN KEY (activityrequester) REFERENCES shkactivities(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkprocessrequesters_resourcerequester; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkprocessrequesters
    ADD CONSTRAINT shkprocessrequesters_resourcerequester FOREIGN KEY (resourcerequester) REFERENCES shkresourcestable(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkproclevelparticipant_processoid; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkproclevelparticipant
    ADD CONSTRAINT shkproclevelparticipant_processoid FOREIGN KEY (processoid) REFERENCES shkxpdlparticipantprocess(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkproclevelxpdlapp_processoid; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkproclevelxpdlapp
    ADD CONSTRAINT shkproclevelxpdlapp_processoid FOREIGN KEY (processoid) REFERENCES shkxpdlapplicationprocess(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkproclevelxpdlapptaappdetail_toolagentoid; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkproclevelxpdlapptaappdetail
    ADD CONSTRAINT shkproclevelxpdlapptaappdetail_toolagentoid FOREIGN KEY (toolagentoid) REFERENCES shktoolagentappdetail(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkproclevelxpdlapptaappdetail_xpdl_appoid; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkproclevelxpdlapptaappdetail
    ADD CONSTRAINT shkproclevelxpdlapptaappdetail_xpdl_appoid FOREIGN KEY (xpdl_appoid) REFERENCES shkproclevelxpdlapp(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkproclevelxpdlapptaappdetusr_toolagentoid; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkproclevelxpdlapptaappdetusr
    ADD CONSTRAINT shkproclevelxpdlapptaappdetusr_toolagentoid FOREIGN KEY (toolagentoid) REFERENCES shktoolagentappdetailuser(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkproclevelxpdlapptaappdetusr_xpdl_appoid; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkproclevelxpdlapptaappdetusr
    ADD CONSTRAINT shkproclevelxpdlapptaappdetusr_xpdl_appoid FOREIGN KEY (xpdl_appoid) REFERENCES shkproclevelxpdlapp(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkproclevelxpdlapptaappuser_toolagentoid; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkproclevelxpdlapptaappuser
    ADD CONSTRAINT shkproclevelxpdlapptaappuser_toolagentoid FOREIGN KEY (toolagentoid) REFERENCES shktoolagentappuser(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkproclevelxpdlapptaappuser_xpdl_appoid; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkproclevelxpdlapptaappuser
    ADD CONSTRAINT shkproclevelxpdlapptaappuser_xpdl_appoid FOREIGN KEY (xpdl_appoid) REFERENCES shkproclevelxpdlapp(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkproclevelxpdlapptoolagntapp_toolagentoid; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkproclevelxpdlapptoolagntapp
    ADD CONSTRAINT shkproclevelxpdlapptoolagntapp_toolagentoid FOREIGN KEY (toolagentoid) REFERENCES shktoolagentapp(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkproclevelxpdlapptoolagntapp_xpdl_appoid; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkproclevelxpdlapptoolagntapp
    ADD CONSTRAINT shkproclevelxpdlapptoolagntapp_xpdl_appoid FOREIGN KEY (xpdl_appoid) REFERENCES shkproclevelxpdlapp(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkstateeventaudits_newactivitystate; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkstateeventaudits
    ADD CONSTRAINT shkstateeventaudits_newactivitystate FOREIGN KEY (newactivitystate) REFERENCES shkactivitystateeventaudits(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkstateeventaudits_newprocessstate; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkstateeventaudits
    ADD CONSTRAINT shkstateeventaudits_newprocessstate FOREIGN KEY (newprocessstate) REFERENCES shkprocessstateeventaudits(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkstateeventaudits_oldactivitystate; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkstateeventaudits
    ADD CONSTRAINT shkstateeventaudits_oldactivitystate FOREIGN KEY (oldactivitystate) REFERENCES shkactivitystateeventaudits(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkstateeventaudits_oldprocessstate; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkstateeventaudits
    ADD CONSTRAINT shkstateeventaudits_oldprocessstate FOREIGN KEY (oldprocessstate) REFERENCES shkprocessstateeventaudits(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkstateeventaudits_thetype; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkstateeventaudits
    ADD CONSTRAINT shkstateeventaudits_thetype FOREIGN KEY (thetype) REFERENCES shkeventtypes(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shktoolagentappdetail_toolagent_appoid; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shktoolagentappdetail
    ADD CONSTRAINT shktoolagentappdetail_toolagent_appoid FOREIGN KEY (toolagent_appoid) REFERENCES shktoolagentapp(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shktoolagentappdetailuser_toolagent_appoid; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shktoolagentappdetailuser
    ADD CONSTRAINT shktoolagentappdetailuser_toolagent_appoid FOREIGN KEY (toolagent_appoid) REFERENCES shktoolagentappdetail(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shktoolagentappdetailuser_useroid; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shktoolagentappdetailuser
    ADD CONSTRAINT shktoolagentappdetailuser_useroid FOREIGN KEY (useroid) REFERENCES shktoolagentuser(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shktoolagentappuser_toolagent_appoid; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shktoolagentappuser
    ADD CONSTRAINT shktoolagentappuser_toolagent_appoid FOREIGN KEY (toolagent_appoid) REFERENCES shktoolagentapp(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shktoolagentappuser_useroid; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shktoolagentappuser
    ADD CONSTRAINT shktoolagentappuser_useroid FOREIGN KEY (useroid) REFERENCES shktoolagentuser(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkusergrouptable_groupid; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkusergrouptable
    ADD CONSTRAINT shkusergrouptable_groupid FOREIGN KEY (groupid) REFERENCES shkgrouptable(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkusergrouptable_userid; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkusergrouptable
    ADD CONSTRAINT shkusergrouptable_userid FOREIGN KEY (userid) REFERENCES shkusertable(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkuserpacklevelpart_participantoid; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkuserpacklevelpart
    ADD CONSTRAINT shkuserpacklevelpart_participantoid FOREIGN KEY (participantoid) REFERENCES shkpacklevelparticipant(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkuserpacklevelpart_useroid; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkuserpacklevelpart
    ADD CONSTRAINT shkuserpacklevelpart_useroid FOREIGN KEY (useroid) REFERENCES shknormaluser(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkuserproclevelparticipant_participantoid; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkuserproclevelparticipant
    ADD CONSTRAINT shkuserproclevelparticipant_participantoid FOREIGN KEY (participantoid) REFERENCES shkproclevelparticipant(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkuserproclevelparticipant_useroid; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkuserproclevelparticipant
    ADD CONSTRAINT shkuserproclevelparticipant_useroid FOREIGN KEY (useroid) REFERENCES shknormaluser(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkxpdlapplicationprocess_packageoid; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkxpdlapplicationprocess
    ADD CONSTRAINT shkxpdlapplicationprocess_packageoid FOREIGN KEY (packageoid) REFERENCES shkxpdlapplicationpackage(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkxpdldata_xpdl; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkxpdldata
    ADD CONSTRAINT shkxpdldata_xpdl FOREIGN KEY (xpdl) REFERENCES shkxpdls(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkxpdlhistorydata_xpdlhistory; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkxpdlhistorydata
    ADD CONSTRAINT shkxpdlhistorydata_xpdlhistory FOREIGN KEY (xpdlhistory) REFERENCES shkxpdlhistory(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkxpdlparticipantprocess_packageoid; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkxpdlparticipantprocess
    ADD CONSTRAINT shkxpdlparticipantprocess_packageoid FOREIGN KEY (packageoid) REFERENCES shkxpdlparticipantpackage(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: shkxpdlreferences_referringxpdl; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY shkxpdlreferences
    ADD CONSTRAINT shkxpdlreferences_referringxpdl FOREIGN KEY (referringxpdl) REFERENCES shkxpdls(oid) DEFERRABLE INITIALLY DEFERRED;


--
-- Name: SCHEMA public; Type: ACL; Schema: -; Owner: -
--

REVOKE ALL ON SCHEMA public FROM PUBLIC;
REVOKE ALL ON SCHEMA public FROM postgres;
GRANT ALL ON SCHEMA public TO postgres;
GRANT ALL ON SCHEMA public TO PUBLIC;


--
--

