CREATE TABLE pu_00lti (
    id BIGINT(10) NOT NULL auto_increment,
    course BIGINT(10) NOT NULL DEFAULT 0,
    name VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    intro LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    introformat SMALLINT(4) DEFAULT 0,
    timecreated BIGINT(10) NOT NULL DEFAULT 0,
    timemodified BIGINT(10) NOT NULL DEFAULT 0,
    typeid BIGINT(10),
    toolurl LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    securetoolurl LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    instructorchoicesendname TINYINT(1),
    instructorchoicesendemailaddr TINYINT(1),
    instructorchoiceallowroster TINYINT(1),
    instructorchoiceallowsetting TINYINT(1),
    instructorcustomparameters VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    instructorchoiceacceptgrades TINYINT(1),
    grade BIGINT(10) NOT NULL DEFAULT 100,
    launchcontainer TINYINT(2) NOT NULL DEFAULT 1,
    resourcekey VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    password VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    debuglaunch TINYINT(1) NOT NULL DEFAULT 0,
    showtitlelaunch TINYINT(1) NOT NULL DEFAULT 0,
    showdescriptionlaunch TINYINT(1) NOT NULL DEFAULT 0,
    servicesalt VARCHAR(40) CHARACTER SET utf8 COLLATE utf8_general_ci,
    icon LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    secureicon LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00lti_cou_ix (course)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Compressed
 COMMENT='This table contains Basic LTI activities instances';
CREATE TABLE pu_00lti_tool_proxies (
    id BIGINT(10) NOT NULL auto_increment,
    name VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'Tool Provider',
    regurl LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    state TINYINT(2) NOT NULL DEFAULT 1,
    guid VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    secret VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    vendorcode VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    capabilityoffered LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    serviceoffered LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    toolproxy LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    createdby BIGINT(10) NOT NULL,
    timecreated BIGINT(10) NOT NULL,
    timemodified BIGINT(10) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00ltitoolprox_gui_uix (guid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='LTI tool proxy registrations';
CREATE TABLE pu_00lti_types (
    id BIGINT(10) NOT NULL auto_increment,
    name VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'basiclti Activity',
    baseurl LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    tooldomain VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    state TINYINT(2) NOT NULL DEFAULT 2,
    course BIGINT(10) NOT NULL,
    coursevisible TINYINT(1) NOT NULL DEFAULT 0,
    ltiversion VARCHAR(10) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    clientid VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    toolproxyid BIGINT(10),
    enabledcapability LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    parameter LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    icon LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    secureicon LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    createdby BIGINT(10) NOT NULL,
    timecreated BIGINT(10) NOT NULL,
    timemodified BIGINT(10) NOT NULL,
    description LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00ltitype_cou_ix (course)
, KEY pu_00ltitype_too_ix (tooldomain)
, UNIQUE KEY pu_00ltitype_cli_uix (clientid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Basic LTI pre-configured activities';
CREATE TABLE pu_00lti_types_config (
    id BIGINT(10) NOT NULL auto_increment,
    typeid BIGINT(10) NOT NULL,
    name VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    value LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00ltitypeconf_typ_ix (typeid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Basic LTI types configuration';
CREATE TABLE pu_00lti_tool_settings (
    id BIGINT(10) NOT NULL auto_increment,
    toolproxyid BIGINT(10) NOT NULL,
    typeid BIGINT(10),
    course BIGINT(10),
    coursemoduleid BIGINT(10),
    settings LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    timecreated BIGINT(10) NOT NULL,
    timemodified BIGINT(10) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00ltitoolsett_too_ix (toolproxyid)
, KEY pu_00ltitoolsett_typ_ix (typeid)
, KEY pu_00ltitoolsett_cou_ix (course)
, KEY pu_00ltitoolsett_cou2_ix (coursemoduleid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='LTI tool setting values';
CREATE TABLE pu_00lti_submission (
    id BIGINT(10) NOT NULL auto_increment,
    ltiid BIGINT(10) NOT NULL,
    userid BIGINT(10) NOT NULL,
    datesubmitted BIGINT(10) NOT NULL,
    dateupdated BIGINT(10) NOT NULL,
    gradepercent NUMERIC(10,5) NOT NULL,
    originalgrade NUMERIC(10,5) NOT NULL,
    launchid BIGINT(10) NOT NULL,
    state TINYINT(2) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00ltisubm_lti_ix (ltiid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Keeps track of individual submissions for LTI activities.';
CREATE TABLE pu_00lti_submission_history (
    id BIGINT(10) NOT NULL auto_increment,
    ltiid BIGINT(10) NOT NULL,
    userid BIGINT(10) NOT NULL,
    launchid BIGINT(10) NOT NULL,
    timecreated BIGINT(10) NOT NULL,
CONSTRAINT  PRIMARY KEY (id),
CONSTRAINT pu_00lti_submission_history_ltiid_fk FOREIGN KEY (ltiid) REFERENCES pu_00lti (id) ON DELETE CASCADE ON UPDATE RESTRICT,
CONSTRAINT pu_00lti_submission_history_userid_fk FOREIGN KEY (userid) REFERENCES pu_00user (id) ON DELETE RESTRICT ON UPDATE RESTRICT
, KEY pu_00ltisubmhist_ltiuse_ix (ltiid, userid)
, KEY pu_00ltisubmhist_lti_ix (ltiid)
, KEY pu_00ltisubmhist_use_ix (userid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Tracking of user submission history for the LTI activity';
CREATE TABLE pu_00lti_access_tokens (
    id BIGINT(10) NOT NULL auto_increment,
    typeid BIGINT(10) NOT NULL,
    scope LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    token VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    validuntil BIGINT(10) NOT NULL,
    timecreated BIGINT(10) NOT NULL,
    lastaccess BIGINT(10),
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00ltiaccetoke_tok_uix (token)
, KEY pu_00ltiaccetoke_typ_ix (typeid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Security tokens for accessing of LTI services';
CREATE TABLE pu_00page (
    id BIGINT(10) NOT NULL auto_increment,
    course BIGINT(10) NOT NULL DEFAULT 0,
    name VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    intro LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    introformat SMALLINT(4) NOT NULL DEFAULT 0,
    content LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    contentformat SMALLINT(4) NOT NULL DEFAULT 0,
    legacyfiles SMALLINT(4) NOT NULL DEFAULT 0,
    legacyfileslast BIGINT(10),
    display SMALLINT(4) NOT NULL DEFAULT 0,
    displayoptions LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    revision BIGINT(10) NOT NULL DEFAULT 0,
    timemodified BIGINT(10) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00page_cou_ix (course)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Each record is one page and its config data';
CREATE TABLE pu_00quiz (
    id BIGINT(10) NOT NULL auto_increment,
    course BIGINT(10) NOT NULL DEFAULT 0,
    name VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    intro LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    introformat SMALLINT(4) NOT NULL DEFAULT 0,
    timeopen BIGINT(10) NOT NULL DEFAULT 0,
    timeclose BIGINT(10) NOT NULL DEFAULT 0,
    timelimit BIGINT(10) NOT NULL DEFAULT 0,
    overduehandling VARCHAR(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'autoabandon',
    graceperiod BIGINT(10) NOT NULL DEFAULT 0,
    preferredbehaviour VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    canredoquestions SMALLINT(4) NOT NULL DEFAULT 0,
    attempts MEDIUMINT(6) NOT NULL DEFAULT 0,
    attemptonlast SMALLINT(4) NOT NULL DEFAULT 0,
    grademethod SMALLINT(4) NOT NULL DEFAULT 1,
    decimalpoints SMALLINT(4) NOT NULL DEFAULT 2,
    questiondecimalpoints SMALLINT(4) NOT NULL DEFAULT -1,
    reviewattempt MEDIUMINT(6) NOT NULL DEFAULT 0,
    reviewcorrectness MEDIUMINT(6) NOT NULL DEFAULT 0,
    reviewmarks MEDIUMINT(6) NOT NULL DEFAULT 0,
    reviewspecificfeedback MEDIUMINT(6) NOT NULL DEFAULT 0,
    reviewgeneralfeedback MEDIUMINT(6) NOT NULL DEFAULT 0,
    reviewrightanswer MEDIUMINT(6) NOT NULL DEFAULT 0,
    reviewoverallfeedback MEDIUMINT(6) NOT NULL DEFAULT 0,
    questionsperpage BIGINT(10) NOT NULL DEFAULT 0,
    navmethod VARCHAR(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'free',
    shuffleanswers SMALLINT(4) NOT NULL DEFAULT 0,
    sumgrades NUMERIC(10,5) NOT NULL DEFAULT 0,
    grade NUMERIC(10,5) NOT NULL DEFAULT 0,
    timecreated BIGINT(10) NOT NULL DEFAULT 0,
    timemodified BIGINT(10) NOT NULL DEFAULT 0,
    password VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    subnet VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    browsersecurity VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    delay1 BIGINT(10) NOT NULL DEFAULT 0,
    delay2 BIGINT(10) NOT NULL DEFAULT 0,
    showuserpicture SMALLINT(4) NOT NULL DEFAULT 0,
    showblocks SMALLINT(4) NOT NULL DEFAULT 0,
    completionattemptsexhausted TINYINT(1) DEFAULT 0,
    completionpass TINYINT(1) DEFAULT 0,
    allowofflineattempts TINYINT(1) DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00quiz_cou_ix (course)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='The settings for each quiz.';
CREATE TABLE pu_00quiz_slots (
    id BIGINT(10) NOT NULL auto_increment,
    slot BIGINT(10) NOT NULL,
    quizid BIGINT(10) NOT NULL DEFAULT 0,
    page BIGINT(10) NOT NULL,
    requireprevious SMALLINT(4) NOT NULL DEFAULT 0,
    questionid BIGINT(10) NOT NULL DEFAULT 0,
    maxmark NUMERIC(12,7) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00quizslot_quislo_ix (quizid, slot)
, KEY pu_00quizslot_qui_ix (quizid)
, KEY pu_00quizslot_que_ix (questionid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Stores the question used in a quiz, with the order, and for ';
CREATE TABLE pu_00quiz_sections (
    id BIGINT(10) NOT NULL auto_increment,
    quizid BIGINT(10) NOT NULL,
    firstslot BIGINT(10) NOT NULL,
    heading VARCHAR(1333) CHARACTER SET utf8 COLLATE utf8_general_ci,
    shufflequestions SMALLINT(4) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00quizsect_quifir_uix (quizid, firstslot)
, KEY pu_00quizsect_qui_ix (quizid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Stores sections of a quiz with section name (heading), from ';
CREATE TABLE pu_00quiz_feedback (
    id BIGINT(10) NOT NULL auto_increment,
    quizid BIGINT(10) NOT NULL DEFAULT 0,
    feedbacktext LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    feedbacktextformat TINYINT(2) NOT NULL DEFAULT 0,
    mingrade NUMERIC(10,5) NOT NULL DEFAULT 0,
    maxgrade NUMERIC(10,5) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00quizfeed_qui_ix (quizid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Feedback given to students based on which grade band their o';
CREATE TABLE pu_00quiz_overrides (
    id BIGINT(10) NOT NULL auto_increment,
    quiz BIGINT(10) NOT NULL DEFAULT 0,
    groupid BIGINT(10),
    userid BIGINT(10),
    timeopen BIGINT(10),
    timeclose BIGINT(10),
    timelimit BIGINT(10),
    attempts MEDIUMINT(6),
    password VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00quizover_qui_ix (quiz)
, KEY pu_00quizover_gro_ix (groupid)
, KEY pu_00quizover_use_ix (userid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='The overrides to quiz settings on a per-user and per-group b';
CREATE TABLE pu_00quiz_attempts (
    id BIGINT(10) NOT NULL auto_increment,
    quiz BIGINT(10) NOT NULL DEFAULT 0,
    userid BIGINT(10) NOT NULL DEFAULT 0,
    attempt MEDIUMINT(6) NOT NULL DEFAULT 0,
    uniqueid BIGINT(10) NOT NULL DEFAULT 0,
    layout LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    currentpage BIGINT(10) NOT NULL DEFAULT 0,
    preview SMALLINT(3) NOT NULL DEFAULT 0,
    state VARCHAR(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'inprogress',
    timestart BIGINT(10) NOT NULL DEFAULT 0,
    timefinish BIGINT(10) NOT NULL DEFAULT 0,
    timemodified BIGINT(10) NOT NULL DEFAULT 0,
    timemodifiedoffline BIGINT(10) NOT NULL DEFAULT 0,
    timecheckstate BIGINT(10) DEFAULT 0,
    sumgrades NUMERIC(10,5),
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00quizatte_quiuseatt_uix (quiz, userid, attempt)
, KEY pu_00quizatte_statim_ix (state, timecheckstate)
, KEY pu_00quizatte_qui_ix (quiz)
, KEY pu_00quizatte_use_ix (userid)
, UNIQUE KEY pu_00quizatte_uni_uix (uniqueid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Stores users attempts at quizzes.';
CREATE TABLE pu_00quiz_grades (
    id BIGINT(10) NOT NULL auto_increment,
    quiz BIGINT(10) NOT NULL DEFAULT 0,
    userid BIGINT(10) NOT NULL DEFAULT 0,
    grade NUMERIC(10,5) NOT NULL DEFAULT 0,
    timemodified BIGINT(10) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00quizgrad_use_ix (userid)
, KEY pu_00quizgrad_qui_ix (quiz)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Stores the overall grade for each user on the quiz, based on';
CREATE TABLE pu_00quiz_reports (
    id BIGINT(10) NOT NULL auto_increment,
    name VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    displayorder BIGINT(10) NOT NULL,
    capability VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00quizrepo_nam_uix (name)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Lists all the installed quiz reports and their display order';
CREATE TABLE pu_00resource (
    id BIGINT(10) NOT NULL auto_increment,
    course BIGINT(10) NOT NULL DEFAULT 0,
    name VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    intro LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    introformat SMALLINT(4) NOT NULL DEFAULT 0,
    tobemigrated SMALLINT(4) NOT NULL DEFAULT 0,
    legacyfiles SMALLINT(4) NOT NULL DEFAULT 0,
    legacyfileslast BIGINT(10),
    display SMALLINT(4) NOT NULL DEFAULT 0,
    displayoptions LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    filterfiles SMALLINT(4) NOT NULL DEFAULT 0,
    revision BIGINT(10) NOT NULL DEFAULT 0,
    timemodified BIGINT(10) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00reso_cou_ix (course)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Each record is one resource and its config data';
CREATE TABLE pu_00resource_old (
    id BIGINT(10) NOT NULL auto_increment,
    course BIGINT(10) NOT NULL DEFAULT 0,
    name VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    type VARCHAR(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    reference VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    intro LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    introformat SMALLINT(4) NOT NULL DEFAULT 0,
    alltext LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    popup LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    options VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    timemodified BIGINT(10) NOT NULL DEFAULT 0,
    oldid BIGINT(10) NOT NULL,
    cmid BIGINT(10),
    newmodule VARCHAR(50) CHARACTER SET utf8 COLLATE utf8_general_ci,
    newid BIGINT(10),
    migrated BIGINT(10) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00resoold_old_uix (oldid)
, KEY pu_00resoold_cmi_ix (cmid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='backup of all old resource instances from 1.9';
CREATE TABLE pu_00scorm (
    id BIGINT(10) NOT NULL auto_increment,
    course BIGINT(10) NOT NULL DEFAULT 0,
    name VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    scormtype VARCHAR(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'local',
    reference VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    intro LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    introformat SMALLINT(4) NOT NULL DEFAULT 0,
    version VARCHAR(9) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    maxgrade DOUBLE NOT NULL DEFAULT 0,
    grademethod TINYINT(2) NOT NULL DEFAULT 0,
    whatgrade BIGINT(10) NOT NULL DEFAULT 0,
    maxattempt BIGINT(10) NOT NULL DEFAULT 1,
    forcecompleted TINYINT(1) NOT NULL DEFAULT 0,
    forcenewattempt TINYINT(1) NOT NULL DEFAULT 0,
    lastattemptlock TINYINT(1) NOT NULL DEFAULT 0,
    masteryoverride TINYINT(1) NOT NULL DEFAULT 1,
    displayattemptstatus TINYINT(1) NOT NULL DEFAULT 1,
    displaycoursestructure TINYINT(1) NOT NULL DEFAULT 0,
    updatefreq TINYINT(1) NOT NULL DEFAULT 0,
    sha1hash VARCHAR(40) CHARACTER SET utf8 COLLATE utf8_general_ci,
    md5hash VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    revision BIGINT(10) NOT NULL DEFAULT 0,
    launch BIGINT(10) NOT NULL DEFAULT 0,
    skipview TINYINT(1) NOT NULL DEFAULT 1,
    hidebrowse TINYINT(1) NOT NULL DEFAULT 0,
    hidetoc TINYINT(1) NOT NULL DEFAULT 0,
    nav TINYINT(1) NOT NULL DEFAULT 1,
    navpositionleft BIGINT(10) DEFAULT -100,
    navpositiontop BIGINT(10) DEFAULT -100,
    auto TINYINT(1) NOT NULL DEFAULT 0,
    popup TINYINT(1) NOT NULL DEFAULT 0,
    options VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    width BIGINT(10) NOT NULL DEFAULT 100,
    height BIGINT(10) NOT NULL DEFAULT 600,
    timeopen BIGINT(10) NOT NULL DEFAULT 0,
    timeclose BIGINT(10) NOT NULL DEFAULT 0,
    timemodified BIGINT(10) NOT NULL DEFAULT 0,
    completionstatusrequired TINYINT(1),
    completionscorerequired BIGINT(10),
    completionstatusallscos TINYINT(1),
    displayactivityname SMALLINT(4) NOT NULL DEFAULT 1,
    autocommit TINYINT(1) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00scor_cou_ix (course)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='each table is one SCORM module and its configuration';
CREATE TABLE pu_00scorm_scoes (
    id BIGINT(10) NOT NULL auto_increment,
    scorm BIGINT(10) NOT NULL DEFAULT 0,
    manifest VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    organization VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    parent VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    identifier VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    launch LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    scormtype VARCHAR(5) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    title VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    sortorder BIGINT(10) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00scorscoe_sco_ix (scorm)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='each SCO part of the SCORM module';
CREATE TABLE pu_00scorm_scoes_data (
    id BIGINT(10) NOT NULL auto_increment,
    scoid BIGINT(10) NOT NULL DEFAULT 0,
    name VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    value LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00scorscoedata_sco_ix (scoid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Contains variable data get from packages';
CREATE TABLE pu_00scorm_scoes_track (
    id BIGINT(10) NOT NULL auto_increment,
    userid BIGINT(10) NOT NULL DEFAULT 0,
    scormid BIGINT(10) NOT NULL DEFAULT 0,
    scoid BIGINT(10) NOT NULL DEFAULT 0,
    attempt BIGINT(10) NOT NULL DEFAULT 1,
    element VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    value LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    timemodified BIGINT(10) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00scorscoetrac_usescosc_uix (userid, scormid, scoid, attempt, element)
, KEY pu_00scorscoetrac_use_ix (userid)
, KEY pu_00scorscoetrac_sco_ix (scormid)
, KEY pu_00scorscoetrac_sco2_ix (scoid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='to track SCOes';
CREATE TABLE pu_00scorm_seq_objective (
    id BIGINT(10) NOT NULL auto_increment,
    scoid BIGINT(10) NOT NULL DEFAULT 0,
    primaryobj TINYINT(1) NOT NULL DEFAULT 0,
    objectiveid VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    satisfiedbymeasure TINYINT(1) NOT NULL DEFAULT 1,
    minnormalizedmeasure FLOAT(11,4) NOT NULL DEFAULT 0.0000,
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00scorseqobje_scoid_uix (scoid, id)
, KEY pu_00scorseqobje_sco_ix (scoid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='SCORM2004 objective description';
CREATE TABLE pu_00scorm_seq_mapinfo (
    id BIGINT(10) NOT NULL auto_increment,
    scoid BIGINT(10) NOT NULL DEFAULT 0,
    objectiveid BIGINT(10) NOT NULL DEFAULT 0,
    targetobjectiveid BIGINT(10) NOT NULL DEFAULT 0,
    readsatisfiedstatus TINYINT(1) NOT NULL DEFAULT 1,
    readnormalizedmeasure TINYINT(1) NOT NULL DEFAULT 1,
    writesatisfiedstatus TINYINT(1) NOT NULL DEFAULT 0,
    writenormalizedmeasure TINYINT(1) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00scorseqmapi_scoidobj_uix (scoid, id, objectiveid)
, KEY pu_00scorseqmapi_sco_ix (scoid)
, KEY pu_00scorseqmapi_obj_ix (objectiveid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='SCORM2004 objective mapinfo description';
CREATE TABLE pu_00scorm_seq_ruleconds (
    id BIGINT(10) NOT NULL auto_increment,
    scoid BIGINT(10) NOT NULL DEFAULT 0,
    conditioncombination VARCHAR(3) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'all',
    ruletype TINYINT(2) NOT NULL DEFAULT 0,
    action VARCHAR(25) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00scorseqrule_scoid_uix (scoid, id)
, KEY pu_00scorseqrule_sco_ix (scoid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='SCORM2004 rule conditions';
CREATE TABLE pu_00scorm_seq_rulecond (
    id BIGINT(10) NOT NULL auto_increment,
    scoid BIGINT(10) NOT NULL DEFAULT 0,
    ruleconditionsid BIGINT(10) NOT NULL DEFAULT 0,
    refrencedobjective VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    measurethreshold FLOAT(11,4) NOT NULL DEFAULT 0.0000,
    operator VARCHAR(5) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'noOp',
    cond VARCHAR(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'always',
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00scorseqrule_idscorul_uix (id, scoid, ruleconditionsid)
, KEY pu_00scorseqrule_sco2_ix (scoid)
, KEY pu_00scorseqrule_rul_ix (ruleconditionsid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='SCORM2004 rule condition';
CREATE TABLE pu_00scorm_seq_rolluprule (
    id BIGINT(10) NOT NULL auto_increment,
    scoid BIGINT(10) NOT NULL DEFAULT 0,
    childactivityset VARCHAR(15) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    minimumcount BIGINT(10) NOT NULL DEFAULT 0,
    minimumpercent FLOAT(11,4) NOT NULL DEFAULT 0.0000,
    conditioncombination VARCHAR(3) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'all',
    action VARCHAR(15) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00scorseqroll_scoid_uix (scoid, id)
, KEY pu_00scorseqroll_sco_ix (scoid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='SCORM2004 sequencing rule';
CREATE TABLE pu_00scorm_seq_rolluprulecond (
    id BIGINT(10) NOT NULL auto_increment,
    scoid BIGINT(10) NOT NULL DEFAULT 0,
    rollupruleid BIGINT(10) NOT NULL DEFAULT 0,
    operator VARCHAR(5) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'noOp',
    cond VARCHAR(25) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00scorseqroll_scorolid_uix (scoid, rollupruleid, id)
, KEY pu_00scorseqroll_sco2_ix (scoid)
, KEY pu_00scorseqroll_rol_ix (rollupruleid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='SCORM2004 sequencing rule';
CREATE TABLE pu_00scorm_aicc_session (
    id BIGINT(10) NOT NULL auto_increment,
    userid BIGINT(10) NOT NULL DEFAULT 0,
    scormid BIGINT(10) NOT NULL DEFAULT 0,
    hacpsession VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    scoid BIGINT(10) DEFAULT 0,
    scormmode VARCHAR(50) CHARACTER SET utf8 COLLATE utf8_general_ci,
    scormstatus VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    attempt BIGINT(10),
    lessonstatus VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    sessiontime VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    timecreated BIGINT(10) NOT NULL DEFAULT 0,
    timemodified BIGINT(10) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00scoraiccsess_sco_ix (scormid)
, KEY pu_00scoraiccsess_use_ix (userid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Used by AICC HACP to store session information';
CREATE TABLE pu_00scorm_trusted_packages (
    id BIGINT(10) NOT NULL auto_increment,
    contenthash VARCHAR(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    uploadedby BIGINT(10),
    timecreated BIGINT(10) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00scortruspack_con_uix (contenthash)
, KEY pu_00scortruspack_upl_ix (uploadedby)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Whitelist of known trusted SCORM packages';
CREATE TABLE pu_00survey (
    id BIGINT(10) NOT NULL auto_increment,
    course BIGINT(10) NOT NULL DEFAULT 0,
    template BIGINT(10) NOT NULL DEFAULT 0,
    days MEDIUMINT(6) NOT NULL DEFAULT 0,
    timecreated BIGINT(10) NOT NULL DEFAULT 0,
    timemodified BIGINT(10) NOT NULL DEFAULT 0,
    name VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    intro LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    introformat SMALLINT(4) NOT NULL DEFAULT 0,
    questions VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    completionsubmit TINYINT(1) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00surv_cou_ix (course)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Each record is one SURVEY module with its configuration';
CREATE TABLE pu_00survey_questions (
    id BIGINT(10) NOT NULL auto_increment,
    text VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    shorttext VARCHAR(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    multi VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    intro VARCHAR(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    type SMALLINT(3) NOT NULL DEFAULT 0,
    options LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
CONSTRAINT  PRIMARY KEY (id)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='the questions conforming one survey';
CREATE TABLE pu_00survey_answers (
    id BIGINT(10) NOT NULL auto_increment,
    userid BIGINT(10) NOT NULL DEFAULT 0,
    survey BIGINT(10) NOT NULL DEFAULT 0,
    question BIGINT(10) NOT NULL DEFAULT 0,
    time BIGINT(10) NOT NULL DEFAULT 0,
    answer1 LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    answer2 LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00survansw_use_ix (userid)
, KEY pu_00survansw_sur_ix (survey)
, KEY pu_00survansw_que_ix (question)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='the answers to each questions filled by the users';
CREATE TABLE pu_00survey_analysis (
    id BIGINT(10) NOT NULL auto_increment,
    survey BIGINT(10) NOT NULL DEFAULT 0,
    userid BIGINT(10) NOT NULL DEFAULT 0,
    notes LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00survanal_use_ix (userid)
, KEY pu_00survanal_sur_ix (survey)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='text about each survey submission';
CREATE TABLE pu_00url (
    id BIGINT(10) NOT NULL auto_increment,
    course BIGINT(10) NOT NULL DEFAULT 0,
    name VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    intro LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    introformat SMALLINT(4) NOT NULL DEFAULT 0,
    externalurl LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    display SMALLINT(4) NOT NULL DEFAULT 0,
    displayoptions LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    parameters LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    timemodified BIGINT(10) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00url_cou_ix (course)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='each record is one url resource';
CREATE TABLE pu_00wiki (
    id BIGINT(10) NOT NULL auto_increment,
    course BIGINT(10) NOT NULL DEFAULT 0,
    name VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'Wiki',
    intro LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    introformat SMALLINT(4) NOT NULL DEFAULT 0,
    timecreated BIGINT(10) NOT NULL DEFAULT 0,
    timemodified BIGINT(10) NOT NULL DEFAULT 0,
    firstpagetitle VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'First Page',
    wikimode VARCHAR(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'collaborative',
    defaultformat VARCHAR(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'creole',
    forceformat TINYINT(1) NOT NULL DEFAULT 1,
    editbegin BIGINT(10) NOT NULL DEFAULT 0,
    editend BIGINT(10) DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00wiki_cou_ix (course)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Stores Wiki activity configuration';
CREATE TABLE pu_00wiki_subwikis (
    id BIGINT(10) NOT NULL auto_increment,
    wikiid BIGINT(10) NOT NULL DEFAULT 0,
    groupid BIGINT(10) NOT NULL DEFAULT 0,
    userid BIGINT(10) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00wikisubw_wik_ix (wikiid)
, UNIQUE KEY pu_00wikisubw_wikgrouse_uix (wikiid, groupid, userid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Stores subwiki instances';
CREATE TABLE pu_00wiki_pages (
    id BIGINT(10) NOT NULL auto_increment,
    subwikiid BIGINT(10) NOT NULL DEFAULT 0,
    title VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'title',
    cachedcontent LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    timecreated BIGINT(10) NOT NULL DEFAULT 0,
    timemodified BIGINT(10) NOT NULL DEFAULT 0,
    timerendered BIGINT(10) NOT NULL DEFAULT 0,
    userid BIGINT(10) NOT NULL DEFAULT 0,
    pageviews BIGINT(10) NOT NULL DEFAULT 0,
    readonly TINYINT(1) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00wikipage_subtituse_uix (subwikiid, title, userid)
, KEY pu_00wikipage_sub_ix (subwikiid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Stores wiki pages';
CREATE TABLE pu_00wiki_versions (
    id BIGINT(10) NOT NULL auto_increment,
    pageid BIGINT(10) NOT NULL DEFAULT 0,
    content LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    contentformat VARCHAR(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'creole',
    version MEDIUMINT(5) NOT NULL DEFAULT 0,
    timecreated BIGINT(10) NOT NULL DEFAULT 0,
    userid BIGINT(10) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00wikivers_pag_ix (pageid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Stores wiki page history';
CREATE TABLE pu_00wiki_synonyms (
    id BIGINT(10) NOT NULL auto_increment,
    subwikiid BIGINT(10) NOT NULL DEFAULT 0,
    pageid BIGINT(10) NOT NULL DEFAULT 0,
    pagesynonym VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'Pagesynonym',
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00wikisyno_pagpag_uix (pageid, pagesynonym)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Stores wiki pages synonyms';
CREATE TABLE pu_00wiki_links (
    id BIGINT(10) NOT NULL auto_increment,
    subwikiid BIGINT(10) NOT NULL DEFAULT 0,
    frompageid BIGINT(10) NOT NULL DEFAULT 0,
    topageid BIGINT(10) NOT NULL DEFAULT 0,
    tomissingpage VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00wikilink_fro_ix (frompageid)
, KEY pu_00wikilink_sub_ix (subwikiid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Page wiki links';
CREATE TABLE pu_00wiki_locks (
    id BIGINT(10) NOT NULL auto_increment,
    pageid BIGINT(10) NOT NULL DEFAULT 0,
    sectionname VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    userid BIGINT(10) NOT NULL DEFAULT 0,
    lockedat BIGINT(10) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Manages page locks';
CREATE TABLE pu_00workshop (
    id BIGINT(10) NOT NULL auto_increment,
    course BIGINT(10) NOT NULL,
    name VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    intro LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    introformat SMALLINT(3) NOT NULL DEFAULT 0,
    instructauthors LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    instructauthorsformat SMALLINT(3) NOT NULL DEFAULT 0,
    instructreviewers LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    instructreviewersformat SMALLINT(3) NOT NULL DEFAULT 0,
    timemodified BIGINT(10) NOT NULL,
    phase SMALLINT(3) DEFAULT 0,
    useexamples TINYINT(2) DEFAULT 0,
    usepeerassessment TINYINT(2) DEFAULT 0,
    useselfassessment TINYINT(2) DEFAULT 0,
    grade NUMERIC(10,5) DEFAULT 80,
    gradinggrade NUMERIC(10,5) DEFAULT 20,
    strategy VARCHAR(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    evaluation VARCHAR(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    gradedecimals SMALLINT(3) DEFAULT 0,
    nattachments SMALLINT(3) DEFAULT 0,
    submissionfiletypes VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    latesubmissions TINYINT(2) DEFAULT 0,
    maxbytes BIGINT(10) DEFAULT 100000,
    examplesmode SMALLINT(3) DEFAULT 0,
    submissionstart BIGINT(10) DEFAULT 0,
    submissionend BIGINT(10) DEFAULT 0,
    assessmentstart BIGINT(10) DEFAULT 0,
    assessmentend BIGINT(10) DEFAULT 0,
    phaseswitchassessment TINYINT(2) NOT NULL DEFAULT 0,
    conclusion LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    conclusionformat SMALLINT(3) NOT NULL DEFAULT 1,
    overallfeedbackmode SMALLINT(3) DEFAULT 1,
    overallfeedbackfiles SMALLINT(3) DEFAULT 0,
    overallfeedbackfiletypes VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    overallfeedbackmaxbytes BIGINT(10) DEFAULT 100000,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00work_cou_ix (course)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='This table keeps information about the module instances and ';
CREATE TABLE pu_00workshop_submissions (
    id BIGINT(10) NOT NULL auto_increment,
    workshopid BIGINT(10) NOT NULL,
    example TINYINT(2) DEFAULT 0,
    authorid BIGINT(10) NOT NULL,
    timecreated BIGINT(10) NOT NULL,
    timemodified BIGINT(10) NOT NULL,
    title VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    content LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    contentformat SMALLINT(3) NOT NULL DEFAULT 0,
    contenttrust SMALLINT(3) NOT NULL DEFAULT 0,
    attachment TINYINT(2) DEFAULT 0,
    grade NUMERIC(10,5),
    gradeover NUMERIC(10,5),
    gradeoverby BIGINT(10),
    feedbackauthor LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    feedbackauthorformat SMALLINT(3) DEFAULT 0,
    timegraded BIGINT(10),
    published TINYINT(2) DEFAULT 0,
    late TINYINT(2) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00worksubm_wor_ix (workshopid)
, KEY pu_00worksubm_gra_ix (gradeoverby)
, KEY pu_00worksubm_aut_ix (authorid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Info about the submission and the aggregation of the grade f';
CREATE TABLE pu_00workshop_assessments (
    id BIGINT(10) NOT NULL auto_increment,
    submissionid BIGINT(10) NOT NULL,
    reviewerid BIGINT(10) NOT NULL,
    weight BIGINT(10) NOT NULL DEFAULT 1,
    timecreated BIGINT(10) DEFAULT 0,
    timemodified BIGINT(10) DEFAULT 0,
    grade NUMERIC(10,5),
    gradinggrade NUMERIC(10,5),
    gradinggradeover NUMERIC(10,5),
    gradinggradeoverby BIGINT(10),
    feedbackauthor LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    feedbackauthorformat SMALLINT(3) DEFAULT 0,
    feedbackauthorattachment SMALLINT(3) DEFAULT 0,
    feedbackreviewer LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    feedbackreviewerformat SMALLINT(3) DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00workasse_sub_ix (submissionid)
, KEY pu_00workasse_gra_ix (gradinggradeoverby)
, KEY pu_00workasse_rev_ix (reviewerid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Info about the made assessment and automatically calculated ';
CREATE TABLE pu_00workshop_grades (
    id BIGINT(10) NOT NULL auto_increment,
    assessmentid BIGINT(10) NOT NULL,
    strategy VARCHAR(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    dimensionid BIGINT(10) NOT NULL,
    grade NUMERIC(10,5) NOT NULL,
    peercomment LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    peercommentformat SMALLINT(3) DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00workgrad_ass_ix (assessmentid)
, UNIQUE KEY pu_00workgrad_assstrdim_uix (assessmentid, strategy, dimensionid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='How the reviewers filled-up the grading forms, given grades ';
CREATE TABLE pu_00workshop_aggregations (
    id BIGINT(10) NOT NULL auto_increment,
    workshopid BIGINT(10) NOT NULL,
    userid BIGINT(10) NOT NULL,
    gradinggrade NUMERIC(10,5),
    timegraded BIGINT(10),
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00workaggr_wor_ix (workshopid)
, KEY pu_00workaggr_use_ix (userid)
, UNIQUE KEY pu_00workaggr_woruse_uix (workshopid, userid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Aggregated grades for assessment are stored here. The aggreg';
CREATE TABLE pu_00auth_approved_request (
    id BIGINT(10) NOT NULL auto_increment,
    status TINYINT(2) NOT NULL,
    username VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    firstname VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    lastname VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    lastnamephonetic VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    firstnamephonetic VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    middlename VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    alternatename VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    email VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    password VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    city VARCHAR(120) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    country VARCHAR(2) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    lang VARCHAR(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    confirmed TINYINT(1) NOT NULL,
    confirmtoken VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    positionid BIGINT(10),
    positionfreetext LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    organisationid BIGINT(10),
    organisationfreetext LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    managerjaid BIGINT(10),
    managerfreetext LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    profilefields LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    userid BIGINT(10),
    resolvedby BIGINT(10),
    timecreated BIGINT(10) NOT NULL,
    timemodified BIGINT(10),
    timeresolved BIGINT(10),
    extradata LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00authapprrequ_con_uix (confirmtoken)
, KEY pu_00authapprrequ_pos_ix (positionid)
, KEY pu_00authapprrequ_org_ix (organisationid)
, KEY pu_00authapprrequ_man_ix (managerjaid)
, KEY pu_00authapprrequ_use_ix (userid)
, KEY pu_00authapprrequ_res_ix (resolvedby)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Compressed
 COMMENT='Self registration with approval details';
CREATE TABLE pu_00auth_approved_request_snapshots (
    id BIGINT(10) NOT NULL auto_increment,
    requestid BIGINT(10) NOT NULL,
    timesnapshot BIGINT(10) NOT NULL,
    usersnapshot BIGINT(10) NOT NULL,
    status TINYINT(2),
    username VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci,
    firstname VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci,
    lastname VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci,
    lastnamephonetic VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    firstnamephonetic VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    middlename VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    alternatename VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    email VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci,
    password VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    city VARCHAR(120) CHARACTER SET utf8 COLLATE utf8_general_ci,
    country VARCHAR(2) CHARACTER SET utf8 COLLATE utf8_general_ci,
    lang VARCHAR(30) CHARACTER SET utf8 COLLATE utf8_general_ci,
    confirmed TINYINT(1),
    confirmtoken VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci,
    positionid BIGINT(10),
    positionfreetext LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    organisationid BIGINT(10),
    organisationfreetext LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    managerjaid BIGINT(10),
    managerfreetext LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    profilefields LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    userid BIGINT(10),
    resolvedby BIGINT(10),
    timecreated BIGINT(10),
    timemodified BIGINT(10),
    timeresolved BIGINT(10),
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00authapprrequsnap_req_ix (requestid)
, KEY pu_00authapprrequsnap_use_ix (usersnapshot)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Compressed
 COMMENT='History of auth_approved_request records';
CREATE TABLE pu_00auth_connect_servers (
    id BIGINT(10) NOT NULL auto_increment,
    status TINYINT(1) NOT NULL,
    serveridnumber VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    serversecret VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    serverurl VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    servername VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    servercomment LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    clientidnumber VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    clientsecret VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    apiversion BIGINT(10) NOT NULL,
    timecreated BIGINT(10) NOT NULL,
    timemodified BIGINT(10) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00authconnserv_cli_uix (clientidnumber)
, UNIQUE KEY pu_00authconnserv_ser_uix (serveridnumber)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='List of servers';
CREATE TABLE pu_00auth_connect_users (
    id BIGINT(10) NOT NULL auto_increment,
    serverid BIGINT(10) NOT NULL,
    serveruserid BIGINT(10) NOT NULL,
    userid BIGINT(10) NOT NULL,
    timecreated BIGINT(10) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00authconnuser_serser_uix (serverid, serveruserid)
, KEY pu_00authconnuser_ser_ix (serverid)
, UNIQUE KEY pu_00authconnuser_use_uix (userid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='List of users from each Totara Connect server';
CREATE TABLE pu_00auth_connect_user_collections (
    id BIGINT(10) NOT NULL auto_increment,
    serverid BIGINT(10) NOT NULL,
    collectiontype VARCHAR(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    collectionid BIGINT(10) NOT NULL,
    cohortid BIGINT(10) NOT NULL,
    timecreated BIGINT(10) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00authconnusercoll_serc_uix (serverid, collectiontype, collectionid)
, KEY pu_00authconnusercoll_ser_ix (serverid)
, KEY pu_00authconnusercoll_coh_ix (cohortid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='List of cohorts synced from server';
CREATE TABLE pu_00auth_connect_sso_requests (
    id BIGINT(10) NOT NULL auto_increment,
    serverid BIGINT(10) NOT NULL,
    requesttoken VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    sid VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    timecreated BIGINT(10) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00authconnssorequ_sid_uix (sid)
, UNIQUE KEY pu_00authconnssorequ_req_uix (requesttoken)
, KEY pu_00authconnssorequ_ser_ix (serverid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='List of SSO requests from Totara Connect client to server';
CREATE TABLE pu_00auth_connect_sso_sessions (
    id BIGINT(10) NOT NULL auto_increment,
    sid VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    ssotoken VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    serverid BIGINT(10) NOT NULL,
    serveruserid BIGINT(10) NOT NULL,
    userid BIGINT(10) NOT NULL,
    timecreated BIGINT(10) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00authconnssosess_sid_uix (sid)
, KEY pu_00authconnssosess_ser_ix (serverid)
, KEY pu_00authconnssosess_use_ix (userid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='List of SSO sessions on Client system, columns are not norma';
CREATE TABLE pu_00auth_connect_ids (
    id BIGINT(10) NOT NULL auto_increment,
    serverid BIGINT(10) NOT NULL,
    tablename VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    remoteid BIGINT(10) NOT NULL,
    localid BIGINT(10) NOT NULL,
    timecreated BIGINT(10) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00authconnids_sertabrem_uix (serverid, tablename, remoteid)
, UNIQUE KEY pu_00authconnids_tabloc_uix (tablename, localid)
, KEY pu_00authconnids_ser_ix (serverid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='General server to client database id mappings';
CREATE TABLE pu_00auth_oauth2_linked_login (
    id BIGINT(10) NOT NULL auto_increment,
    timecreated BIGINT(10) NOT NULL,
    timemodified BIGINT(10) NOT NULL,
    usermodified BIGINT(10) NOT NULL,
    userid BIGINT(10) NOT NULL,
    issuerid BIGINT(10) NOT NULL,
    username VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    email LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    confirmtoken VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    confirmtokenexpires BIGINT(10),
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00authoautlinklogi_issus_ix (issuerid, username)
, KEY pu_00authoautlinklogi_use_ix (usermodified)
, KEY pu_00authoautlinklogi_use2_ix (userid)
, KEY pu_00authoautlinklogi_iss_ix (issuerid)
, UNIQUE KEY pu_00authoautlinklogi_usei_uix (userid, issuerid, username)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Accounts linked to a users Moodle account.';
CREATE TABLE pu_00enrol_flatfile (
    id BIGINT(10) NOT NULL auto_increment,
    action VARCHAR(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    roleid BIGINT(10) NOT NULL,
    userid BIGINT(10) NOT NULL,
    courseid BIGINT(10) NOT NULL,
    timestart BIGINT(10) NOT NULL DEFAULT 0,
    timeend BIGINT(10) NOT NULL DEFAULT 0,
    timemodified BIGINT(10) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00enroflat_cou_ix (courseid)
, KEY pu_00enroflat_use_ix (userid)
, KEY pu_00enroflat_rol_ix (roleid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='enrol_flatfile table retrofitted from MySQL';
CREATE TABLE pu_00enrol_lti_tools (
    id BIGINT(10) NOT NULL auto_increment,
    enrolid BIGINT(10) NOT NULL,
    contextid BIGINT(10) NOT NULL,
    institution VARCHAR(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    lang VARCHAR(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'en',
    timezone VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '99',
    maxenrolled BIGINT(10) NOT NULL DEFAULT 0,
    maildisplay TINYINT(2) NOT NULL DEFAULT 2,
    city VARCHAR(120) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    country VARCHAR(2) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    gradesync TINYINT(1) NOT NULL DEFAULT 0,
    gradesynccompletion TINYINT(1) NOT NULL DEFAULT 0,
    membersync TINYINT(1) NOT NULL DEFAULT 0,
    membersyncmode TINYINT(1) NOT NULL DEFAULT 0,
    roleinstructor BIGINT(10) NOT NULL,
    rolelearner BIGINT(10) NOT NULL,
    secret LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    timecreated BIGINT(10) NOT NULL,
    timemodified BIGINT(10) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00enroltitool_enr_ix (enrolid)
, KEY pu_00enroltitool_con_ix (contextid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='List of tools provided to the remote system';
CREATE TABLE pu_00enrol_lti_users (
    id BIGINT(10) NOT NULL auto_increment,
    userid BIGINT(10) NOT NULL,
    toolid BIGINT(10) NOT NULL,
    serviceurl LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    sourceid LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    consumerkey LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    consumersecret LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    membershipsurl LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    membershipsid LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    lastgrade NUMERIC(10,5),
    lastaccess BIGINT(10),
    timecreated BIGINT(10),
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00enroltiuser_use_ix (userid)
, KEY pu_00enroltiuser_too_ix (toolid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='User access log and gradeback data';
CREATE TABLE pu_00enrol_lti_lti2_consumer (
    id BIGINT(11) NOT NULL auto_increment,
    name VARCHAR(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    consumerkey256 VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    consumerkey LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    secret VARCHAR(1024) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    ltiversion VARCHAR(10) CHARACTER SET utf8 COLLATE utf8_general_ci,
    consumername VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    consumerversion VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    consumerguid VARCHAR(1024) CHARACTER SET utf8 COLLATE utf8_general_ci,
    profile LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    toolproxy LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    settings LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    protected TINYINT(1) NOT NULL,
    enabled TINYINT(1) NOT NULL,
    enablefrom BIGINT(10),
    enableuntil BIGINT(10),
    lastaccess BIGINT(10),
    created BIGINT(10) NOT NULL,
    updated BIGINT(10) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00enroltilti2cons_con_uix (consumerkey256)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Compressed
 COMMENT='LTI consumers interacting with moodle';
CREATE TABLE pu_00enrol_lti_lti2_tool_proxy (
    id BIGINT(11) NOT NULL auto_increment,
    toolproxykey VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    consumerid BIGINT(11) NOT NULL,
    toolproxy LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    created BIGINT(10) NOT NULL,
    updated BIGINT(10) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00enroltilti2toolprox_t_uix (toolproxykey)
, KEY pu_00enroltilti2toolprox_co_ix (consumerid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='A tool proxy between moodle and a consumer';
CREATE TABLE pu_00enrol_lti_lti2_context (
    id BIGINT(11) NOT NULL auto_increment,
    consumerid BIGINT(11) NOT NULL,
    lticontextkey VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    type VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci,
    settings LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    created BIGINT(10) NOT NULL,
    updated BIGINT(10) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00enroltilti2cont_con_ix (consumerid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Information about a specific LTI contexts from the consumers';
CREATE TABLE pu_00enrol_lti_lti2_nonce (
    id BIGINT(11) NOT NULL auto_increment,
    consumerid BIGINT(11) NOT NULL,
    value VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    expires BIGINT(10) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00enroltilti2nonc_con_ix (consumerid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Nonce used for authentication between moodle and a consumer';
CREATE TABLE pu_00enrol_lti_lti2_resource_link (
    id BIGINT(11) NOT NULL auto_increment,
    contextid BIGINT(11),
    consumerid BIGINT(11),
    ltiresourcelinkkey VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    settings LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    primaryresourcelinkid BIGINT(11),
    shareapproved TINYINT(1),
    created BIGINT(10) NOT NULL,
    updated BIGINT(10) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00enroltilti2resolink_co_ix (contextid)
, KEY pu_00enroltilti2resolink_pr_ix (primaryresourcelinkid)
, KEY pu_00enroltilti2resolink_c2_ix (consumerid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Link from the consumer to the tool';
CREATE TABLE pu_00enrol_lti_lti2_share_key (
    id BIGINT(11) NOT NULL auto_increment,
    sharekey VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    resourcelinkid BIGINT(11) NOT NULL,
    autoapprove TINYINT(1) NOT NULL,
    expires BIGINT(10) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00enroltilti2sharkey_sh_uix (sharekey)
, UNIQUE KEY pu_00enroltilti2sharkey_re_uix (resourcelinkid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Resource link share key';
CREATE TABLE pu_00enrol_lti_lti2_user_result (
    id BIGINT(11) NOT NULL auto_increment,
    resourcelinkid BIGINT(11) NOT NULL,
    ltiuserkey VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    ltiresultsourcedid VARCHAR(1024) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    created BIGINT(10) NOT NULL,
    updated BIGINT(10) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00enroltilti2userresu_re_ix (resourcelinkid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Results for each user for each resource link';
CREATE TABLE pu_00enrol_lti_tool_consumer_map (
    id BIGINT(10) NOT NULL auto_increment,
    toolid BIGINT(11) NOT NULL,
    consumerid BIGINT(11) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00enroltitoolconsmap_too_ix (toolid)
, KEY pu_00enroltitoolconsmap_con_ix (consumerid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Table that maps the published tool to tool consumers.';
CREATE TABLE pu_00enrol_paypal (
    id BIGINT(10) NOT NULL auto_increment,
    business VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    receiver_email VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    receiver_id VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    item_name VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    courseid BIGINT(10) NOT NULL DEFAULT 0,
    userid BIGINT(10) NOT NULL DEFAULT 0,
    instanceid BIGINT(10) NOT NULL DEFAULT 0,
    memo VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    tax VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    option_name1 VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    option_selection1_x VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    option_name2 VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    option_selection2_x VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    payment_status VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    pending_reason VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    reason_code VARCHAR(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    txn_id VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    parent_txn_id VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    payment_type VARCHAR(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    timeupdated BIGINT(10) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00enropayp_bus_ix (business)
, KEY pu_00enropayp_rec_ix (receiver_email)
, KEY pu_00enropayp_cou_ix (courseid)
, KEY pu_00enropayp_use_ix (userid)
, KEY pu_00enropayp_ins_ix (instanceid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Compressed
 COMMENT='Holds all known information about PayPal transactions';
CREATE TABLE pu_00enrol_totara_f2f_pending (
    id BIGINT(10) NOT NULL auto_increment,
    enrolid BIGINT(10) NOT NULL DEFAULT 0,
    userid BIGINT(10) NOT NULL DEFAULT 0,
    timecreated BIGINT(20) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00enrototaf2fpend_enr_ix (enrolid)
, KEY pu_00enrototaf2fpend_use_ix (userid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Queue for users waiting for f2f approval before enrolment';
CREATE TABLE pu_00message_popup (
    id BIGINT(10) NOT NULL auto_increment,
    messageid BIGINT(10) NOT NULL,
    isread TINYINT(1) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00messpopu_mesisr_uix (messageid, isread)
, KEY pu_00messpopu_isr_ix (isread)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Keep state of notifications for the popup message processor';
CREATE TABLE pu_00block_recent_activity (
    id BIGINT(10) NOT NULL auto_increment,
    courseid BIGINT(10) NOT NULL,
    cmid BIGINT(10) NOT NULL,
    timecreated BIGINT(10) NOT NULL,
    userid BIGINT(10) NOT NULL,
    action TINYINT(1) NOT NULL,
    modname VARCHAR(20) CHARACTER SET utf8 COLLATE utf8_general_ci,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00blocreceacti_coutim_ix (courseid, timecreated)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Recent activity block';
CREATE TABLE pu_00block_rss_client (
    id BIGINT(10) NOT NULL auto_increment,
    userid BIGINT(10) NOT NULL DEFAULT 0,
    title LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    preferredtitle VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    description LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    shared TINYINT(2) NOT NULL DEFAULT 0,
    url VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    skiptime BIGINT(10) NOT NULL DEFAULT 0,
    skipuntil BIGINT(10) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Remote news feed information. Contains the news feed id, the';
CREATE TABLE pu_00block_totara_featured_links_tiles (
    id BIGINT(10) NOT NULL auto_increment,
    blockid BIGINT(10) NOT NULL,
    type VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    sortorder BIGINT(10) NOT NULL DEFAULT 1,
    timecreated BIGINT(10) NOT NULL DEFAULT 0,
    timemodified BIGINT(10) DEFAULT 0,
    userid BIGINT(10),
    dataraw LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    visibility SMALLINT(4) DEFAULT 0,
    audienceaggregation SMALLINT(4) DEFAULT 0,
    presetsraw LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    presetsaggregation SMALLINT(4) DEFAULT 0,
    overallaggregation SMALLINT(4) DEFAULT 0,
    tilerules LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    audienceshowing TINYINT(1) DEFAULT 0,
    presetshowing TINYINT(1) DEFAULT 0,
    tilerulesshowing TINYINT(1) DEFAULT 0,
    parentid BIGINT(10) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00bloctotafeatlinktile_b_ix (blockid)
, KEY pu_00bloctotafeatlinktile_u_ix (userid)
, KEY pu_00bloctotafeatlinktile_p_ix (parentid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Defines tiles for Totara featured links blocks';
CREATE TABLE pu_00block_quicklinks (
    id BIGINT(10) NOT NULL auto_increment,
    userid BIGINT(10) NOT NULL,
    block_instance_id BIGINT(10) NOT NULL,
    title LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    url VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    displaypos SMALLINT(3) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00blocquic_blo_ix (block_instance_id)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Holds information on the defined links of a block';
CREATE TABLE pu_00block_totara_stats (
    id BIGINT(10) NOT NULL auto_increment,
    userid BIGINT(10) NOT NULL,
    timestamp BIGINT(10) NOT NULL,
    eventtype BIGINT(10) NOT NULL,
    data LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    data2 BIGINT(10) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00bloctotastat_usetimeve_ix (userid, timestamp, eventtype)
, KEY pu_00bloctotastat_tim_ix (timestamp)
, KEY pu_00bloctotastat_timeve_ix (timestamp, eventtype)
, KEY pu_00bloctotastat_useevedat_ix (userid, eventtype, data2)
, KEY pu_00bloctotastat_evedat_ix (eventtype, data2)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Holds stats information';
CREATE TABLE pu_00editor_atto_autosave (
    id BIGINT(10) NOT NULL auto_increment,
    elementid VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    contextid BIGINT(10) NOT NULL,
    pagehash VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    userid BIGINT(10) NOT NULL,
    drafttext LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    draftid BIGINT(10),
    pageinstance VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    timemodified BIGINT(10) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00editattoauto_eleconus_uix (elementid, contextid, userid, pagehash)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Draft text that is auto-saved every 5 seconds while an edito';
CREATE TABLE pu_00gradingform_guide_criteria (
    id BIGINT(10) NOT NULL auto_increment,
    definitionid BIGINT(10) NOT NULL,
    sortorder BIGINT(10) NOT NULL,
    shortname VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    description LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    descriptionformat TINYINT(2),
    descriptionmarkers LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    descriptionmarkersformat TINYINT(2),
    maxscore NUMERIC(10,5) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00gradguidcrit_def_ix (definitionid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Stores the rows of the criteria grid.';
CREATE TABLE pu_00gradingform_guide_fillings (
    id BIGINT(10) NOT NULL auto_increment,
    instanceid BIGINT(10) NOT NULL,
    criterionid BIGINT(10) NOT NULL,
    remark LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    remarkformat TINYINT(2),
    score NUMERIC(10,5) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00gradguidfill_ins_ix (instanceid)
, KEY pu_00gradguidfill_cri_ix (criterionid)
, UNIQUE KEY pu_00gradguidfill_inscri_uix (instanceid, criterionid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Stores the data of how the guide is filled by a particular r';
CREATE TABLE pu_00gradingform_guide_comments (
    id BIGINT(10) NOT NULL auto_increment,
    definitionid BIGINT(10) NOT NULL,
    sortorder BIGINT(10) NOT NULL,
    description LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    descriptionformat TINYINT(2),
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00gradguidcomm_def_ix (definitionid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='frequently used comments used in marking guide';
CREATE TABLE pu_00gradingform_rubric_criteria (
    id BIGINT(10) NOT NULL auto_increment,
    definitionid BIGINT(10) NOT NULL,
    sortorder BIGINT(10) NOT NULL,
    description LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    descriptionformat TINYINT(2),
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00gradrubrcrit_def_ix (definitionid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Stores the rows of the rubric grid.';
CREATE TABLE pu_00gradingform_rubric_levels (
    id BIGINT(10) NOT NULL auto_increment,
    criterionid BIGINT(10) NOT NULL,
    score NUMERIC(10,5) NOT NULL,
    definition LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    definitionformat BIGINT(10),
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00gradrubrleve_cri_ix (criterionid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Stores the columns of the rubric grid.';
CREATE TABLE pu_00gradingform_rubric_fillings (
    id BIGINT(10) NOT NULL auto_increment,
    instanceid BIGINT(10) NOT NULL,
    criterionid BIGINT(10) NOT NULL,
    levelid BIGINT(10),
    remark LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    remarkformat TINYINT(2),
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00gradrubrfill_lev_ix (levelid)
, KEY pu_00gradrubrfill_ins_ix (instanceid)
, KEY pu_00gradrubrfill_cri_ix (criterionid)
, UNIQUE KEY pu_00gradrubrfill_inscri_uix (instanceid, criterionid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Stores the data of how the rubric is filled by a particular ';
CREATE TABLE pu_00mnetservice_enrol_courses (
    id BIGINT(10) NOT NULL auto_increment,
    hostid BIGINT(10) NOT NULL,
    remoteid BIGINT(10) NOT NULL,
    categoryid BIGINT(10) NOT NULL,
    categoryname VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    sortorder BIGINT(10) NOT NULL DEFAULT 0,
    fullname VARCHAR(254) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    shortname VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    idnumber VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    summary LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    summaryformat SMALLINT(3) DEFAULT 0,
    startdate BIGINT(10) NOT NULL,
    roleid BIGINT(10) NOT NULL,
    rolename VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00mnetenrocour_hosrem_uix (hostid, remoteid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Caches the information fetched via XML-RPC about courses on ';
CREATE TABLE pu_00mnetservice_enrol_enrolments (
    id BIGINT(10) NOT NULL auto_increment,
    hostid BIGINT(10) NOT NULL,
    userid BIGINT(10) NOT NULL,
    remotecourseid BIGINT(10) NOT NULL,
    rolename VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    enroltime BIGINT(10) NOT NULL DEFAULT 0,
    enroltype VARCHAR(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00mnetenroenro_use_ix (userid)
, KEY pu_00mnetenroenro_hos_ix (hostid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Caches the information about enrolments of our local users i';
CREATE TABLE pu_00repository_opensesame_bdls (
    id BIGINT(10) NOT NULL auto_increment,
    name VARCHAR(1333) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    timecreated BIGINT(10) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Totara OpenSesame course bundles';
CREATE TABLE pu_00repository_opensesame_pkgs (
    id BIGINT(10) NOT NULL auto_increment,
    visible TINYINT(1) NOT NULL DEFAULT 1,
    zipfilename VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    title VARCHAR(1333) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    expirationdate VARCHAR(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    mobilecompatibility VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    externalid VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    description LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    duration VARCHAR(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    timecreated BIGINT(10) NOT NULL,
    timemodified BIGINT(10) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00repoopenpkgs_ext_uix (externalid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Totara OpenSesame course packages';
CREATE TABLE pu_00repository_opensesame_bps (
    id BIGINT(10) NOT NULL auto_increment,
    bundleid BIGINT(10) NOT NULL,
    packageid BIGINT(10) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00repoopenbps_bunpac_uix (bundleid, packageid)
, KEY pu_00repoopenbps_bun_ix (bundleid)
, KEY pu_00repoopenbps_pac_ix (packageid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Link an OpenSesame course to a bundle';
CREATE TABLE pu_00portfolio_mahara_queue (
    id BIGINT(10) NOT NULL auto_increment,
    transferid BIGINT(10) NOT NULL,
    token VARCHAR(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00portmahaqueu_tok_ix (token)
, KEY pu_00portmahaqueu_tra_ix (transferid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='maps mahara tokens to transfer ids';
CREATE TABLE pu_00appraisal (
    id BIGINT(10) NOT NULL auto_increment,
    name VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    description LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    status TINYINT(1) NOT NULL DEFAULT 0,
    timefinished BIGINT(10),
    timestarted BIGINT(10),
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00appr_nam_ix (name)
, KEY pu_00appr_sta_ix (status)
, KEY pu_00appr_tim_ix (timefinished)
, KEY pu_00appr_tim2_ix (timestarted)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Main appraisal table';
CREATE TABLE pu_00appraisal_stage (
    id BIGINT(10) NOT NULL auto_increment,
    appraisalid BIGINT(10) NOT NULL,
    name VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    description LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    timedue BIGINT(10),
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00apprstag_nam_ix (name)
, KEY pu_00apprstag_app_ix (appraisalid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Stages within appraisal';
CREATE TABLE pu_00appraisal_stage_page (
    id BIGINT(10) NOT NULL auto_increment,
    appraisalstageid BIGINT(10),
    name VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    sortorder BIGINT(10) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00apprstagpage_app_ix (appraisalstageid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Pages within appraisal stages. Each stage has at least one p';
CREATE TABLE pu_00appraisal_scale (
    id BIGINT(10) NOT NULL auto_increment,
    name VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    userid BIGINT(10) NOT NULL,
    scaletype BIGINT(10) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00apprscal_sca_ix (scaletype)
, KEY pu_00apprscal_use_ix (userid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Multiple choice sets';
CREATE TABLE pu_00appraisal_scale_value (
    id BIGINT(10) NOT NULL auto_increment,
    appraisalscaleid BIGINT(10) NOT NULL,
    name VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    score BIGINT(10),
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00apprscalvalu_appnamsc_uix (appraisalscaleid, name, score)
, KEY pu_00apprscalvalu_app_ix (appraisalscaleid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Multiple choice options (score can be used when applicable)';
CREATE TABLE pu_00appraisal_stage_role_setting (
    id BIGINT(10) NOT NULL auto_increment,
    appraisalstageid BIGINT(10) NOT NULL,
    appraisalrole SMALLINT(3) NOT NULL,
    locked TINYINT(1) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00apprstagrolesett_appa_uix (appraisalstageid, appraisalrole)
, KEY pu_00apprstagrolesett_app_ix (appraisalstageid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Role access settings for each stage. appraisalrole - APPRAIS';
CREATE TABLE pu_00appraisal_quest_field (
    id BIGINT(10) NOT NULL auto_increment,
    appraisalstagepageid BIGINT(10) NOT NULL,
    name VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    datatype VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    description LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    descriptionformat TINYINT(1),
    sortorder BIGINT(10) NOT NULL,
    defaultdata LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    defaultdataformat TINYINT(1),
    appraisalscaleid BIGINT(10),
    param1 LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    param2 LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    param3 LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    param4 LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    param5 LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00apprquesfiel_app_ix (appraisalstagepageid)
, KEY pu_00apprquesfiel_app2_ix (appraisalscaleid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Individual question list for appraisal page';
CREATE TABLE pu_00appraisal_quest_field_role (
    id BIGINT(10) NOT NULL auto_increment,
    appraisalquestfieldid BIGINT(10) NOT NULL,
    appraisalrole SMALLINT(3) NOT NULL,
    rights SMALLINT(3) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00apprquesfielrole_appa_uix (appraisalquestfieldid, appraisalrole)
, KEY pu_00apprquesfielrole_app_ix (appraisalquestfieldid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Access restrictions for each question. access - APPRAISAL_AC';
CREATE TABLE pu_00appraisal_grp_org (
    id BIGINT(10) NOT NULL auto_increment,
    appraisalid BIGINT(10) NOT NULL,
    orgid BIGINT(10) NOT NULL,
    includechildren TINYINT(1),
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00apprgrporg_app_ix (appraisalid)
, KEY pu_00apprgrporg_org_ix (orgid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Organisations assigned to appraisal';
CREATE TABLE pu_00appraisal_grp_pos (
    id BIGINT(10) NOT NULL auto_increment,
    appraisalid BIGINT(10) NOT NULL,
    posid BIGINT(10) NOT NULL,
    includechildren TINYINT(1),
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00apprgrppos_app_ix (appraisalid)
, KEY pu_00apprgrppos_pos_ix (posid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Positions assigned to appraisal';
CREATE TABLE pu_00appraisal_grp_cohort (
    id BIGINT(10) NOT NULL auto_increment,
    appraisalid BIGINT(10) NOT NULL,
    cohortid BIGINT(10) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00apprgrpcoho_app_ix (appraisalid)
, KEY pu_00apprgrpcoho_coh_ix (cohortid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Audiences assigned to appraisal';
CREATE TABLE pu_00appraisal_review_data (
    id BIGINT(10) NOT NULL auto_increment,
    appraisalquestfieldid BIGINT(10) NOT NULL,
    appraisalscalevalueid BIGINT(10) NOT NULL,
    appraisalroleassignmentid BIGINT(10) NOT NULL,
    itemid BIGINT(10) NOT NULL,
    scope TINYINT(1),
    content LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00apprrevidata_ite_ix (itemid)
, KEY pu_00apprrevidata_app_ix (appraisalquestfieldid)
, KEY pu_00apprrevidata_app2_ix (appraisalroleassignmentid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Course, objectives, etc reviews in appraisal';
CREATE TABLE pu_00appraisal_history (
    id BIGINT(10) NOT NULL auto_increment,
    userid BIGINT(10) NOT NULL,
    appraisalid BIGINT(10) NOT NULL,
    timecreated BIGINT(10) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00apprhist_use_ix (userid)
, KEY pu_00apprhist_app_ix (appraisalid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Appraisal access history';
CREATE TABLE pu_00appraisal_user_assignment (
    id BIGINT(10) NOT NULL auto_increment,
    userid BIGINT(10) NOT NULL,
    appraisalid BIGINT(10) NOT NULL,
    activestageid BIGINT(10),
    timecompleted BIGINT(10),
    status BIGINT(10) NOT NULL DEFAULT 0,
    jobassignmentid BIGINT(10),
    jobassignmentlastmodified BIGINT(18),
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00appruserassi_appuse_uix (appraisalid, userid)
, KEY pu_00appruserassi_use_ix (userid)
, KEY pu_00appruserassi_app_ix (appraisalid)
, KEY pu_00appruserassi_act_ix (activestageid)
, KEY pu_00appruserassi_job_ix (jobassignmentid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Actual user who is subject of appraisal';
CREATE TABLE pu_00appraisal_role_assignment (
    id BIGINT(10) NOT NULL auto_increment,
    appraisaluserassignmentid BIGINT(10) NOT NULL,
    userid BIGINT(10) NOT NULL,
    appraisalrole SMALLINT(3) NOT NULL,
    activepageid BIGINT(10),
    timecreated BIGINT(10) DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00apprroleassi_appuseap_uix (appraisaluserassignmentid, userid, appraisalrole)
, KEY pu_00apprroleassi_app_ix (appraisaluserassignmentid)
, KEY pu_00apprroleassi_use_ix (userid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Individual user assignments by their roles';
CREATE TABLE pu_00appraisal_stage_data (
    id BIGINT(10) NOT NULL auto_increment,
    appraisalroleassignmentid BIGINT(10) NOT NULL,
    appraisalstageid BIGINT(10) NOT NULL,
    timecompleted BIGINT(10) NOT NULL,
    usercompleted BIGINT(10),
    realusercompleted BIGINT(10),
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00apprstagdata_app_ix (appraisalroleassignmentid)
, KEY pu_00apprstagdata_app2_ix (appraisalstageid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Appraisal stage completion for each asiignment';
CREATE TABLE pu_00appraisal_scale_data (
    id BIGINT(10) NOT NULL auto_increment,
    appraisalscalevalueid BIGINT(10) NOT NULL,
    appraisalroleassignmentid BIGINT(10) NOT NULL,
    appraisalquestfieldid BIGINT(10) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00apprscaldata_app_ix (appraisalscalevalueid)
, KEY pu_00apprscaldata_app2_ix (appraisalroleassignmentid)
, KEY pu_00apprscaldata_app3_ix (appraisalquestfieldid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Multiple user answers';
CREATE TABLE pu_00appraisal_event (
    id BIGINT(10) NOT NULL auto_increment,
    appraisalid BIGINT(10) NOT NULL,
    appraisalstageid BIGINT(10) NOT NULL,
    event VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    delta BIGINT(10) NOT NULL DEFAULT 0,
    deltaperiod TINYINT(1) NOT NULL DEFAULT 0,
    triggered TINYINT(1) NOT NULL DEFAULT 0,
    stageiscompleted TINYINT(1) NOT NULL DEFAULT 0,
    timescheduled BIGINT(10),
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00appreven_eve_ix (event)
, KEY pu_00appreven_tim_ix (timescheduled)
, KEY pu_00appreven_app_ix (appraisalid)
, KEY pu_00appreven_app2_ix (appraisalstageid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Appraisal event notifications';
CREATE TABLE pu_00appraisal_event_message (
    id BIGINT(10) NOT NULL auto_increment,
    appraisaleventid BIGINT(10) NOT NULL,
    name VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    content LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00apprevenmess_app_ix (appraisaleventid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Appraisal event message';
CREATE TABLE pu_00appraisal_event_rcpt (
    id BIGINT(10) NOT NULL auto_increment,
    appraisalrole SMALLINT(3) NOT NULL,
    appraisaleventmessageid BIGINT(10) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00apprevenrcpt_app_ix (appraisaleventmessageid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Appraisal events recipients (roles)';
CREATE TABLE pu_00appraisal_role_changes (
    id BIGINT(10) NOT NULL auto_increment,
    userassignmentid BIGINT(10) NOT NULL,
    originaluserid BIGINT(10) NOT NULL,
    newuserid BIGINT(10),
    role SMALLINT(3),
    timecreated BIGINT(10) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Store role changes for assignments';
CREATE TABLE pu_00appraisal_user_event (
    id BIGINT(10) NOT NULL auto_increment,
    userid BIGINT(10) NOT NULL,
    eventid BIGINT(10) NOT NULL,
    timescheduled BIGINT(10) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00apprusereven_use_ix (userid)
, KEY pu_00apprusereven_eve_ix (eventid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Appraisal events scheduled to specific users';
CREATE TABLE pu_00catalog (
    id BIGINT(10) NOT NULL auto_increment,
    contextid BIGINT(10) NOT NULL,
    objectid BIGINT(10) NOT NULL,
    objecttype VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    ftshigh LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    ftsmedium LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    ftslow LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    sorttext LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    sorttime BIGINT(20) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Catalog table';
CREATE FULLTEXT INDEX pu_00cata_fts_fts ON pu_00catalog (ftshigh);
ALTER TABLE pu_00catalog MODIFY COLUMN ftshigh LONGTEXT COLLATE utf8_general_ci;
CREATE FULLTEXT INDEX pu_00cata_fts2_fts ON pu_00catalog (ftsmedium);
ALTER TABLE pu_00catalog MODIFY COLUMN ftsmedium LONGTEXT COLLATE utf8_general_ci;
CREATE FULLTEXT INDEX pu_00cata_fts3_fts ON pu_00catalog (ftslow);
ALTER TABLE pu_00catalog MODIFY COLUMN ftslow LONGTEXT COLLATE utf8_general_ci;
CREATE TABLE pu_00catalog_search_metadata (
    id BIGINT(10) NOT NULL auto_increment,
    value LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    instanceid BIGINT(10) NOT NULL,
    pluginname VARCHAR(20) CHARACTER SET utf8 COLLATE utf8_general_ci,
    plugintype VARCHAR(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    timecreated BIGINT(18) NOT NULL,
    usermodified BIGINT(18) NOT NULL,
    timemodified BIGINT(18),
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00catasearmeta_insplupl_uix (instanceid, pluginname, plugintype)
, KEY pu_00catasearmeta_ins_ix (instanceid)
, KEY pu_00catasearmeta_plu_ix (pluginname)
, KEY pu_00catasearmeta_plu2_ix (plugintype)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Search metadata table where the search metadata are being st';
CREATE TABLE pu_00certif (
    id BIGINT(10) NOT NULL auto_increment,
    learningcomptype TINYINT(2) NOT NULL,
    activeperiod VARCHAR(20) CHARACTER SET utf8 COLLATE utf8_general_ci,
    minimumactiveperiod VARCHAR(20) CHARACTER SET utf8 COLLATE utf8_general_ci,
    windowperiod VARCHAR(20) CHARACTER SET utf8 COLLATE utf8_general_ci,
    recertifydatetype TINYINT(1) NOT NULL,
    timemodified BIGINT(10) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Certifications';
CREATE TABLE pu_00certif_completion (
    id BIGINT(10) NOT NULL auto_increment,
    certifid BIGINT(10) NOT NULL,
    userid BIGINT(10) NOT NULL,
    certifpath TINYINT(2) NOT NULL,
    status TINYINT(2) NOT NULL,
    renewalstatus TINYINT(2) DEFAULT 0,
    timewindowopens BIGINT(10),
    timeexpires BIGINT(10),
    baselinetimeexpires BIGINT(10),
    timecompleted BIGINT(10),
    timemodified BIGINT(10) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00certcomp_cer_ix (certifid)
, KEY pu_00certcomp_use_ix (userid)
, UNIQUE KEY pu_00certcomp_ceruse_uix (certifid, userid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Certifications completed';
CREATE TABLE pu_00certif_completion_history (
    id BIGINT(10) NOT NULL auto_increment,
    certifid BIGINT(10) NOT NULL,
    userid BIGINT(10) NOT NULL,
    certifpath TINYINT(2) NOT NULL,
    status TINYINT(2) NOT NULL,
    renewalstatus TINYINT(2) DEFAULT 0,
    timewindowopens BIGINT(10),
    timeexpires BIGINT(10),
    baselinetimeexpires BIGINT(10),
    timecompleted BIGINT(10),
    timemodified BIGINT(10) NOT NULL,
    unassigned TINYINT(1) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00certcomphist_cer_ix (certifid)
, KEY pu_00certcomphist_use_ix (userid)
, UNIQUE KEY pu_00certcomphist_ceruseti_uix (certifid, userid, timecompleted, timeexpires)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Previous completed certifications';
CREATE TABLE pu_00course_completion_history (
    id BIGINT(10) NOT NULL auto_increment,
    courseid BIGINT(10) NOT NULL,
    userid BIGINT(10) NOT NULL,
    timecompleted BIGINT(10),
    grade NUMERIC(10,5),
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00courcomphist_use_ix (userid)
, KEY pu_00courcomphist_cou_ix (courseid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Course completion history archive';
CREATE TABLE pu_00cohort_rule_collections (
    id BIGINT(10) NOT NULL auto_increment,
    cohortid BIGINT(10) NOT NULL,
    rulesetoperator TINYINT(2) NOT NULL DEFAULT 0,
    addnewmembers TINYINT(1) NOT NULL DEFAULT 1,
    removeoldmembers TINYINT(1) NOT NULL DEFAULT 1,
    status BIGINT(10) NOT NULL,
    timecreated BIGINT(10) NOT NULL,
    timemodified BIGINT(10) NOT NULL,
    modifierid BIGINT(10) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00cohorulecoll_coh_ix (cohortid)
, KEY pu_00cohorulecoll_mod_ix (modifierid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Collections of rulesets & rules for a dynamic cohort';
CREATE TABLE pu_00cohort_rulesets (
    id BIGINT(10) NOT NULL auto_increment,
    rulecollectionid BIGINT(10) NOT NULL,
    name VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    operator BIGINT(10) NOT NULL,
    sortorder BIGINT(10),
    timecreated BIGINT(10) NOT NULL,
    timemodified BIGINT(10) NOT NULL,
    modifierid BIGINT(10) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00cohorule_rul_ix (rulecollectionid)
, KEY pu_00cohorule_mod_ix (modifierid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Rulesets for dynamic cohorts';
CREATE TABLE pu_00cohort_rules (
    id BIGINT(10) NOT NULL auto_increment,
    rulesetid BIGINT(10) NOT NULL,
    ruletype VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    name VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    sortorder BIGINT(10),
    timecreated BIGINT(10) NOT NULL,
    timemodified BIGINT(10) NOT NULL,
    modifierid BIGINT(10) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00cohorule_rul2_ix (rulesetid)
, KEY pu_00cohorule_mod2_ix (modifierid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Rules within a ruleset';
CREATE TABLE pu_00cohort_rule_params (
    id BIGINT(10) NOT NULL auto_increment,
    ruleid BIGINT(10) NOT NULL,
    name VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    value VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    timecreated BIGINT(10) NOT NULL,
    timemodified BIGINT(10) NOT NULL,
    modifierid BIGINT(10) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00cohorulepara_rul_ix (ruleid)
, KEY pu_00cohorulepara_mod_ix (modifierid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='The parameters of rules in cohort_rules';
CREATE TABLE pu_00cohort_msg_queue (
    id BIGINT(10) NOT NULL auto_increment,
    cohortid BIGINT(10) NOT NULL,
    userid BIGINT(10) NOT NULL,
    action VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    processed BIGINT(10) NOT NULL DEFAULT 0,
    timecreated BIGINT(10),
    timemodified BIGINT(10),
    modifierid BIGINT(10),
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00cohomsgqueu_cohact_ix (cohortid, action)
, KEY pu_00cohomsgqueu_coh_ix (cohortid)
, KEY pu_00cohomsgqueu_use_ix (userid)
, KEY pu_00cohomsgqueu_mod_ix (modifierid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='A table to store cohort member join/delete notifications, to';
CREATE TABLE pu_00cohort_plan_history (
    id BIGINT(10) NOT NULL auto_increment,
    cohortid BIGINT(10) NOT NULL,
    templateid BIGINT(10) NOT NULL,
    usercreated BIGINT(10),
    timecreated BIGINT(10),
    planstatus BIGINT(10) NOT NULL,
    affectedusers BIGINT(10) NOT NULL,
    manual TINYINT(1) NOT NULL DEFAULT 0,
    auto TINYINT(1) NOT NULL DEFAULT 0,
    completed TINYINT(1) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00cohoplanhist_coh_ix (cohortid)
, KEY pu_00cohoplanhist_tem_ix (templateid)
, KEY pu_00cohoplanhist_use_ix (usercreated)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='A table to store the history of plans created for cohorts.';
CREATE TABLE pu_00cohort_visibility (
    id BIGINT(10) NOT NULL auto_increment,
    cohortid BIGINT(10) NOT NULL DEFAULT 0,
    instanceid BIGINT(10) NOT NULL DEFAULT 0,
    instancetype SMALLINT(4),
    timemodified BIGINT(10),
    timecreated BIGINT(10),
    usermodified BIGINT(10),
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00cohovisi_cohinsins_uix (cohortid, instanceid, instancetype)
, KEY pu_00cohovisi_coh_ix (cohortid)
, KEY pu_00cohovisi_use_ix (usermodified)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='A table to store cohorts visible learning assignments';
CREATE TABLE pu_00cohort_role (
    id BIGINT(10) NOT NULL auto_increment,
    cohortid BIGINT(10) NOT NULL DEFAULT 0,
    roleid BIGINT(10) NOT NULL DEFAULT 0,
    contextid BIGINT(10) NOT NULL DEFAULT 0,
    timemodified BIGINT(10),
    timecreated BIGINT(10),
    usermodified BIGINT(10),
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00cohorole_cohrolcon_uix (cohortid, roleid, contextid)
, KEY pu_00cohorole_coh_ix (cohortid)
, KEY pu_00cohorole_rol_ix (roleid)
, KEY pu_00cohorole_use_ix (usermodified)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='A table to store roles assigned to a cohort';
CREATE TABLE pu_00cohort_plan_config (
    id BIGINT(10) NOT NULL auto_increment,
    cohortid BIGINT(10) NOT NULL,
    plantemplateid BIGINT(10) NOT NULL,
    planstatus BIGINT(10) NOT NULL,
    excludecreatedmanual TINYINT(1) NOT NULL DEFAULT 1,
    excludecreatedauto TINYINT(1) NOT NULL DEFAULT 1,
    excludecompleted TINYINT(1) NOT NULL DEFAULT 1,
    autocreatenew TINYINT(1) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00cohoplanconf_coh_ix (cohortid)
, KEY pu_00cohoplanconf_pla_ix (plantemplateid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='A table to store the config for plans to be created for coho';
CREATE TABLE pu_00course_completion_log (
    id BIGINT(10) NOT NULL auto_increment,
    courseid BIGINT(10) NOT NULL,
    userid BIGINT(10),
    changeuserid BIGINT(10),
    description LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    timemodified BIGINT(10) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00courcomplog_cou_ix (courseid)
, KEY pu_00courcomplog_use_ix (userid)
, KEY pu_00courcomplog_cha_ix (changeuserid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Record of changes made to course completion records';
CREATE TABLE pu_00totara_compl_import_course (
    id BIGINT(10) NOT NULL auto_increment,
    courseid BIGINT(10),
    username VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci,
    courseshortname VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    courseidnumber VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci,
    completiondate VARCHAR(10) CHARACTER SET utf8 COLLATE utf8_general_ci,
    grade VARCHAR(10) CHARACTER SET utf8 COLLATE utf8_general_ci,
    customfields LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    timecreated BIGINT(10) NOT NULL,
    timeupdated BIGINT(10) NOT NULL DEFAULT 0,
    importuserid BIGINT(10) NOT NULL,
    importerror TINYINT(1) NOT NULL DEFAULT 0,
    importerrormsg LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    rownumber BIGINT(10) NOT NULL,
    importevidence TINYINT(1) NOT NULL DEFAULT 0,
    evidenceid BIGINT(10),
    completiondateparsed BIGINT(10),
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00totacompimpocour_imp_ix (importuserid)
, KEY pu_00totacompimpocour_use_ix (username)
, KEY pu_00totacompimpocour_evi_ix (evidenceid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Intermediary file for importing course completion data';
CREATE TABLE pu_00totara_compl_import_cert (
    id BIGINT(10) NOT NULL auto_increment,
    certificationid BIGINT(10),
    username VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci,
    certificationshortname VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    certificationidnumber VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci,
    completiondate VARCHAR(10) CHARACTER SET utf8 COLLATE utf8_general_ci,
    customfields LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    timecreated BIGINT(10) NOT NULL,
    timeupdated BIGINT(10) NOT NULL DEFAULT 0,
    importuserid BIGINT(10) NOT NULL,
    importerror TINYINT(1) NOT NULL DEFAULT 0,
    importerrormsg LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    rownumber BIGINT(10) NOT NULL,
    importevidence TINYINT(1) NOT NULL DEFAULT 0,
    evidenceid BIGINT(10),
    completiondateparsed BIGINT(10),
    duedate VARCHAR(10) CHARACTER SET utf8 COLLATE utf8_general_ci,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00totacompimpocert_imp_ix (importuserid)
, KEY pu_00totacompimpocert_use_ix (username)
, KEY pu_00totacompimpocert_evi_ix (evidenceid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Intermediary file for importing certification completion dat';
CREATE TABLE pu_00totara_connect_clients (
    id BIGINT(10) NOT NULL auto_increment,
    status TINYINT(1) NOT NULL,
    clientidnumber VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    clientsecret VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    clienttype VARCHAR(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    clienturl VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    clientname VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    clientcomment LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    serversecret VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    cohortid BIGINT(10),
    syncprofilefields TINYINT(1) NOT NULL DEFAULT 0,
    addnewcohorts TINYINT(1) NOT NULL DEFAULT 0,
    addnewcourses TINYINT(1) NOT NULL DEFAULT 0,
    syncjobs TINYINT(1) NOT NULL DEFAULT 0,
    allowpluginsepservices TINYINT(1) NOT NULL DEFAULT 0,
    apiversion BIGINT(10) NOT NULL,
    timecreated BIGINT(10) NOT NULL,
    timemodified BIGINT(10) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00totaconnclie_cli_uix (clientidnumber)
, KEY pu_00totaconnclie_coh_ix (cohortid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='List of client systems registered with this server';
CREATE TABLE pu_00totara_connect_sso_sessions (
    id BIGINT(10) NOT NULL auto_increment,
    clientid BIGINT(10) NOT NULL,
    userid BIGINT(10) NOT NULL,
    sid VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    ssotoken VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    active TINYINT(1) NOT NULL DEFAULT 0,
    timecreated BIGINT(10) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00totaconnssosess_sso_uix (ssotoken)
, KEY pu_00totaconnssosess_cli_ix (clientid)
, KEY pu_00totaconnssosess_use_ix (userid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='List of all SSO sessions on client systems connect to this s';
CREATE TABLE pu_00totara_connect_client_cohorts (
    id BIGINT(10) NOT NULL auto_increment,
    clientid BIGINT(10) NOT NULL,
    cohortid BIGINT(10) NOT NULL,
    timecreated BIGINT(10) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00totaconncliecoho_clic_uix (clientid, cohortid)
, KEY pu_00totaconncliecoho_cli_ix (clientid)
, KEY pu_00totaconncliecoho_coh_ix (cohortid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='List of cohorts synced to a client, the members are restrict';
CREATE TABLE pu_00totara_connect_client_courses (
    id BIGINT(10) NOT NULL auto_increment,
    clientid BIGINT(10) NOT NULL,
    courseid BIGINT(10) NOT NULL,
    timecreated BIGINT(10) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00totaconncliecour_clic_uix (clientid, courseid)
, KEY pu_00totaconncliecour_cli_ix (clientid)
, KEY pu_00totaconncliecour_cou_ix (courseid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='List of courses synced to a client, the enrolled users are r';
CREATE TABLE pu_00totara_connect_client_pos_frameworks (
    id BIGINT(10) NOT NULL auto_increment,
    clientid BIGINT(10) NOT NULL,
    fid BIGINT(10) NOT NULL,
    timecreated BIGINT(10) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00totaconnclieposfram_c_uix (clientid, fid)
, KEY pu_00totaconnclieposfram_cl_ix (clientid)
, KEY pu_00totaconnclieposfram_fi_ix (fid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='List of position frameworks synced to a client';
CREATE TABLE pu_00totara_connect_client_org_frameworks (
    id BIGINT(10) NOT NULL auto_increment,
    clientid BIGINT(10) NOT NULL,
    fid BIGINT(10) NOT NULL,
    timecreated BIGINT(10) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00totaconnclieorgfram_c_uix (clientid, fid)
, KEY pu_00totaconnclieorgfram_cl_ix (clientid)
, KEY pu_00totaconnclieorgfram_fi_ix (fid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='List of organisation frameworks synced to a client';
CREATE TABLE pu_00totara_dashboard (
    id BIGINT(10) NOT NULL auto_increment,
    name VARCHAR(1333) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    published TINYINT(1) NOT NULL DEFAULT 0,
    allowguest TINYINT(1) NOT NULL DEFAULT 0,
    locked TINYINT(1) NOT NULL DEFAULT 0,
    tenantid BIGINT(10),
    sortorder BIGINT(10) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id),
CONSTRAINT pu_00totara_dashboard_tenantid_fk FOREIGN KEY (tenantid) REFERENCES pu_00tenant (id) ON DELETE RESTRICT ON UPDATE RESTRICT
, KEY pu_00totadash_pub_ix (published)
, KEY pu_00totadash_sor_ix (sortorder)
, KEY pu_00totadash_ten_ix (tenantid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Dashboards';
CREATE TABLE pu_00totara_dashboard_user (
    id BIGINT(10) NOT NULL auto_increment,
    userid BIGINT(10) NOT NULL,
    dashboardid BIGINT(10) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00totadashuser_use_ix (userid)
, KEY pu_00totadashuser_das_ix (dashboardid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='User modified instances of dashboards';
CREATE TABLE pu_00totara_dashboard_cohort (
    id BIGINT(10) NOT NULL auto_increment,
    dashboardid BIGINT(10) NOT NULL,
    cohortid BIGINT(10) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00totadashcoho_das_ix (dashboardid)
, KEY pu_00totadashcoho_coh_ix (cohortid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Users modifications of pages';
CREATE TABLE pu_00feedback360 (
    id BIGINT(10) NOT NULL auto_increment,
    name VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    description LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    status TINYINT(1) NOT NULL DEFAULT 0,
    userid BIGINT(10) NOT NULL,
    recipients INT(8) NOT NULL DEFAULT 0,
    anonymous TINYINT(1) NOT NULL DEFAULT 0,
    selfevaluation TINYINT(2) NOT NULL DEFAULT 1,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00feed_nam_ix (name)
, KEY pu_00feed_use_ix (userid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='360 feedback360 form (recipients - feedback360_RECIPIENT_* b';
CREATE TABLE pu_00feedback360_quest_field (
    id BIGINT(10) NOT NULL auto_increment,
    feedback360id BIGINT(10) NOT NULL,
    name VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    datatype VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    description LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    descriptionformat TINYINT(1),
    sortorder BIGINT(10) NOT NULL,
    required TINYINT(1) NOT NULL DEFAULT 0,
    defaultdata LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    defaultdataformat TINYINT(1),
    param1 LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    param2 LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    param3 LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    param4 LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    param5 LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00feedquesfiel_nam_ix (name)
, KEY pu_00feedquesfiel_sor_ix (sortorder)
, KEY pu_00feedquesfiel_fee_ix (feedback360id)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Individual question definitions for each feedback360';
CREATE TABLE pu_00feedback360_grp_org (
    id BIGINT(10) NOT NULL auto_increment,
    feedback360id BIGINT(10) NOT NULL,
    orgid BIGINT(10) NOT NULL,
    includechildren TINYINT(1),
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00feedgrporg_fee_ix (feedback360id)
, KEY pu_00feedgrporg_org_ix (orgid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Organisations assigned to feedback360';
CREATE TABLE pu_00feedback360_grp_pos (
    id BIGINT(10) NOT NULL auto_increment,
    feedback360id BIGINT(10) NOT NULL,
    posid BIGINT(10) NOT NULL,
    includechildren TINYINT(1),
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00feedgrppos_fee_ix (feedback360id)
, KEY pu_00feedgrppos_pos_ix (posid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Positions assigned to feedback360';
CREATE TABLE pu_00feedback360_grp_cohort (
    id BIGINT(10) NOT NULL auto_increment,
    feedback360id BIGINT(10) NOT NULL,
    cohortid BIGINT(10) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00feedgrpcoho_fee_ix (feedback360id)
, KEY pu_00feedgrpcoho_coh_ix (cohortid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Audiences assigned to feedback360';
CREATE TABLE pu_00feedback360_user_assignment (
    id BIGINT(10) NOT NULL auto_increment,
    feedback360id BIGINT(10) NOT NULL,
    userid BIGINT(10) NOT NULL,
    timedue BIGINT(10) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00feeduserassi_use_ix (userid)
, KEY pu_00feeduserassi_fee_ix (feedback360id)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Actual user who is subject of feedback360';
CREATE TABLE pu_00feedback360_resp_assignment (
    id BIGINT(10) NOT NULL auto_increment,
    feedback360userassignmentid BIGINT(10) NOT NULL,
    userid BIGINT(10) NOT NULL,
    timeassigned BIGINT(10) NOT NULL,
    timecompleted BIGINT(10) NOT NULL DEFAULT 0,
    viewed TINYINT(1) NOT NULL DEFAULT 0,
    feedback360emailassignmentid BIGINT(10),
    requestertoken VARCHAR(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00feedrespassi_use_ix (userid)
, KEY pu_00feedrespassi_fee_ix (feedback360userassignmentid)
, KEY pu_00feedrespassi_fee2_ix (feedback360emailassignmentid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='feedback360 responders assignments';
CREATE TABLE pu_00feedback360_email_assignment (
    id BIGINT(10) NOT NULL auto_increment,
    email VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    token VARCHAR(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
CONSTRAINT  PRIMARY KEY (id)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Email addresses for feedback360';
CREATE TABLE pu_00feedback360_scale (
    id BIGINT(10) NOT NULL auto_increment,
    feedback360questfieldid BIGINT(10),
    name VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    userid BIGINT(10) NOT NULL,
    scaletype TINYINT(2) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00feedscal_sca_ix (scaletype)
, KEY pu_00feedscal_use_ix (userid)
, KEY pu_00feedscal_fee_ix (feedback360questfieldid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Multiple choice sets';
CREATE TABLE pu_00feedback360_scale_value (
    id BIGINT(10) NOT NULL auto_increment,
    feedback360scaleid BIGINT(10) NOT NULL,
    name VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    score BIGINT(10),
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00feedscalvalu_feenamsc_uix (feedback360scaleid, name, score)
, KEY pu_00feedscalvalu_fee_ix (feedback360scaleid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Multiple choice options (score can be used when applicable)';
CREATE TABLE pu_00feedback360_scale_data (
    id BIGINT(10) NOT NULL auto_increment,
    feedback360scalevalueid BIGINT(10) NOT NULL,
    feedback360respassignmentid BIGINT(10) NOT NULL,
    feedback360questfieldid BIGINT(10) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00feedscaldata_fee_ix (feedback360scalevalueid)
, KEY pu_00feedscaldata_fee2_ix (feedback360respassignmentid)
, KEY pu_00feedscaldata_fee3_ix (feedback360questfieldid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Multiple user answers';
CREATE TABLE pu_00comp (
    id BIGINT(10) NOT NULL auto_increment,
    shortname VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci,
    description LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    idnumber VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci,
    frameworkid BIGINT(18) NOT NULL,
    path VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    parentid BIGINT(18) NOT NULL,
    visible TINYINT(2) NOT NULL,
    aggregationmethod TINYINT(2) NOT NULL,
    proficiencyexpected BIGINT(18) NOT NULL,
    evidencecount BIGINT(18) NOT NULL,
    timecreated BIGINT(18) NOT NULL,
    timemodified BIGINT(18) NOT NULL,
    usermodified BIGINT(18) NOT NULL,
    fullname VARCHAR(1024) CHARACTER SET utf8 COLLATE utf8_general_ci,
    depthlevel BIGINT(18),
    typeid BIGINT(18) NOT NULL DEFAULT 0,
    sortthread VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    totarasync TINYINT(1) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00comp_par_ix (parentid)
, KEY pu_00comp_typ_ix (typeid)
, KEY pu_00comp_fra_ix (frameworkid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Totara competencies';
CREATE TABLE pu_00comp_record (
    id BIGINT(10) NOT NULL auto_increment,
    userid BIGINT(18) NOT NULL,
    competencyid BIGINT(18) NOT NULL,
    positionid BIGINT(18),
    organisationid BIGINT(18),
    assessorid BIGINT(18),
    assessorname VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci,
    assessmenttype VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci,
    proficiency BIGINT(18),
    timeproficient BIGINT(18),
    timecreated BIGINT(18) NOT NULL,
    timemodified BIGINT(18) NOT NULL,
    reaggregate BIGINT(18) NOT NULL DEFAULT 0,
    manual TINYINT(2) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00compreco_usecom_uix (userid, competencyid)
, KEY pu_00compreco_man_ix (manual)
, KEY pu_00compreco_rea_ix (reaggregate)
, KEY pu_00compreco_use_ix (userid)
, KEY pu_00compreco_com_ix (competencyid)
, KEY pu_00compreco_pos_ix (positionid)
, KEY pu_00compreco_org_ix (organisationid)
, KEY pu_00compreco_ass_ix (assessorid)
, KEY pu_00compreco_pro_ix (proficiency)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Track current proficiency of a user in each competency';
CREATE TABLE pu_00comp_record_history (
    id BIGINT(10) NOT NULL auto_increment,
    userid BIGINT(18) NOT NULL,
    competencyid BIGINT(18) NOT NULL,
    proficiency BIGINT(18),
    timeproficient BIGINT(18),
    timemodified BIGINT(18) NOT NULL,
    usermodified BIGINT(18) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00comprecohist_usecom_ix (userid, competencyid)
, KEY pu_00comprecohist_use_ix (userid)
, KEY pu_00comprecohist_com_ix (competencyid)
, KEY pu_00comprecohist_pro_ix (proficiency)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Store changes to proficiency in comp_record.';
CREATE TABLE pu_00comp_criteria (
    id BIGINT(10) NOT NULL auto_increment,
    competencyid BIGINT(18) NOT NULL,
    itemtype VARCHAR(30) CHARACTER SET utf8 COLLATE utf8_general_ci,
    itemmodule VARCHAR(30) CHARACTER SET utf8 COLLATE utf8_general_ci,
    iteminstance BIGINT(18) NOT NULL,
    timecreated BIGINT(18) NOT NULL,
    timemodified BIGINT(18) NOT NULL,
    usermodified BIGINT(18) NOT NULL,
    linktype TINYINT(2) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00compcrit_ite_ix (iteminstance)
, KEY pu_00compcrit_ite2_ix (itemtype)
, KEY pu_00compcrit_com_ix (competencyid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='A competency can be achieved by one or more forms of evidenc';
CREATE TABLE pu_00comp_criteria_record (
    id BIGINT(10) NOT NULL auto_increment,
    userid BIGINT(18) NOT NULL,
    competencyid BIGINT(18) NOT NULL,
    itemid BIGINT(18) NOT NULL,
    status TINYINT(2),
    proficiencymeasured BIGINT(18),
    timecreated BIGINT(18) NOT NULL,
    timemodified BIGINT(18) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00compcritreco_usecomit_uix (userid, competencyid, itemid)
, KEY pu_00compcritreco_pro_ix (proficiencymeasured)
, KEY pu_00compcritreco_tim_ix (timemodified)
, KEY pu_00compcritreco_useite_ix (userid, itemid)
, KEY pu_00compcritreco_use_ix (userid)
, KEY pu_00compcritreco_com_ix (competencyid)
, KEY pu_00compcritreco_ite_ix (itemid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Tracks historical progress towards a competency for each use';
CREATE TABLE pu_00comp_framework (
    id BIGINT(10) NOT NULL auto_increment,
    shortname VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci,
    idnumber VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci,
    description LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    sortorder BIGINT(18) NOT NULL,
    visible TINYINT(2) NOT NULL,
    hidecustomfields TINYINT(2) NOT NULL,
    timecreated BIGINT(18) NOT NULL,
    timemodified BIGINT(18) NOT NULL,
    usermodified BIGINT(18) NOT NULL,
    fullname VARCHAR(1024) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00compfram_sor_uix (sortorder)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='A collection of competencies that use a common competency sc';
CREATE TABLE pu_00comp_relations (
    id BIGINT(10) NOT NULL auto_increment,
    description LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    id1 BIGINT(18) NOT NULL,
    id2 BIGINT(18) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Tracks relationships between competencies';
CREATE TABLE pu_00comp_scale (
    id BIGINT(10) NOT NULL auto_increment,
    name VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    description LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    timemodified BIGINT(18) NOT NULL,
    usermodified BIGINT(18) NOT NULL,
    defaultid BIGINT(10),
    minproficiencyid BIGINT(10),
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00compscal_def_ix (defaultid)
, KEY pu_00compscal_min_ix (minproficiencyid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Competency scale represents the different levels of achievem';
CREATE TABLE pu_00comp_scale_assignments (
    id BIGINT(10) NOT NULL auto_increment,
    scaleid BIGINT(18) NOT NULL,
    frameworkid BIGINT(18) NOT NULL,
    timemodified BIGINT(18) NOT NULL,
    usermodified BIGINT(18) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00compscalassi_sca_ix (scaleid)
, KEY pu_00compscalassi_fra_ix (frameworkid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Tracks which scales are assigned to which competency framewo';
CREATE TABLE pu_00comp_scale_values (
    id BIGINT(10) NOT NULL auto_increment,
    name LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    idnumber VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci,
    description LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    scaleid BIGINT(18) NOT NULL,
    numericscore NUMERIC(10,5),
    sortorder BIGINT(18) NOT NULL,
    timemodified BIGINT(18) NOT NULL,
    usermodified BIGINT(18) NOT NULL,
    proficient TINYINT(2) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00compscalvalu_sca_ix (scaleid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='The individual values that make up a competency scale';
CREATE TABLE pu_00comp_template (
    id BIGINT(10) NOT NULL auto_increment,
    frameworkid BIGINT(18) NOT NULL,
    fullname LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    shortname VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci,
    description LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    visible TINYINT(2) NOT NULL,
    competencycount BIGINT(18) NOT NULL,
    timecreated BIGINT(18) NOT NULL,
    timemodified BIGINT(18) NOT NULL,
    usermodified BIGINT(18) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00comptemp_fra_ix (frameworkid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='A template is used to group competencies';
CREATE TABLE pu_00comp_template_assignment (
    id BIGINT(10) NOT NULL auto_increment,
    templateid BIGINT(18) NOT NULL,
    type TINYINT(2) NOT NULL,
    instanceid BIGINT(18) NOT NULL,
    timecreated BIGINT(18) NOT NULL,
    usermodified BIGINT(18) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00comptempassi_tem_ix (templateid)
, KEY pu_00comptempassi_ins_ix (instanceid)
, KEY pu_00comptempassi_use_ix (usermodified)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Track competencies belonging to a template';
CREATE TABLE pu_00comp_type (
    id BIGINT(10) NOT NULL auto_increment,
    shortname VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci,
    description LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    timecreated BIGINT(18) NOT NULL,
    timemodified BIGINT(18) NOT NULL,
    usermodified BIGINT(18) NOT NULL,
    fullname VARCHAR(1024) CHARACTER SET utf8 COLLATE utf8_general_ci,
    idnumber VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00comptype_idn_ix (idnumber)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Competency types are used to manage custom fields';
CREATE TABLE pu_00comp_type_info_data (
    id BIGINT(10) NOT NULL auto_increment,
    data LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    fieldid BIGINT(18) NOT NULL,
    competencyid BIGINT(18) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00comptypeinfodata_fiec_uix (fieldid, competencyid)
, KEY pu_00comptypeinfodata_fie_ix (fieldid)
, KEY pu_00comptypeinfodata_com_ix (competencyid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Stores custom field data related to competencies';
CREATE TABLE pu_00comp_type_info_data_param (
    id BIGINT(10) NOT NULL auto_increment,
    dataid BIGINT(10) NOT NULL,
    value VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00comptypeinfodatapara_v_ix (value)
, KEY pu_00comptypeinfodatapara_d_ix (dataid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Custom competencies fields data parameters';
CREATE TABLE pu_00comp_type_info_field (
    id BIGINT(10) NOT NULL auto_increment,
    shortname VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci,
    typeid BIGINT(18) NOT NULL,
    datatype VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    description LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    sortorder BIGINT(18) NOT NULL,
    hidden TINYINT(2) NOT NULL,
    locked TINYINT(2) NOT NULL,
    required TINYINT(2) NOT NULL,
    forceunique TINYINT(2) NOT NULL,
    defaultdata LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    param1 LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    param2 LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    param3 LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    param4 LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    param5 LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    fullname VARCHAR(1024) CHARACTER SET utf8 COLLATE utf8_general_ci,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00comptypeinfofiel_typ_ix (typeid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Compressed
 COMMENT='Stores the custom fields for each competency type';
CREATE TABLE pu_00pos (
    id BIGINT(10) NOT NULL auto_increment,
    shortname VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci,
    idnumber VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci,
    description LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    frameworkid BIGINT(18) NOT NULL,
    path VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    visible TINYINT(2) NOT NULL,
    timevalidfrom BIGINT(18),
    timevalidto BIGINT(18),
    timecreated BIGINT(18) NOT NULL,
    timemodified BIGINT(18) NOT NULL,
    usermodified BIGINT(18) NOT NULL,
    fullname VARCHAR(1024) CHARACTER SET utf8 COLLATE utf8_general_ci,
    parentid BIGINT(18) NOT NULL,
    depthlevel BIGINT(18),
    typeid BIGINT(18) NOT NULL DEFAULT 0,
    sortthread VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    totarasync TINYINT(1) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00pos_tot_ix (totarasync)
, KEY pu_00pos_fra_ix (frameworkid)
, KEY pu_00pos_typ_ix (typeid)
, KEY pu_00pos_par_ix (parentid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Totara positions';
CREATE TABLE pu_00pos_competencies (
    id BIGINT(10) NOT NULL auto_increment,
    positionid BIGINT(18) NOT NULL,
    competencyid BIGINT(18),
    templateid BIGINT(18),
    timecreated BIGINT(18) NOT NULL,
    usermodified BIGINT(18) NOT NULL,
    linktype TINYINT(2) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00poscomp_pos_ix (positionid)
, KEY pu_00poscomp_com_ix (competencyid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Tracks competencies assigned to a particular position';
CREATE TABLE pu_00pos_framework (
    id BIGINT(10) NOT NULL auto_increment,
    shortname VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci,
    idnumber VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci,
    description LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    sortorder BIGINT(18) NOT NULL,
    timecreated BIGINT(18) NOT NULL,
    timemodified BIGINT(18) NOT NULL,
    usermodified BIGINT(18) NOT NULL,
    visible TINYINT(2) NOT NULL,
    hidecustomfields TINYINT(2) NOT NULL,
    fullname VARCHAR(1024) CHARACTER SET utf8 COLLATE utf8_general_ci,
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00posfram_sor_uix (sortorder)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='A collection of positions';
CREATE TABLE pu_00pos_relations (
    id BIGINT(10) NOT NULL auto_increment,
    description LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    id1 BIGINT(18) NOT NULL,
    id2 BIGINT(18) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Tracks relationships between positions';
CREATE TABLE pu_00pos_type (
    id BIGINT(10) NOT NULL auto_increment,
    shortname VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci,
    description LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    timecreated BIGINT(18) NOT NULL,
    timemodified BIGINT(18) NOT NULL,
    usermodified BIGINT(18) NOT NULL,
    fullname VARCHAR(1024) CHARACTER SET utf8 COLLATE utf8_general_ci,
    idnumber VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00postype_idn_ix (idnumber)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Position types are used to manage custom fields';
CREATE TABLE pu_00pos_type_info_data (
    id BIGINT(10) NOT NULL auto_increment,
    fieldid BIGINT(18) NOT NULL,
    positionid BIGINT(18) NOT NULL,
    data LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00postypeinfodata_fiepo_uix (fieldid, positionid)
, KEY pu_00postypeinfodata_fie_ix (fieldid)
, KEY pu_00postypeinfodata_pos_ix (positionid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Stores custom field data related to positions';
CREATE TABLE pu_00pos_type_info_data_param (
    id BIGINT(10) NOT NULL auto_increment,
    dataid BIGINT(10) NOT NULL,
    value VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00postypeinfodatapara_va_ix (value)
, KEY pu_00postypeinfodatapara_da_ix (dataid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Custom positions fields data parameters';
CREATE TABLE pu_00pos_type_info_field (
    id BIGINT(10) NOT NULL auto_increment,
    shortname VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    typeid BIGINT(18),
    datatype VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    description LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    sortorder BIGINT(18) NOT NULL,
    hidden TINYINT(2) NOT NULL,
    locked TINYINT(2) NOT NULL,
    required TINYINT(2) NOT NULL,
    forceunique TINYINT(2) NOT NULL,
    defaultdata LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    param1 LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    param2 LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    param3 LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    param4 LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    param5 LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    fullname VARCHAR(1024) CHARACTER SET utf8 COLLATE utf8_general_ci,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00postypeinfofiel_typ_ix (typeid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Compressed
 COMMENT='Stores the custom fields for each position type';
CREATE TABLE pu_00org (
    id BIGINT(10) NOT NULL auto_increment,
    shortname VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci,
    description LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    idnumber VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci,
    frameworkid BIGINT(18) NOT NULL,
    path VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    parentid BIGINT(18) NOT NULL,
    visible TINYINT(2) NOT NULL,
    timecreated BIGINT(18) NOT NULL,
    timemodified BIGINT(18) NOT NULL,
    usermodified BIGINT(18) NOT NULL,
    fullname VARCHAR(1024) CHARACTER SET utf8 COLLATE utf8_general_ci,
    depthlevel BIGINT(18),
    typeid BIGINT(18) NOT NULL DEFAULT 0,
    sortthread VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    totarasync TINYINT(1) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00org_tot_ix (totarasync)
, KEY pu_00org_fra_ix (frameworkid)
, KEY pu_00org_par_ix (parentid)
, KEY pu_00org_typ_ix (typeid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Totara organisations';
CREATE TABLE pu_00org_competencies (
    id BIGINT(10) NOT NULL auto_increment,
    organisationid BIGINT(18) NOT NULL,
    competencyid BIGINT(18),
    templateid BIGINT(18),
    timecreated BIGINT(18) NOT NULL,
    usermodified BIGINT(18) NOT NULL,
    linktype TINYINT(2) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00orgcomp_org_ix (organisationid)
, KEY pu_00orgcomp_com_ix (competencyid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Track competencies assigned to a particular organisation';
CREATE TABLE pu_00org_framework (
    id BIGINT(10) NOT NULL auto_increment,
    shortname VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci,
    idnumber VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci,
    description LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    sortorder BIGINT(18) NOT NULL,
    visible TINYINT(2) NOT NULL,
    hidecustomfields TINYINT(2) NOT NULL,
    timecreated BIGINT(18) NOT NULL,
    timemodified BIGINT(18) NOT NULL,
    usermodified BIGINT(18) NOT NULL,
    fullname VARCHAR(1024) CHARACTER SET utf8 COLLATE utf8_general_ci,
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00orgfram_sor_uix (sortorder)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='A collection of organisations';
CREATE TABLE pu_00org_relations (
    id BIGINT(10) NOT NULL auto_increment,
    description LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    id1 BIGINT(18) NOT NULL,
    id2 BIGINT(18) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00orgrela_id1_ix (id1)
, KEY pu_00orgrela_id2_ix (id2)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Tracks relationships between organisations';
CREATE TABLE pu_00org_type (
    id BIGINT(10) NOT NULL auto_increment,
    shortname VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci,
    description LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    timecreated BIGINT(18) NOT NULL,
    timemodified BIGINT(18) NOT NULL,
    usermodified BIGINT(18) NOT NULL,
    fullname VARCHAR(1024) CHARACTER SET utf8 COLLATE utf8_general_ci,
    idnumber VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00orgtype_idn_ix (idnumber)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Organisation types are used to manage custom fields';
CREATE TABLE pu_00org_type_info_data (
    id BIGINT(10) NOT NULL auto_increment,
    data LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    fieldid BIGINT(18) NOT NULL,
    organisationid BIGINT(18) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00orgtypeinfodata_fieor_uix (fieldid, organisationid)
, KEY pu_00orgtypeinfodata_fie_ix (fieldid)
, KEY pu_00orgtypeinfodata_org_ix (organisationid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Stores custom field data related to organisations';
CREATE TABLE pu_00org_type_info_data_param (
    id BIGINT(10) NOT NULL auto_increment,
    dataid BIGINT(10) NOT NULL,
    value VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00orgtypeinfodatapara_va_ix (value)
, KEY pu_00orgtypeinfodatapara_da_ix (dataid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Custom organisations fields data parameters';
CREATE TABLE pu_00org_type_info_field (
    id BIGINT(10) NOT NULL auto_increment,
    shortname VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci,
    typeid BIGINT(18) NOT NULL,
    datatype VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    description LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    sortorder BIGINT(18) NOT NULL,
    hidden TINYINT(2) NOT NULL,
    locked TINYINT(2) NOT NULL,
    required TINYINT(2) NOT NULL,
    forceunique TINYINT(2) NOT NULL,
    defaultdata LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    param1 LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    param2 LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    param3 LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    param4 LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    param5 LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    fullname VARCHAR(1024) CHARACTER SET utf8 COLLATE utf8_general_ci,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00orgtypeinfofiel_typ_ix (typeid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Compressed
 COMMENT='Stores the custom fields for each organisation type';
CREATE TABLE pu_00goal (
    id BIGINT(10) NOT NULL auto_increment,
    shortname VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci,
    description LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    idnumber VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci,
    frameworkid BIGINT(18) NOT NULL,
    path VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    parentid BIGINT(18) NOT NULL,
    visible TINYINT(2) NOT NULL,
    targetdate BIGINT(18),
    proficiencyexpected BIGINT(18) NOT NULL,
    timecreated BIGINT(18) NOT NULL,
    timemodified BIGINT(18) NOT NULL,
    usermodified BIGINT(18) NOT NULL,
    fullname VARCHAR(1024) CHARACTER SET utf8 COLLATE utf8_general_ci,
    depthlevel BIGINT(18),
    typeid BIGINT(18) NOT NULL DEFAULT 0,
    sortthread VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00goal_fra_ix (frameworkid)
, KEY pu_00goal_par_ix (parentid)
, KEY pu_00goal_typ_ix (typeid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Totara goals';
CREATE TABLE pu_00goal_framework (
    id BIGINT(10) NOT NULL auto_increment,
    shortname VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci,
    idnumber VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci,
    description LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    sortorder BIGINT(18) NOT NULL,
    visible TINYINT(2) NOT NULL,
    hidecustomfields TINYINT(2) NOT NULL,
    timecreated BIGINT(18) NOT NULL,
    timemodified BIGINT(18) NOT NULL,
    usermodified BIGINT(18) NOT NULL,
    fullname VARCHAR(1024) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00goalfram_sor_uix (sortorder)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='A collection of goals';
CREATE TABLE pu_00goal_scale (
    id BIGINT(10) NOT NULL auto_increment,
    name VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    description LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    timemodified BIGINT(18) NOT NULL,
    usermodified BIGINT(18) NOT NULL,
    defaultid BIGINT(10),
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00goalscal_def_ix (defaultid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Scale represents the different levels of achievement of a go';
CREATE TABLE pu_00goal_scale_assignments (
    id BIGINT(10) NOT NULL auto_increment,
    scaleid BIGINT(18) NOT NULL,
    frameworkid BIGINT(18) NOT NULL,
    timemodified BIGINT(18) NOT NULL,
    usermodified BIGINT(18) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00goalscalassi_sca_ix (scaleid)
, KEY pu_00goalscalassi_fra_ix (frameworkid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Tracks which scales are assigned to which goal frameworks';
CREATE TABLE pu_00goal_scale_values (
    id BIGINT(10) NOT NULL auto_increment,
    name LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    idnumber VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci,
    description LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    scaleid BIGINT(18) NOT NULL,
    numericscore NUMERIC(10,5),
    sortorder BIGINT(18) NOT NULL,
    timemodified BIGINT(18) NOT NULL,
    usermodified BIGINT(18) NOT NULL,
    proficient TINYINT(2) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00goalscalvalu_idn_ix (idnumber)
, KEY pu_00goalscalvalu_sca_ix (scaleid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='The individual values that make up a goal scale';
CREATE TABLE pu_00goal_record (
    id BIGINT(10) NOT NULL auto_increment,
    userid BIGINT(18) NOT NULL,
    goalid BIGINT(18) NOT NULL,
    scalevalueid BIGINT(18),
    deleted TINYINT(1) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00goalreco_use_ix (userid)
, KEY pu_00goalreco_goa_ix (goalid)
, KEY pu_00goalreco_sca_ix (scalevalueid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Track current status of a user within goals';
CREATE TABLE pu_00goal_type (
    id BIGINT(10) NOT NULL auto_increment,
    shortname VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci,
    description LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    timecreated BIGINT(18) NOT NULL,
    timemodified BIGINT(18) NOT NULL,
    usermodified BIGINT(18) NOT NULL,
    fullname VARCHAR(1024) CHARACTER SET utf8 COLLATE utf8_general_ci,
    idnumber VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci,
CONSTRAINT  PRIMARY KEY (id)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Goal types are used to manage custom fields';
CREATE TABLE pu_00goal_type_info_data (
    id BIGINT(10) NOT NULL auto_increment,
    data LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    fieldid BIGINT(18) NOT NULL,
    goalid BIGINT(18) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00goaltypeinfodata_fieg_uix (fieldid, goalid)
, KEY pu_00goaltypeinfodata_fie_ix (fieldid)
, KEY pu_00goaltypeinfodata_goa_ix (goalid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Stores custom field data related to goals';
CREATE TABLE pu_00goal_type_info_data_param (
    id BIGINT(10) NOT NULL auto_increment,
    dataid BIGINT(10) NOT NULL,
    value VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00goaltypeinfodatapara_v_ix (value)
, KEY pu_00goaltypeinfodatapara_d_ix (dataid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Custom organisations fields data parameters';
CREATE TABLE pu_00goal_type_info_field (
    id BIGINT(10) NOT NULL auto_increment,
    shortname VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci,
    typeid BIGINT(18) NOT NULL,
    datatype VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    description LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    sortorder BIGINT(18) NOT NULL,
    hidden TINYINT(2) NOT NULL,
    locked TINYINT(2) NOT NULL,
    required TINYINT(2) NOT NULL,
    forceunique TINYINT(2) NOT NULL,
    defaultdata LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    param1 LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    param2 LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    param3 LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    param4 LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    param5 LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    fullname VARCHAR(1024) CHARACTER SET utf8 COLLATE utf8_general_ci,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00goaltypeinfofiel_typ_ix (typeid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Compressed
 COMMENT='Stores the custom fields for each goal type';
CREATE TABLE pu_00goal_user_assignment (
    id BIGINT(10) NOT NULL auto_increment,
    assigntype TINYINT(2) NOT NULL,
    assignmentid BIGINT(18),
    goalid BIGINT(18),
    userid BIGINT(18) NOT NULL,
    extrainfo VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    timemodified BIGINT(18) NOT NULL,
    usermodified BIGINT(18) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00goaluserassi_use_ix (userid)
, KEY pu_00goaluserassi_goa_ix (goalid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Stores the user assignments of goals';
CREATE TABLE pu_00goal_grp_pos (
    id BIGINT(10) NOT NULL auto_increment,
    goalid BIGINT(18) NOT NULL,
    posid BIGINT(18) NOT NULL,
    includechildren TINYINT(2) NOT NULL DEFAULT 0,
    timemodified BIGINT(18) NOT NULL,
    usermodified BIGINT(18) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00goalgrppos_pos_ix (posid)
, KEY pu_00goalgrppos_goa_ix (goalid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Stores the position assignments of goals';
CREATE TABLE pu_00goal_grp_org (
    id BIGINT(10) NOT NULL auto_increment,
    goalid BIGINT(18) NOT NULL,
    orgid BIGINT(18) NOT NULL,
    includechildren TINYINT(2) NOT NULL DEFAULT 0,
    timemodified BIGINT(18) NOT NULL,
    usermodified BIGINT(18) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00goalgrporg_org_ix (orgid)
, KEY pu_00goalgrporg_goa_ix (goalid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Stores the organisation assignments of goals';
CREATE TABLE pu_00goal_grp_cohort (
    id BIGINT(10) NOT NULL auto_increment,
    goalid BIGINT(18) NOT NULL,
    cohortid BIGINT(18) NOT NULL,
    timemodified BIGINT(18) NOT NULL,
    usermodified BIGINT(18) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00goalgrpcoho_coh_ix (cohortid)
, KEY pu_00goalgrpcoho_goa_ix (goalid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Stores the assignments of goals';
CREATE TABLE pu_00goal_personal (
    id BIGINT(10) NOT NULL auto_increment,
    userid BIGINT(18) NOT NULL,
    name VARCHAR(1024) CHARACTER SET utf8 COLLATE utf8_general_ci,
    description LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    targetdate BIGINT(18),
    scaleid BIGINT(18),
    scalevalueid BIGINT(18),
    assigntype TINYINT(2) NOT NULL,
    timecreated BIGINT(18) NOT NULL,
    usercreated BIGINT(18) NOT NULL,
    timemodified BIGINT(18) NOT NULL,
    usermodified BIGINT(18) NOT NULL,
    deleted TINYINT(1) NOT NULL DEFAULT 0,
    typeid BIGINT(10) DEFAULT 0,
    visible TINYINT(1) NOT NULL DEFAULT 1,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00goalpers_use_ix (userid)
, KEY pu_00goalpers_sca_ix (scaleid)
, KEY pu_00goalpers_sca2_ix (scalevalueid)
, KEY pu_00goalpers_typ_ix (typeid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Totara goals';
CREATE TABLE pu_00goal_item_history (
    id BIGINT(10) NOT NULL auto_increment,
    scope TINYINT(1) NOT NULL,
    itemid BIGINT(18) NOT NULL,
    scalevalueid BIGINT(18),
    timemodified BIGINT(18) NOT NULL,
    usermodified BIGINT(18) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00goalitemhist_scoite_ix (scope, itemid)
, KEY pu_00goalitemhist_sca_ix (scalevalueid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Store changes to scalevalueid in goal_record and goal_person';
CREATE TABLE pu_00goal_user_info_data (
    id BIGINT(10) NOT NULL auto_increment,
    data LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    fieldid BIGINT(10) NOT NULL,
    goal_userid BIGINT(10) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00goaluserinfodata_fieg_uix (fieldid, goal_userid)
, KEY pu_00goaluserinfodata_fie_ix (fieldid)
, KEY pu_00goaluserinfodata_goa_ix (goal_userid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Stores personal custom field data related to goals';
CREATE TABLE pu_00goal_user_info_data_param (
    id BIGINT(10) NOT NULL auto_increment,
    dataid BIGINT(10) NOT NULL,
    value VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00goaluserinfodatapara_v_ix (value)
, KEY pu_00goaluserinfodatapara_d_ix (dataid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Custom organisations fields data parameters';
CREATE TABLE pu_00goal_user_info_field (
    id BIGINT(10) NOT NULL auto_increment,
    shortname VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci,
    typeid BIGINT(10) NOT NULL,
    datatype VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    description LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    sortorder BIGINT(18) NOT NULL,
    hidden TINYINT(2) NOT NULL,
    locked TINYINT(2) NOT NULL,
    required TINYINT(2) NOT NULL,
    forceunique TINYINT(2) NOT NULL,
    defaultdata LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    param1 LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    param2 LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    param3 LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    param4 LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    param5 LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    fullname VARCHAR(1024) CHARACTER SET utf8 COLLATE utf8_general_ci,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00goaluserinfofiel_typ_ix (typeid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Compressed
 COMMENT='Stores the personal custom fields for each goal type';
CREATE TABLE pu_00goal_user_type_cohort (
    id BIGINT(10) NOT NULL auto_increment,
    cohortid BIGINT(10) NOT NULL,
    goalid BIGINT(10) NOT NULL,
    timemodified BIGINT(10) NOT NULL,
    usermodified BIGINT(10) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00goalusertypecoho_coh_ix (cohortid)
, KEY pu_00goalusertypecoho_goa_ix (goalid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Contains audiences allowed to select specific personal goal ';
CREATE TABLE pu_00goal_user_type (
    id BIGINT(10) NOT NULL auto_increment,
    shortname VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci,
    description LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    timecreated BIGINT(10) NOT NULL,
    timemodified BIGINT(10) NOT NULL,
    usermodified BIGINT(10) NOT NULL,
    fullname VARCHAR(1024) CHARACTER SET utf8 COLLATE utf8_general_ci,
    idnumber VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci,
    audience TINYINT(2) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Table to store goal types for personal goals.';
CREATE TABLE pu_00message_metadata (
    id BIGINT(10) NOT NULL auto_increment,
    messageid BIGINT(10),
    msgtype SMALLINT(4) NOT NULL,
    msgstatus SMALLINT(4) NOT NULL,
    processorid SMALLINT(4) NOT NULL,
    urgency SMALLINT(4) NOT NULL,
    icon VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    onaccept LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    onreject LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    oninfo LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    messagereadid BIGINT(10),
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00messmeta_mes_ix (messageid)
, KEY pu_00messmeta_mes2_ix (messagereadid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='type, status, and workflow additions to messages';
CREATE INDEX pu_00messwork_pro_ix ON pu_00message_working (processorid);
CREATE TABLE pu_00dp_template (
    id BIGINT(10) NOT NULL auto_increment,
    fullname VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    shortname VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci,
    startdate BIGINT(10),
    enddate BIGINT(10),
    sortorder BIGINT(10) NOT NULL,
    visible SMALLINT(4) NOT NULL,
    workflow VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    isdefault TINYINT(1) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Templates store configuration options for a group of plans.';
CREATE TABLE pu_00dp_plan (
    id BIGINT(10) NOT NULL auto_increment,
    templateid BIGINT(10) NOT NULL,
    userid BIGINT(10) NOT NULL,
    name VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    description LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    startdate BIGINT(10),
    enddate BIGINT(10),
    timecompleted BIGINT(10),
    status SMALLINT(4) NOT NULL,
    createdby TINYINT(1) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00dpplan_tem_ix (templateid)
, KEY pu_00dpplan_use_ix (userid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Stores individual plans belonging to users.';
CREATE TABLE pu_00dp_permissions (
    id BIGINT(10) NOT NULL auto_increment,
    templateid BIGINT(10) NOT NULL,
    role VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    component VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    action VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    value SMALLINT(4),
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00dpperm_tem_ix (templateid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Stores the permission settings for plan templates';
CREATE TABLE pu_00dp_component_settings (
    id BIGINT(10) NOT NULL auto_increment,
    templateid BIGINT(10) NOT NULL,
    component VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    enabled SMALLINT(4) NOT NULL DEFAULT 1,
    sortorder BIGINT(10) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00dpcompsett_temcom_uix (templateid, component)
, KEY pu_00dpcompsett_tem_ix (templateid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Stores the names and component-independent settings for each';
CREATE TABLE pu_00dp_course_settings (
    id BIGINT(10) NOT NULL auto_increment,
    templateid BIGINT(10) NOT NULL,
    duedatemode SMALLINT(4) NOT NULL DEFAULT 0,
    prioritymode SMALLINT(4) NOT NULL DEFAULT 0,
    priorityscale BIGINT(10),
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00dpcoursett_tem_uix (templateid)
, KEY pu_00dpcoursett_pri_ix (priorityscale)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Contains settings specific to the course component';
CREATE TABLE pu_00dp_plan_course_assign (
    id BIGINT(10) NOT NULL auto_increment,
    planid BIGINT(10) NOT NULL,
    courseid BIGINT(10) NOT NULL,
    priority BIGINT(10),
    duedate BIGINT(10),
    approved SMALLINT(4) NOT NULL DEFAULT 0,
    reasonfordecision LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    completionstatus BIGINT(10),
    grade NUMERIC(10,5),
    manual TINYINT(1) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00dpplancourassi_placou_uix (planid, courseid)
, KEY pu_00dpplancourassi_pla_ix (planid)
, KEY pu_00dpplancourassi_cou_ix (courseid)
, KEY pu_00dpplancourassi_pri_ix (priority)
, KEY pu_00dpplancourassi_com_ix (completionstatus)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Stores courses assigned to a particular plan';
CREATE TABLE pu_00dp_plan_competency_assign (
    id BIGINT(10) NOT NULL auto_increment,
    planid BIGINT(10) NOT NULL,
    competencyid BIGINT(10) NOT NULL,
    priority BIGINT(10),
    duedate BIGINT(10),
    approved SMALLINT(4) NOT NULL DEFAULT 0,
    reasonfordecision LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    scalevalueid BIGINT(10) NOT NULL DEFAULT 0,
    manual TINYINT(1) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00dpplancompassi_placom_uix (planid, competencyid)
, KEY pu_00dpplancompassi_pla_ix (planid)
, KEY pu_00dpplancompassi_com_ix (competencyid)
, KEY pu_00dpplancompassi_pri_ix (priority)
, KEY pu_00dpplancompassi_sca_ix (scalevalueid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Stores competencies assigned to a particular plan';
CREATE TABLE pu_00dp_competency_settings (
    id BIGINT(10) NOT NULL auto_increment,
    templateid BIGINT(10) NOT NULL,
    autoassignorg SMALLINT(4) NOT NULL DEFAULT 0,
    autoassignpos SMALLINT(4) NOT NULL DEFAULT 0,
    includecompleted SMALLINT(4) NOT NULL DEFAULT 1,
    autoassigncourses SMALLINT(4) NOT NULL DEFAULT 0,
    duedatemode SMALLINT(4) NOT NULL DEFAULT 0,
    prioritymode SMALLINT(4) NOT NULL DEFAULT 0,
    priorityscale BIGINT(10),
    autoadddefaultevidence SMALLINT(4) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00dpcompsett_tem2_uix (templateid)
, KEY pu_00dpcompsett_pri_ix (priorityscale)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Contains settings specific to the competency component';
CREATE TABLE pu_00dp_priority_scale (
    id BIGINT(10) NOT NULL auto_increment,
    name VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    description LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    timemodified BIGINT(10) NOT NULL,
    usermodified BIGINT(10) NOT NULL,
    defaultid BIGINT(10),
    sortorder BIGINT(10) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00dpprioscal_def_ix (defaultid)
, KEY pu_00dpprioscal_use_ix (usermodified)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Contains priority scales for development plans';
CREATE TABLE pu_00dp_priority_scale_value (
    id BIGINT(10) NOT NULL auto_increment,
    name VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    idnumber VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci,
    description LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    priorityscaleid BIGINT(10) NOT NULL,
    numericscore NUMERIC(10,5),
    sortorder BIGINT(10) NOT NULL,
    timemodified BIGINT(10) NOT NULL,
    usermodified BIGINT(10) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00dpprioscalvalu_use_ix (usermodified)
, KEY pu_00dpprioscalvalu_pri_ix (priorityscaleid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Scale values for development plan priority scales';
CREATE TABLE pu_00dp_objective_scale (
    id BIGINT(10) NOT NULL auto_increment,
    name VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    description LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    timemodified BIGINT(10) NOT NULL,
    usermodified BIGINT(10) NOT NULL,
    defaultid BIGINT(10),
    sortorder BIGINT(10) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00dpobjescal_use_ix (usermodified)
, KEY pu_00dpobjescal_def_ix (defaultid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Contains objective scales for development plans';
CREATE TABLE pu_00dp_objective_scale_value (
    id BIGINT(10) NOT NULL auto_increment,
    objscaleid BIGINT(10) NOT NULL,
    name VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    idnumber VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci,
    description LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    numericscore NUMERIC(10,5),
    sortorder BIGINT(10) NOT NULL,
    timemodified BIGINT(10) NOT NULL,
    usermodified BIGINT(10) NOT NULL,
    achieved SMALLINT(4) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00dpobjescalvalu_obj_ix (objscaleid)
, KEY pu_00dpobjescalvalu_use_ix (usermodified)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Objective Scale values for development plan priority scales';
CREATE TABLE pu_00dp_plan_history (
    id BIGINT(10) NOT NULL auto_increment,
    planid BIGINT(10) NOT NULL,
    status TINYINT(2) NOT NULL,
    reason TINYINT(2) NOT NULL,
    reasonfordecision LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    timemodified BIGINT(10) NOT NULL,
    usermodified BIGINT(10) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00dpplanhist_pla_ix (planid)
, KEY pu_00dpplanhist_use_ix (usermodified)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='A table for tracking and recording modifications to a relate';
CREATE TABLE pu_00dp_plan_component_relation (
    id BIGINT(10) NOT NULL auto_increment,
    component1 VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    itemid1 BIGINT(10) NOT NULL,
    component2 VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    itemid2 BIGINT(10) NOT NULL,
    mandatory VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
CONSTRAINT  PRIMARY KEY (id)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Provides a way to link together items from different compone';
CREATE TABLE pu_00dp_plan_evidence (
    id BIGINT(10) NOT NULL auto_increment,
    name VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    timecreated BIGINT(10),
    timemodified BIGINT(10),
    usermodified BIGINT(10),
    evidencetypeid BIGINT(10),
    userid BIGINT(10),
    readonly TINYINT(1) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00dpplanevid_evi_ix (evidencetypeid)
, KEY pu_00dpplanevid_use_ix (usermodified)
, KEY pu_00dpplanevid_use2_ix (userid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Contains user evidence in the record of learning';
CREATE TABLE pu_00dp_plan_evidence_info_field (
    id BIGINT(10) NOT NULL auto_increment,
    fullname VARCHAR(1333) CHARACTER SET utf8 COLLATE utf8_general_ci,
    shortname VARCHAR(1333) CHARACTER SET utf8 COLLATE utf8_general_ci,
    datatype VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    description LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    sortorder BIGINT(10) NOT NULL,
    hidden TINYINT(1) NOT NULL,
    locked TINYINT(1) NOT NULL,
    required TINYINT(1) NOT NULL,
    forceunique TINYINT(1) NOT NULL,
    defaultdata LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    param1 LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    param2 LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    param3 LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    param4 LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    param5 LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
CONSTRAINT  PRIMARY KEY (id)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Compressed
 COMMENT='Stores the custom fields used in evidence';
CREATE TABLE pu_00dp_plan_evidence_info_data (
    id BIGINT(10) NOT NULL auto_increment,
    fieldid BIGINT(18) NOT NULL,
    evidenceid BIGINT(18) NOT NULL,
    data LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00dpplanevidinfodata_fi_uix (fieldid, evidenceid)
, KEY pu_00dpplanevidinfodata_fie_ix (fieldid)
, KEY pu_00dpplanevidinfodata_evi_ix (evidenceid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Stores custom field data related to evidence';
CREATE TABLE pu_00dp_plan_evidence_info_data_param (
    id BIGINT(10) NOT NULL auto_increment,
    dataid BIGINT(10) NOT NULL,
    value VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00dpplanevidinfodatapara_ix (value)
, KEY pu_00dpplanevidinfodatapar2_ix (dataid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Custom evidence fields data parameters';
CREATE TABLE pu_00dp_objective_settings (
    id BIGINT(10) NOT NULL auto_increment,
    templateid BIGINT(10) NOT NULL,
    duedatemode SMALLINT(4) NOT NULL DEFAULT 0,
    prioritymode SMALLINT(4) NOT NULL DEFAULT 0,
    priorityscale BIGINT(10),
    objectivescale BIGINT(10),
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00dpobjesett_tem_ix (templateid)
, KEY pu_00dpobjesett_pri_ix (priorityscale)
, KEY pu_00dpobjesett_obj_ix (objectivescale)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Settings for a template\'s objectives';
CREATE TABLE pu_00dp_plan_objective (
    id BIGINT(10) NOT NULL auto_increment,
    planid BIGINT(10) NOT NULL,
    fullname VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    shortname VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci,
    description LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    priority BIGINT(10),
    duedate BIGINT(10),
    scalevalueid SMALLINT(4) NOT NULL,
    approved SMALLINT(4) NOT NULL DEFAULT 0,
    reasonfordecision LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    manual TINYINT(1) NOT NULL DEFAULT 0,
    timecreated BIGINT(10),
    timemodified BIGINT(10),
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00dpplanobje_pla_ix (planid)
, KEY pu_00dpplanobje_pri_ix (priority)
, KEY pu_00dpplanobje_sca_ix (scalevalueid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='One row for each objective in a plan';
CREATE TABLE pu_00dp_plan_settings (
    id BIGINT(10) NOT NULL auto_increment,
    templateid BIGINT(10) NOT NULL,
    manualcomplete SMALLINT(4) NOT NULL DEFAULT 1,
    autobyitems SMALLINT(4) NOT NULL DEFAULT 0,
    autobyplandate SMALLINT(4) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00dpplansett_tem_uix (templateid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Contains settings for the plan';
CREATE TABLE pu_00dp_plan_program_assign (
    id BIGINT(10) NOT NULL auto_increment,
    planid BIGINT(10) NOT NULL,
    programid BIGINT(10) NOT NULL,
    priority BIGINT(10),
    duedate BIGINT(10),
    approved SMALLINT(4) NOT NULL DEFAULT 0,
    reasonfordecision LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    manual TINYINT(1) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00dpplanprogassi_plapro_uix (planid, programid)
, KEY pu_00dpplanprogassi_pla_ix (planid)
, KEY pu_00dpplanprogassi_pro_ix (programid)
, KEY pu_00dpplanprogassi_pri_ix (priority)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Stores program assigned to a particular plan';
CREATE TABLE pu_00dp_program_settings (
    id BIGINT(10) NOT NULL auto_increment,
    templateid BIGINT(10) NOT NULL,
    duedatemode SMALLINT(4) NOT NULL DEFAULT 0,
    prioritymode SMALLINT(4) NOT NULL DEFAULT 0,
    priorityscale BIGINT(10),
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00dpprogsett_tem_uix (templateid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Contains settings specific to the program component';
CREATE TABLE pu_00dp_evidence_type (
    id BIGINT(10) NOT NULL auto_increment,
    name VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    description LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    timemodified BIGINT(10) NOT NULL,
    usermodified BIGINT(10) NOT NULL,
    sortorder BIGINT(10) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00dpevidtype_use_ix (usermodified)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Table to store evidence type menu';
CREATE TABLE pu_00dp_plan_evidence_relation (
    id BIGINT(10) NOT NULL auto_increment,
    evidenceid BIGINT(10) NOT NULL,
    planid BIGINT(10) NOT NULL,
    component VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    itemid BIGINT(10) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00dpplanevidrela_placomi_ix (planid, component, itemid)
, KEY pu_00dpplanevidrela_evi_ix (evidenceid)
, KEY pu_00dpplanevidrela_pla_ix (planid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Related courses / objectives / competencies';
CREATE TABLE pu_00prog (
    id BIGINT(10) NOT NULL auto_increment,
    category BIGINT(10) NOT NULL DEFAULT 0,
    sortorder BIGINT(10) NOT NULL DEFAULT 0,
    fullname VARCHAR(254) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '',
    shortname VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '',
    idnumber VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '',
    summary LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    endnote LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    visible TINYINT(1) NOT NULL DEFAULT 1,
    availablefrom BIGINT(10) NOT NULL DEFAULT 0,
    availableuntil BIGINT(10) NOT NULL DEFAULT 0,
    available BIGINT(10) NOT NULL DEFAULT 0,
    timecreated BIGINT(10) NOT NULL DEFAULT 0,
    timemodified BIGINT(10) NOT NULL DEFAULT 0,
    usermodified BIGINT(10) NOT NULL DEFAULT 0,
    icon VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '',
    exceptionssent TINYINT(1) NOT NULL DEFAULT 0,
    audiencevisible SMALLINT(4) NOT NULL DEFAULT 2,
    certifid BIGINT(10),
    assignmentsdeferred TINYINT(1) NOT NULL DEFAULT 0,
    allowextensionrequests TINYINT(1) NOT NULL DEFAULT 1,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00prog_idn_ix (idnumber)
, KEY pu_00prog_sho_ix (shortname)
, KEY pu_00prog_cat_ix (category)
, KEY pu_00prog_cer_ix (certifid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Stores elemental details about programs';
CREATE TABLE pu_00prog_assignment (
    id BIGINT(10) NOT NULL auto_increment,
    programid BIGINT(10) NOT NULL DEFAULT 0,
    assignmenttype SMALLINT(4) NOT NULL DEFAULT 0,
    assignmenttypeid BIGINT(10) NOT NULL DEFAULT 0,
    includechildren TINYINT(1) NOT NULL DEFAULT 0,
    completiontime BIGINT(10) NOT NULL DEFAULT 0,
    completionevent SMALLINT(4) NOT NULL DEFAULT 0,
    completioninstance BIGINT(10) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00progassi_pro_ix (programid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Stores details of the assignments defined within a program';
CREATE TABLE pu_00prog_completion (
    id BIGINT(10) NOT NULL auto_increment,
    programid BIGINT(10) NOT NULL DEFAULT 0,
    userid BIGINT(10) NOT NULL DEFAULT 0,
    coursesetid BIGINT(10) NOT NULL DEFAULT 0,
    status SMALLINT(4) NOT NULL DEFAULT 0,
    timestarted BIGINT(10) NOT NULL DEFAULT 0,
    timecreated BIGINT(10) NOT NULL DEFAULT 0,
    timedue BIGINT(10) NOT NULL DEFAULT 0,
    timecompleted BIGINT(10) NOT NULL DEFAULT 0,
    organisationid BIGINT(10),
    positionid BIGINT(10),
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00progcomp_prousecou_uix (programid, userid, coursesetid)
, KEY pu_00progcomp_pro_ix (programid)
, KEY pu_00progcomp_use_ix (userid)
, KEY pu_00progcomp_cou_ix (coursesetid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Stores details of user\'s program and course set completions';
CREATE TABLE pu_00prog_completion_history (
    id BIGINT(10) NOT NULL auto_increment,
    programid BIGINT(10) NOT NULL DEFAULT 0,
    userid BIGINT(10) NOT NULL DEFAULT 0,
    coursesetid BIGINT(10) NOT NULL DEFAULT 0,
    status SMALLINT(4) NOT NULL DEFAULT 0,
    timestarted BIGINT(10) NOT NULL DEFAULT 0,
    timedue BIGINT(10) NOT NULL DEFAULT 0,
    timecompleted BIGINT(10) NOT NULL DEFAULT 0,
    recurringcourseid BIGINT(10) NOT NULL DEFAULT 0,
    organisationid BIGINT(10),
    positionid BIGINT(10),
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00progcomphist_pro_ix (programid)
, KEY pu_00progcomphist_use_ix (userid)
, KEY pu_00progcomphist_cou_ix (coursesetid)
, KEY pu_00progcomphist_rec_ix (recurringcourseid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Stores details of user\'s program and course set completions ';
CREATE TABLE pu_00prog_completion_log (
    id BIGINT(10) NOT NULL auto_increment,
    programid BIGINT(10) NOT NULL,
    userid BIGINT(10),
    changeuserid BIGINT(10),
    description LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    timemodified BIGINT(10) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00progcomplog_pro_ix (programid)
, KEY pu_00progcomplog_use_ix (userid)
, KEY pu_00progcomplog_cha_ix (changeuserid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Record of changes made to program completion records';
CREATE TABLE pu_00prog_courseset (
    id BIGINT(10) NOT NULL auto_increment,
    programid BIGINT(10) NOT NULL DEFAULT 0,
    sortorder BIGINT(10) NOT NULL DEFAULT 0,
    competencyid BIGINT(10) NOT NULL DEFAULT 0,
    nextsetoperator SMALLINT(4) NOT NULL DEFAULT 0,
    completiontype SMALLINT(4) NOT NULL DEFAULT 0,
    mincourses SMALLINT(4) NOT NULL DEFAULT 0,
    coursesumfield BIGINT(11) NOT NULL DEFAULT 0,
    coursesumfieldtotal SMALLINT(4) NOT NULL DEFAULT 0,
    timeallowed BIGINT(10) NOT NULL DEFAULT 0,
    recurrencetime BIGINT(10) NOT NULL DEFAULT 0,
    recurcreatetime BIGINT(10) NOT NULL DEFAULT 0,
    contenttype SMALLINT(4) NOT NULL DEFAULT 0,
    label VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '',
    certifpath TINYINT(2) DEFAULT 1,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00progcour_pro_ix (programid)
, KEY pu_00progcour_cou_ix (coursesumfield)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Stores details of the sets of courses and competencies conta';
CREATE TABLE pu_00prog_courseset_course (
    id BIGINT(10) NOT NULL auto_increment,
    coursesetid BIGINT(10) NOT NULL DEFAULT 0,
    courseid BIGINT(10) NOT NULL DEFAULT 0,
    sortorder BIGINT(10),
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00progcourcour_cou_ix (coursesetid)
, KEY pu_00progcourcour_cou2_ix (courseid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Stores the details of the individual courses contained in a ';
CREATE TABLE pu_00prog_exception (
    id BIGINT(10) NOT NULL auto_increment,
    programid BIGINT(10) NOT NULL DEFAULT 0,
    exceptiontype SMALLINT(4) NOT NULL DEFAULT 0,
    userid BIGINT(10) NOT NULL DEFAULT 0,
    timeraised BIGINT(10) NOT NULL DEFAULT 0,
    assignmentid BIGINT(10) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00progexce_exc_ix (exceptiontype)
, KEY pu_00progexce_pro_ix (programid)
, KEY pu_00progexce_use_ix (userid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Stores details of any exceptions raised relating to a progra';
CREATE TABLE pu_00prog_extension (
    id BIGINT(10) NOT NULL auto_increment,
    programid BIGINT(10) NOT NULL DEFAULT 0,
    userid BIGINT(10) NOT NULL DEFAULT 0,
    extensiondate BIGINT(10) NOT NULL DEFAULT 0,
    extensionreason LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    status SMALLINT(4) NOT NULL DEFAULT 0,
    reasonfordecision LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00progexte_pro_ix (programid)
, KEY pu_00progexte_use_ix (userid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Stores extension requests for programs';
CREATE TABLE pu_00prog_future_user_assignment (
    id BIGINT(10) NOT NULL auto_increment,
    programid BIGINT(10),
    userid BIGINT(10),
    assignmentid BIGINT(10),
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00progfutuuserassi_pro_ix (programid)
, KEY pu_00progfutuuserassi_use_ix (userid)
, KEY pu_00progfutuuserassi_ass_ix (assignmentid)
, UNIQUE KEY pu_00progfutuuserassi_prou_uix (programid, userid, assignmentid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Future user assignments such as from first login';
CREATE TABLE pu_00prog_info_data (
    id BIGINT(10) NOT NULL auto_increment,
    data LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    fieldid BIGINT(18) NOT NULL,
    programid BIGINT(18) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00proginfodata_fiepro_uix (fieldid, programid)
, KEY pu_00proginfodata_fie_ix (fieldid)
, KEY pu_00proginfodata_pro_ix (programid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Stores custom field data related to programs';
CREATE TABLE pu_00prog_info_data_param (
    id BIGINT(10) NOT NULL auto_increment,
    dataid BIGINT(10) NOT NULL,
    value VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00proginfodatapara_val_ix (value)
, KEY pu_00proginfodatapara_dat_ix (dataid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Custom programs fields data parameters';
CREATE TABLE pu_00prog_info_field (
    id BIGINT(10) NOT NULL auto_increment,
    shortname VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci,
    datatype VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    description LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    sortorder BIGINT(18) NOT NULL,
    hidden TINYINT(2) NOT NULL,
    locked TINYINT(2) NOT NULL,
    required TINYINT(2) NOT NULL,
    forceunique TINYINT(2) NOT NULL,
    defaultdata LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    param1 LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    param2 LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    param3 LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    param4 LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    param5 LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    fullname VARCHAR(1024) CHARACTER SET utf8 COLLATE utf8_general_ci,
CONSTRAINT  PRIMARY KEY (id)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Compressed
 COMMENT='Stores the custom fields for each program type';
CREATE TABLE pu_00prog_message (
    id BIGINT(10) NOT NULL auto_increment,
    programid BIGINT(10) NOT NULL DEFAULT 0,
    messagetype SMALLINT(4) NOT NULL DEFAULT 0,
    sortorder BIGINT(10) NOT NULL DEFAULT 0,
    messagesubject VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '',
    mainmessage LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    notifymanager TINYINT(1) NOT NULL DEFAULT 0,
    managersubject VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '',
    managermessage LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    triggertime BIGINT(10) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00progmess_pro_ix (programid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Stores details of the messages defined within a program';
CREATE TABLE pu_00prog_messagelog (
    id BIGINT(10) NOT NULL auto_increment,
    messageid BIGINT(10) NOT NULL DEFAULT 0,
    userid BIGINT(10) NOT NULL DEFAULT 0,
    coursesetid BIGINT(10) NOT NULL DEFAULT 0,
    timeissued BIGINT(10) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00progmess_mes_ix (messageid)
, KEY pu_00progmess_use_ix (userid)
, KEY pu_00progmess_cou_ix (coursesetid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Stores details of program-related messages that have been is';
CREATE TABLE pu_00prog_recurrence (
    id BIGINT(10) NOT NULL auto_increment,
    programid BIGINT(10) NOT NULL DEFAULT 0,
    currentcourseid BIGINT(10) NOT NULL DEFAULT 0,
    nextcourseid BIGINT(10) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00progrecu_pro_ix (programid)
, KEY pu_00progrecu_cur_ix (currentcourseid)
, KEY pu_00progrecu_nex_ix (nextcourseid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Store the id numbers of the courses that will replace existi';
CREATE TABLE pu_00prog_user_assignment (
    id BIGINT(10) NOT NULL auto_increment,
    programid BIGINT(10) NOT NULL DEFAULT 0,
    userid BIGINT(10) NOT NULL DEFAULT 0,
    assignmentid BIGINT(10) NOT NULL DEFAULT 0,
    timeassigned BIGINT(10) NOT NULL DEFAULT 0,
    exceptionstatus BIGINT(10) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00proguserassi_pro_ix (programid)
, KEY pu_00proguserassi_use_ix (userid)
, KEY pu_00proguserassi_ass_ix (assignmentid)
, KEY pu_00proguserassi_exc_ix (exceptionstatus)
, UNIQUE KEY pu_00proguserassi_prouseas_uix (programid, userid, assignmentid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Stores details of the user assignments that have been made f';
CREATE TABLE pu_00report_builder (
    id BIGINT(10) NOT NULL auto_increment,
    fullname VARCHAR(1333) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    shortname VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    source VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    hidden SMALLINT(4) NOT NULL DEFAULT 0,
    cache SMALLINT(4) NOT NULL DEFAULT 0,
    accessmode SMALLINT(4) NOT NULL DEFAULT 0,
    contentmode SMALLINT(4) NOT NULL DEFAULT 0,
    summary LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    description LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    recordsperpage BIGINT(10) NOT NULL DEFAULT 40,
    defaultsortcolumn VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    defaultsortorder BIGINT(10) NOT NULL DEFAULT 4,
    embedded SMALLINT(4) NOT NULL DEFAULT 0,
    initialdisplay TINYINT(1) NOT NULL DEFAULT 0,
    toolbarsearch SMALLINT(4) NOT NULL DEFAULT 1,
    globalrestriction TINYINT(1) NOT NULL DEFAULT 0,
    timemodified BIGINT(10) NOT NULL DEFAULT 0,
    showtotalcount TINYINT(1) NOT NULL DEFAULT 0,
    overrideexportoptions TINYINT(1) NOT NULL DEFAULT 0,
    useclonedb TINYINT(1) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00repobuil_sho_uix (shortname)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Each report has an entry here';
CREATE TABLE pu_00report_builder_columns (
    id BIGINT(10) NOT NULL auto_increment,
    reportid BIGINT(10) NOT NULL,
    type VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    value VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    transform VARCHAR(30) CHARACTER SET utf8 COLLATE utf8_general_ci,
    aggregate VARCHAR(30) CHARACTER SET utf8 COLLATE utf8_general_ci,
    heading VARCHAR(1024) CHARACTER SET utf8 COLLATE utf8_general_ci,
    sortorder BIGINT(10) NOT NULL,
    hidden SMALLINT(4) NOT NULL DEFAULT 0,
    customheading SMALLINT(4) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00repobuilcolu_rep_ix (reportid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Defines columns belonging to each report';
CREATE TABLE pu_00report_builder_graph (
    id BIGINT(10) NOT NULL auto_increment,
    reportid BIGINT(10) NOT NULL,
    type VARCHAR(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    stacked TINYINT(1) NOT NULL DEFAULT 0,
    maxrecords BIGINT(10) NOT NULL DEFAULT 500,
    category VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    legend VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    series LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    settings LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    timemodified BIGINT(10) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00repobuilgrap_rep_ix (reportid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Report graphs';
CREATE TABLE pu_00report_builder_filters (
    id BIGINT(10) NOT NULL auto_increment,
    reportid BIGINT(10) NOT NULL,
    type VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    value VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    sortorder BIGINT(10) NOT NULL,
    filteringrequired TINYINT(1) NOT NULL DEFAULT 0,
    advanced SMALLINT(4) NOT NULL DEFAULT 0,
    filtername VARCHAR(1024) CHARACTER SET utf8 COLLATE utf8_general_ci,
    customname SMALLINT(4) NOT NULL DEFAULT 0,
    region SMALLINT(4) NOT NULL DEFAULT 0,
    defaultvalue LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
CONSTRAINT  PRIMARY KEY (id)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic;
ALTER TABLE pu_00report_builder_filters ADD CONSTRAINT "pu_00report_builder_filtersfilteringrequired_enum" CHECK (filteringrequired IN (0,1));
ALTER TABLE pu_00report_builder_filters COMMENT='Defines filters belonging to each report';
CREATE INDEX pu_00repobuilfilt_rep_ix ON pu_00report_builder_filters (reportid);
CREATE TABLE pu_00report_builder_search_cols (
    id BIGINT(10) NOT NULL auto_increment,
    reportid BIGINT(10) NOT NULL,
    type VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    value VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00repobuilsearcols_rep_ix (reportid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Defines search columns belonging to each report';
CREATE TABLE pu_00report_builder_settings (
    id BIGINT(10) NOT NULL auto_increment,
    reportid BIGINT(10) NOT NULL,
    type VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    name VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    value VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00repobuilsett_rep_ix (reportid)
, UNIQUE KEY pu_00repobuilsett_reptypna_uix (reportid, type, name)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Contains settings for individual reports';
CREATE TABLE pu_00report_builder_saved (
    id BIGINT(10) NOT NULL auto_increment,
    reportid BIGINT(10) NOT NULL,
    userid BIGINT(10) NOT NULL,
    name VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    search LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    ispublic TINYINT(1) NOT NULL DEFAULT 0,
    isdefault TINYINT(1) NOT NULL DEFAULT 0,
    timemodified BIGINT(10) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00repobuilsave_rep_ix (reportid)
, KEY pu_00repobuilsave_use_ix (userid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Stores saved searches for reports';
CREATE TABLE pu_00report_builder_saved_user_default (
    id BIGINT(10) NOT NULL auto_increment,
    userid BIGINT(10) NOT NULL,
    reportid BIGINT(10) NOT NULL,
    savedid BIGINT(10) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00repobuilsaveuserdefa_u_ix (userid)
, KEY pu_00repobuilsaveuserdefa_r_ix (reportid)
, UNIQUE KEY pu_00repobuilsaveuserdefa__uix (userid, reportid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Stores the default search to be used for a user';
CREATE TABLE pu_00report_builder_schedule (
    id BIGINT(10) NOT NULL auto_increment,
    reportid BIGINT(10) NOT NULL,
    userid BIGINT(10) NOT NULL,
    savedsearchid BIGINT(10) NOT NULL,
    format VARCHAR(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    frequency BIGINT(10) NOT NULL,
    exporttofilesystem BIGINT(10) NOT NULL DEFAULT 0,
    schedule BIGINT(10) NOT NULL,
    nextreport BIGINT(10),
    usermodified BIGINT(10) NOT NULL DEFAULT 0,
    lastmodified BIGINT(10) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00repobuilsche_rep_ix (reportid)
, KEY pu_00repobuilsche_use_ix (userid)
, KEY pu_00repobuilsche_sav_ix (savedsearchid)
, KEY pu_00repobuilsche_use2_ix (usermodified)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Storing details of scheduled reports';
CREATE TABLE pu_00report_builder_schedule_email_audience (
    id BIGINT(10) NOT NULL auto_increment,
    scheduleid BIGINT(10) NOT NULL,
    cohortid BIGINT(10) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00repobuilscheemaiaudi__uix (scheduleid, cohortid)
, KEY pu_00repobuilscheemaiaudi_s_ix (scheduleid)
, KEY pu_00repobuilscheemaiaudi_c_ix (cohortid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Storing audience to email in scheduled reports';
CREATE TABLE pu_00report_builder_schedule_email_systemuser (
    id BIGINT(10) NOT NULL auto_increment,
    scheduleid BIGINT(10) NOT NULL,
    userid BIGINT(10) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00repobuilscheemaisyst__uix (scheduleid, userid)
, KEY pu_00repobuilscheemaisyst_s_ix (scheduleid)
, KEY pu_00repobuilscheemaisyst_u_ix (userid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Storing system users to email in scheduled reports';
CREATE TABLE pu_00report_builder_schedule_email_external (
    id BIGINT(10) NOT NULL auto_increment,
    scheduleid BIGINT(10) NOT NULL,
    email VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00repobuilscheemaiexte__uix (scheduleid, email)
, KEY pu_00repobuilscheemaiexte_s_ix (scheduleid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Storing external emails to send in scheduled reports';
CREATE TABLE pu_00report_builder_cache (
    id BIGINT(10) NOT NULL auto_increment,
    reportid BIGINT(10) NOT NULL,
    cachetable VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    frequency BIGINT(10) NOT NULL,
    schedule BIGINT(10) NOT NULL,
    lastreport BIGINT(10),
    nextreport BIGINT(10),
    queryhash VARCHAR(40) CHARACTER SET utf8 COLLATE utf8_general_ci,
    changed TINYINT(1),
    genstart BIGINT(10),
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00repobuilcach_nex_ix (nextreport)
, KEY pu_00repobuilcach_rep_ix (reportid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Storing details of scheduled reports caching';
CREATE TABLE pu_00report_builder_global_restriction (
    id BIGINT(10) NOT NULL auto_increment,
    name VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    description LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    active TINYINT(1) NOT NULL DEFAULT 0,
    allrecords TINYINT(1) NOT NULL DEFAULT 0,
    allusers TINYINT(1) NOT NULL DEFAULT 0,
    sortorder BIGINT(10) NOT NULL,
    timecreated BIGINT(10) NOT NULL,
    timemodified BIGINT(10),
CONSTRAINT  PRIMARY KEY (id)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Global Report Restrictions';
CREATE TABLE pu_00reportbuilder_grp_cohort_record (
    id BIGINT(10) NOT NULL auto_increment,
    reportbuilderrecordid BIGINT(10) NOT NULL,
    cohortid BIGINT(10) NOT NULL,
    timecreated BIGINT(10) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00repogrpcohoreco_rep_ix (reportbuilderrecordid)
, KEY pu_00repogrpcohoreco_coh_ix (cohortid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Cohorts that restricted users can see';
CREATE TABLE pu_00reportbuilder_grp_org_record (
    id BIGINT(10) NOT NULL auto_increment,
    reportbuilderrecordid BIGINT(10) NOT NULL,
    orgid BIGINT(10) NOT NULL,
    includechildren TINYINT(1) DEFAULT 0,
    timecreated BIGINT(10) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00repogrporgreco_rep_ix (reportbuilderrecordid)
, KEY pu_00repogrporgreco_org_ix (orgid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Organisations that restricted users can see';
CREATE TABLE pu_00reportbuilder_grp_pos_record (
    id BIGINT(10) NOT NULL auto_increment,
    reportbuilderrecordid BIGINT(10) NOT NULL,
    posid BIGINT(10) NOT NULL,
    includechildren TINYINT(1) DEFAULT 0,
    timecreated BIGINT(10) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00repogrpposreco_rep_ix (reportbuilderrecordid)
, KEY pu_00repogrpposreco_pos_ix (posid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Positions that restricted users can see';
CREATE TABLE pu_00reportbuilder_grp_user_record (
    id BIGINT(10) NOT NULL auto_increment,
    reportbuilderrecordid BIGINT(10) NOT NULL,
    userid BIGINT(10) NOT NULL,
    timecreated BIGINT(10) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00repogrpuserreco_rep_ix (reportbuilderrecordid)
, KEY pu_00repogrpuserreco_use_ix (userid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Individual users that restricted users can see';
CREATE TABLE pu_00reportbuilder_grp_cohort_user (
    id BIGINT(10) NOT NULL auto_increment,
    reportbuilderuserid BIGINT(10) NOT NULL,
    cohortid BIGINT(10) NOT NULL,
    timecreated BIGINT(10) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00repogrpcohouser_rep_ix (reportbuilderuserid)
, KEY pu_00repogrpcohouser_coh_ix (cohortid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Restricted cohorts that will see only allowed records';
CREATE TABLE pu_00reportbuilder_grp_org_user (
    id BIGINT(10) NOT NULL auto_increment,
    reportbuilderuserid BIGINT(10) NOT NULL,
    orgid BIGINT(10) NOT NULL,
    includechildren TINYINT(1) DEFAULT 0,
    timecreated BIGINT(10) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00repogrporguser_rep_ix (reportbuilderuserid)
, KEY pu_00repogrporguser_org_ix (orgid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Restricted organisations that will see only allowed records';
CREATE TABLE pu_00reportbuilder_grp_pos_user (
    id BIGINT(10) NOT NULL auto_increment,
    reportbuilderuserid BIGINT(10) NOT NULL,
    posid BIGINT(10) NOT NULL,
    includechildren TINYINT(1) DEFAULT 0,
    timecreated BIGINT(10) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00repogrpposuser_rep_ix (reportbuilderuserid)
, KEY pu_00repogrpposuser_pos_ix (posid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Restricted positions that will see only allowed records';
CREATE TABLE pu_00reportbuilder_grp_user_user (
    id BIGINT(10) NOT NULL auto_increment,
    reportbuilderuserid BIGINT(10) NOT NULL,
    userid BIGINT(10) NOT NULL,
    timecreated BIGINT(10) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00repogrpuseruser_rep_ix (reportbuilderuserid)
, KEY pu_00repogrpuseruser_use_ix (userid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Restricted individual users that will see only allowed recor';
CREATE TABLE pu_00totara_userdata_purge_type (
    id BIGINT(10) NOT NULL auto_increment,
    userstatus TINYINT(1) NOT NULL,
    fullname VARCHAR(1333) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    idnumber VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    description LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    allowmanual TINYINT(1) NOT NULL DEFAULT 0,
    allowdeleted TINYINT(1) NOT NULL DEFAULT 0,
    allowsuspended TINYINT(1) NOT NULL DEFAULT 0,
    usercreated BIGINT(10) NOT NULL,
    timecreated BIGINT(10) NOT NULL,
    timechanged BIGINT(10) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00totauserpurgtype_idn_uix (idnumber)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='List of available user data purge types';
CREATE TABLE pu_00totara_userdata_purge_type_item (
    id BIGINT(10) NOT NULL auto_increment,
    purgetypeid BIGINT(10) NOT NULL,
    component VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    name VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    purgedata TINYINT(1) NOT NULL,
    timecreated BIGINT(10) NOT NULL,
    timechanged BIGINT(10) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00totauserpurgtypeitem__uix (purgetypeid, component, name)
, KEY pu_00totauserpurgtypeitem_p_ix (purgetypeid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Purge type items and their settings, each purge type has rec';
CREATE TABLE pu_00totara_userdata_user (
    id BIGINT(10) NOT NULL auto_increment,
    userid BIGINT(10) NOT NULL,
    usercontextid BIGINT(10),
    suspendedpurgetypeid BIGINT(10),
    timesuspended BIGINT(10),
    timesuspendedpurged BIGINT(10),
    deletedpurgetypeid BIGINT(10),
    timedeleted BIGINT(10),
    timedeletedpurged BIGINT(10),
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00totauseruser_use_uix (userid)
, KEY pu_00totauseruser_sus_ix (suspendedpurgetypeid)
, KEY pu_00totauseruser_del_ix (deletedpurgetypeid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Extension of user table for tracking of selected purging typ';
CREATE TABLE pu_00totara_userdata_purge (
    id BIGINT(10) NOT NULL auto_increment,
    purgetypeid BIGINT(10) NOT NULL,
    origin VARCHAR(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    userid BIGINT(10) NOT NULL,
    usercontextid BIGINT(10),
    contextid BIGINT(10) NOT NULL,
    usercreated BIGINT(10),
    timecreated BIGINT(10) NOT NULL,
    timestarted BIGINT(10),
    timefinished BIGINT(10),
    result BIGINT(10),
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00totauserpurg_use_ix (userid)
, KEY pu_00totauserpurg_pur_ix (purgetypeid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='List of all user data purges and their result';
CREATE TABLE pu_00totara_userdata_purge_item (
    id BIGINT(10) NOT NULL auto_increment,
    purgeid BIGINT(10) NOT NULL,
    component VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    name VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    timestarted BIGINT(10) NOT NULL,
    timefinished BIGINT(10),
    result BIGINT(10),
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00totauserpurgitem_pur_ix (purgeid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Items of each user data purge and their result';
CREATE TABLE pu_00totara_userdata_export_type (
    id BIGINT(10) NOT NULL auto_increment,
    fullname VARCHAR(1333) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    idnumber VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    description LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    allowself TINYINT(1) NOT NULL DEFAULT 0,
    includefiledir TINYINT(1) NOT NULL DEFAULT 0,
    usercreated BIGINT(10) NOT NULL,
    timecreated BIGINT(10) NOT NULL,
    timechanged BIGINT(10) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00totauserexpotype_idn_uix (idnumber)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='List of available user data export types';
CREATE TABLE pu_00totara_userdata_export_type_item (
    id BIGINT(10) NOT NULL auto_increment,
    exporttypeid BIGINT(10) NOT NULL,
    component VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    name VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    exportdata TINYINT(1) NOT NULL,
    timecreated BIGINT(10) NOT NULL,
    timechanged BIGINT(10) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00totauserexpotypeitem__uix (exporttypeid, component, name)
, KEY pu_00totauserexpotypeitem_e_ix (exporttypeid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Export type items and their settings, each export type has r';
CREATE TABLE pu_00totara_userdata_export (
    id BIGINT(10) NOT NULL auto_increment,
    exporttypeid BIGINT(10) NOT NULL,
    origin VARCHAR(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    userid BIGINT(10) NOT NULL,
    contextid BIGINT(10) NOT NULL,
    usercreated BIGINT(10),
    timecreated BIGINT(10) NOT NULL,
    timestarted BIGINT(10),
    timefinished BIGINT(10),
    result BIGINT(10),
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00totauserexpo_use_ix (userid)
, KEY pu_00totauserexpo_exp_ix (exporttypeid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='List of all user data exports and their result';
CREATE TABLE pu_00totara_userdata_export_item (
    id BIGINT(10) NOT NULL auto_increment,
    exportid BIGINT(10) NOT NULL,
    component VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    name VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    timestarted BIGINT(10) NOT NULL,
    timefinished BIGINT(10),
    result BIGINT(10),
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00totauserexpoitem_exp_ix (exportid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Items of each user data export and their result';
CREATE TABLE pu_00tool_customlang (
    id BIGINT(10) NOT NULL auto_increment,
    lang VARCHAR(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    componentid BIGINT(10) NOT NULL,
    stringid VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    original LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    master LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    local LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    timemodified BIGINT(10) NOT NULL,
    timecustomized BIGINT(10),
    outdated SMALLINT(3) DEFAULT 0,
    modified SMALLINT(3) DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00toolcust_lancomstr_uix (lang, componentid, stringid)
, KEY pu_00toolcust_com_ix (componentid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Contains the working checkout of all strings and their custo';
CREATE TABLE pu_00tool_customlang_components (
    id BIGINT(10) NOT NULL auto_increment,
    name VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    version VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
CONSTRAINT  PRIMARY KEY (id)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Contains the list of all installed plugins that provide thei';
CREATE TABLE pu_00tool_monitor_rules (
    id BIGINT(10) NOT NULL auto_increment,
    description LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    descriptionformat TINYINT(1) NOT NULL,
    name VARCHAR(254) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    userid BIGINT(10) NOT NULL,
    courseid BIGINT(10) NOT NULL,
    plugin VARCHAR(254) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    eventname VARCHAR(254) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    template LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    templateformat TINYINT(1) NOT NULL,
    frequency SMALLINT(4) NOT NULL,
    timewindow MEDIUMINT(5) NOT NULL,
    timemodified BIGINT(10) NOT NULL,
    timecreated BIGINT(10) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00toolmonirule_couuse_ix (courseid, userid)
, KEY pu_00toolmonirule_eve_ix (eventname)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Table to store rules';
CREATE TABLE pu_00tool_monitor_subscriptions (
    id BIGINT(10) NOT NULL auto_increment,
    courseid BIGINT(10) NOT NULL,
    ruleid BIGINT(10) NOT NULL,
    cmid BIGINT(10) NOT NULL,
    userid BIGINT(10) NOT NULL,
    timecreated BIGINT(10) NOT NULL,
    lastnotificationsent BIGINT(10) NOT NULL DEFAULT 0,
    inactivedate BIGINT(10) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00toolmonisubs_couuse_ix (courseid, userid)
, KEY pu_00toolmonisubs_rul_ix (ruleid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Table to store user subscriptions to various rules';
CREATE TABLE pu_00tool_monitor_history (
    id BIGINT(10) NOT NULL auto_increment,
    sid BIGINT(10) NOT NULL,
    userid BIGINT(10) NOT NULL,
    timesent BIGINT(10) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00toolmonihist_siduseti_uix (sid, userid, timesent)
, KEY pu_00toolmonihist_sid_ix (sid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Table to store history of message notifications sent';
CREATE TABLE pu_00tool_monitor_events (
    id BIGINT(10) NOT NULL auto_increment,
    eventname VARCHAR(254) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    contextid BIGINT(10) NOT NULL,
    contextlevel BIGINT(10) NOT NULL,
    contextinstanceid BIGINT(10) NOT NULL,
    link VARCHAR(254) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    courseid BIGINT(10) NOT NULL,
    timecreated BIGINT(10) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='A table that keeps a log of events related to subscriptions';
CREATE TABLE pu_00tool_recyclebin_course (
    id BIGINT(10) NOT NULL auto_increment,
    courseid BIGINT(10) NOT NULL,
    section BIGINT(10) NOT NULL,
    module BIGINT(10) NOT NULL,
    name VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    timecreated BIGINT(10) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00toolrecycour_tim_ix (timecreated)
, KEY pu_00toolrecycour_cou_ix (courseid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='A list of items in the course recycle bin';
CREATE TABLE pu_00tool_recyclebin_category (
    id BIGINT(10) NOT NULL auto_increment,
    categoryid BIGINT(10) NOT NULL,
    shortname VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    fullname VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    timecreated BIGINT(10) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00toolrecycate_tim_ix (timecreated)
, KEY pu_00toolrecycate_cat_ix (categoryid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='A list of items in the category recycle bin';
CREATE TABLE pu_00tool_sitepolicy_site_policy (
    id BIGINT(10) NOT NULL auto_increment,
    timecreated BIGINT(10),
CONSTRAINT  PRIMARY KEY (id)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='A list of site policies';
CREATE TABLE pu_00tool_sitepolicy_policy_version (
    id BIGINT(10) NOT NULL auto_increment,
    versionnumber BIGINT(10),
    timecreated BIGINT(10),
    timepublished BIGINT(10),
    timearchived BIGINT(10),
    sitepolicyid BIGINT(10),
    publisherid BIGINT(10),
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00toolsitepolivers_sit_ix (sitepolicyid)
, KEY pu_00toolsitepolivers_pub_ix (publisherid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Record of all versions of a policy, including not yet publis';
CREATE TABLE pu_00tool_sitepolicy_localised_policy (
    id BIGINT(10) NOT NULL auto_increment,
    language VARCHAR(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    title VARCHAR(1333) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    policytext LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    policytextformat TINYINT(2) DEFAULT 1,
    whatsnew LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    whatsnewformat TINYINT(2) DEFAULT 1,
    timecreated BIGINT(10),
    isprimary TINYINT(1),
    authorid BIGINT(10),
    policyversionid BIGINT(10),
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00toolsitelocapoli_aut_ix (authorid)
, KEY pu_00toolsitelocapoli_pol_ix (policyversionid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='A policy in a particular language';
CREATE TABLE pu_00tool_sitepolicy_user_consent (
    id BIGINT(10) NOT NULL auto_increment,
    userid BIGINT(10) NOT NULL,
    timeconsented BIGINT(10),
    hasconsented TINYINT(1),
    consentoptionid BIGINT(10),
    language VARCHAR(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00toolsiteusercons_uset_uix (userid, timeconsented, consentoptionid)
, KEY pu_00toolsiteusercons_use_ix (userid)
, KEY pu_00toolsiteusercons_con_ix (consentoptionid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Answers from the user in the localised policy';
CREATE TABLE pu_00tool_sitepolicy_localised_consent (
    id BIGINT(10) NOT NULL auto_increment,
    statement LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    consentoption VARCHAR(1333) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    nonconsentoption VARCHAR(1333) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    localisedpolicyid BIGINT(10),
    consentoptionid BIGINT(10),
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00toolsitelocacons_loc_ix (localisedpolicyid)
, KEY pu_00toolsitelocacons_con_ix (consentoptionid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='The options which the user can choose from in a localised po';
CREATE TABLE pu_00tool_sitepolicy_consent_options (
    id BIGINT(10) NOT NULL auto_increment,
    mandatory TINYINT(1),
    idnumber VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    policyversionid BIGINT(10),
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00toolsiteconsopti_pol_ix (policyversionid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Manages localised consents';
CREATE TABLE pu_00totara_sync_log (
    id BIGINT(10) NOT NULL auto_increment,
    time BIGINT(10) NOT NULL,
    element VARCHAR(60) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    logtype VARCHAR(60) CHARACTER SET utf8 COLLATE utf8_general_ci,
    action VARCHAR(60) CHARACTER SET utf8 COLLATE utf8_general_ci,
    info VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    runid BIGINT(10) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00totasynclog_tim_ix (time)
, KEY pu_00totasynclog_ele_ix (element)
, KEY pu_00totasynclog_log_ix (logtype)
, KEY pu_00totasynclog_act_ix (action)
, KEY pu_00totasynclog_run_ix (runid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='log table for totara element syncing';
CREATE TABLE pu_00tool_usertours_tours (
    id BIGINT(10) NOT NULL auto_increment,
    name VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    description LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    pathmatch VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
    enabled TINYINT(1) NOT NULL DEFAULT 0,
    sortorder BIGINT(10) NOT NULL DEFAULT 0,
    configdata LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='List of tours';
CREATE TABLE pu_00tool_usertours_steps (
    id BIGINT(10) NOT NULL auto_increment,
    tourid BIGINT(10) NOT NULL,
    title LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    content LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    targettype TINYINT(2) NOT NULL,
    targetvalue LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    sortorder BIGINT(10) NOT NULL DEFAULT 0,
    configdata LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00tooluserstep_tousor_ix (tourid, sortorder)
, KEY pu_00tooluserstep_tou_ix (tourid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Steps in an tour';
CREATE TABLE pu_00assignsubmission_file (
    id BIGINT(10) NOT NULL auto_increment,
    assignment BIGINT(10) NOT NULL DEFAULT 0,
    submission BIGINT(10) NOT NULL DEFAULT 0,
    numfiles BIGINT(10) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00assifile_ass_ix (assignment)
, KEY pu_00assifile_sub_ix (submission)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Info about file submissions for assignments';
CREATE TABLE pu_00assignsubmission_onlinetext (
    id BIGINT(10) NOT NULL auto_increment,
    assignment BIGINT(10) NOT NULL DEFAULT 0,
    submission BIGINT(10) NOT NULL DEFAULT 0,
    onlinetext LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    onlineformat SMALLINT(4) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00assionli_ass_ix (assignment)
, KEY pu_00assionli_sub_ix (submission)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Info about onlinetext submission';
CREATE TABLE pu_00assignfeedback_comments (
    id BIGINT(10) NOT NULL auto_increment,
    assignment BIGINT(10) NOT NULL DEFAULT 0,
    grade BIGINT(10) NOT NULL DEFAULT 0,
    commenttext LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    commentformat SMALLINT(4) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00assicomm_ass_ix (assignment)
, KEY pu_00assicomm_gra_ix (grade)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Text feedback for submitted assignments';
CREATE TABLE pu_00assignfeedback_editpdf_cmnt (
    id BIGINT(10) NOT NULL auto_increment,
    gradeid BIGINT(10) NOT NULL DEFAULT 0,
    x BIGINT(10) DEFAULT 0,
    y BIGINT(10) DEFAULT 0,
    width BIGINT(10) DEFAULT 120,
    rawtext LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    pageno BIGINT(10) NOT NULL DEFAULT 0,
    colour VARCHAR(10) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT 'black',
    draft TINYINT(2) NOT NULL DEFAULT 1,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00assieditcmnt_grapag_ix (gradeid, pageno)
, KEY pu_00assieditcmnt_gra_ix (gradeid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Stores comments added to pdfs';
CREATE TABLE pu_00assignfeedback_editpdf_annot (
    id BIGINT(10) NOT NULL auto_increment,
    gradeid BIGINT(10) NOT NULL DEFAULT 0,
    pageno BIGINT(10) NOT NULL DEFAULT 0,
    x BIGINT(10) DEFAULT 0,
    y BIGINT(10) DEFAULT 0,
    endx BIGINT(10) DEFAULT 0,
    endy BIGINT(10) DEFAULT 0,
    path LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    type VARCHAR(10) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT 'line',
    colour VARCHAR(10) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT 'black',
    draft TINYINT(2) NOT NULL DEFAULT 1,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00assieditanno_grapag_ix (gradeid, pageno)
, KEY pu_00assieditanno_gra_ix (gradeid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='stores annotations added to pdfs submitted by students';
CREATE TABLE pu_00assignfeedback_editpdf_quick (
    id BIGINT(10) NOT NULL auto_increment,
    userid BIGINT(10) NOT NULL DEFAULT 0,
    rawtext LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    width BIGINT(10) NOT NULL DEFAULT 120,
    colour VARCHAR(10) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT 'yellow',
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00assieditquic_use_ix (userid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Stores teacher specified quicklist comments';
CREATE TABLE pu_00assignfeedback_editpdf_queue (
    id BIGINT(10) NOT NULL auto_increment,
    submissionid BIGINT(10) NOT NULL,
    submissionattempt BIGINT(10) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Queue for processing.';
CREATE TABLE pu_00assignfeedback_file (
    id BIGINT(10) NOT NULL auto_increment,
    assignment BIGINT(10) NOT NULL DEFAULT 0,
    grade BIGINT(10) NOT NULL DEFAULT 0,
    numfiles BIGINT(10) NOT NULL DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00assifile_ass2_ix (assignment)
, KEY pu_00assifile_gra_ix (grade)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Stores info about the number of files submitted by a student';
CREATE TABLE pu_00ltiservice_gradebookservices (
    id BIGINT(10) NOT NULL auto_increment,
    gradeitemid BIGINT(10) NOT NULL,
    courseid BIGINT(10) NOT NULL,
    toolproxyid BIGINT(10),
    typeid BIGINT(10),
    baseurl LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    ltilinkid BIGINT(10),
    tag VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00ltisgrad_lti_ix (ltilinkid)
, KEY pu_00ltisgrad_gra_ix (gradeitemid)
, KEY pu_00ltisgrad_cou_ix (courseid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='This file records the grade items created by the LTI Gradebo';
CREATE TABLE pu_00quiz_overview_regrades (
    id BIGINT(10) NOT NULL auto_increment,
    questionusageid BIGINT(10) NOT NULL,
    slot BIGINT(10) NOT NULL,
    newfraction NUMERIC(12,7),
    oldfraction NUMERIC(12,7),
    regraded SMALLINT(4) NOT NULL,
    timemodified BIGINT(10) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='This table records which question attempts need regrading an';
CREATE TABLE pu_00quiz_statistics (
    id BIGINT(10) NOT NULL auto_increment,
    hashcode VARCHAR(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    whichattempts SMALLINT(4) NOT NULL,
    timemodified BIGINT(10) NOT NULL,
    firstattemptscount BIGINT(10) NOT NULL,
    highestattemptscount BIGINT(10) NOT NULL,
    lastattemptscount BIGINT(10) NOT NULL,
    allattemptscount BIGINT(10) NOT NULL,
    firstattemptsavg NUMERIC(15,5),
    highestattemptsavg NUMERIC(15,5),
    lastattemptsavg NUMERIC(15,5),
    allattemptsavg NUMERIC(15,5),
    median NUMERIC(15,5),
    standarddeviation NUMERIC(15,5),
    skewness NUMERIC(15,10),
    kurtosis NUMERIC(15,5),
    cic NUMERIC(15,10),
    errorratio NUMERIC(15,10),
    standarderror NUMERIC(15,10),
CONSTRAINT  PRIMARY KEY (id)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='table to cache results from analysis done in statistics repo';
CREATE TABLE pu_00workshopform_accumulative (
    id BIGINT(10) NOT NULL auto_increment,
    workshopid BIGINT(10) NOT NULL,
    sort BIGINT(10) DEFAULT 0,
    description LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    descriptionformat SMALLINT(3) DEFAULT 0,
    grade BIGINT(10) NOT NULL,
    weight MEDIUMINT(5) DEFAULT 1,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00workaccu_wor_ix (workshopid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='The assessment dimensions definitions of Accumulative gradin';
CREATE TABLE pu_00workshopform_comments (
    id BIGINT(10) NOT NULL auto_increment,
    workshopid BIGINT(10) NOT NULL,
    sort BIGINT(10) DEFAULT 0,
    description LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    descriptionformat SMALLINT(3) DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00workcomm_wor_ix (workshopid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='The assessment dimensions definitions of Comments strategy f';
CREATE TABLE pu_00workshopform_numerrors (
    id BIGINT(10) NOT NULL auto_increment,
    workshopid BIGINT(10) NOT NULL,
    sort BIGINT(10) DEFAULT 0,
    description LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    descriptionformat SMALLINT(3) DEFAULT 0,
    descriptiontrust BIGINT(10),
    grade0 VARCHAR(50) CHARACTER SET utf8 COLLATE utf8_general_ci,
    grade1 VARCHAR(50) CHARACTER SET utf8 COLLATE utf8_general_ci,
    weight MEDIUMINT(5) DEFAULT 1,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00worknume_wor_ix (workshopid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='The assessment dimensions definitions of Number of errors gr';
CREATE TABLE pu_00workshopform_numerrors_map (
    id BIGINT(10) NOT NULL auto_increment,
    workshopid BIGINT(10) NOT NULL,
    nonegative BIGINT(10) NOT NULL,
    grade NUMERIC(10,5) NOT NULL,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00worknumemap_wor_ix (workshopid)
, UNIQUE KEY pu_00worknumemap_wornon_uix (workshopid, nonegative)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='This maps the number of errors to a percentual grade for sub';
CREATE TABLE pu_00workshopform_rubric (
    id BIGINT(10) NOT NULL auto_increment,
    workshopid BIGINT(10) NOT NULL,
    sort BIGINT(10) DEFAULT 0,
    description LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    descriptionformat SMALLINT(3) DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00workrubr_wor_ix (workshopid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='The assessment dimensions definitions of Rubric grading stra';
CREATE TABLE pu_00workshopform_rubric_levels (
    id BIGINT(10) NOT NULL auto_increment,
    dimensionid BIGINT(10) NOT NULL,
    grade NUMERIC(10,5) NOT NULL,
    definition LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    definitionformat SMALLINT(3) DEFAULT 0,
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00workrubrleve_dim_ix (dimensionid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='The definition of rubric rating scales';
CREATE TABLE pu_00workshopform_rubric_config (
    id BIGINT(10) NOT NULL auto_increment,
    workshopid BIGINT(10) NOT NULL,
    layout VARCHAR(30) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT 'list',
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00workrubrconf_wor_uix (workshopid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Configuration table for the Rubric grading strategy';
CREATE TABLE pu_00workshopallocation_scheduled (
    id BIGINT(10) NOT NULL auto_increment,
    workshopid BIGINT(10) NOT NULL,
    enabled TINYINT(2) NOT NULL DEFAULT 0,
    submissionend BIGINT(10) NOT NULL,
    timeallocated BIGINT(10),
    settings LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    resultstatus BIGINT(10),
    resultmessage VARCHAR(1333) CHARACTER SET utf8 COLLATE utf8_general_ci,
    resultlog LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00worksche_wor_uix (workshopid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Stores the allocation settings for the scheduled allocator';
CREATE TABLE pu_00workshopeval_best_settings (
    id BIGINT(10) NOT NULL auto_increment,
    workshopid BIGINT(10) NOT NULL,
    comparison SMALLINT(3) DEFAULT 5,
CONSTRAINT  PRIMARY KEY (id)
, UNIQUE KEY pu_00workbestsett_wor_uix (workshopid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Settings for the grading evaluation subplugin Comparison wit';
CREATE TABLE pu_00logstore_standard_log (
    id BIGINT(10) NOT NULL auto_increment,
    eventname VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    component VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    action VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    target VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    objecttable VARCHAR(50) CHARACTER SET utf8 COLLATE utf8_general_ci,
    objectid BIGINT(10),
    crud VARCHAR(1) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
    edulevel TINYINT(1) NOT NULL,
    contextid BIGINT(10) NOT NULL,
    contextlevel BIGINT(10) NOT NULL,
    contextinstanceid BIGINT(10) NOT NULL,
    userid BIGINT(10) NOT NULL,
    courseid BIGINT(10),
    relateduserid BIGINT(10),
    anonymous TINYINT(1) NOT NULL DEFAULT 0,
    other LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
    timecreated BIGINT(10) NOT NULL,
    origin VARCHAR(10) CHARACTER SET utf8 COLLATE utf8_general_ci,
    ip VARCHAR(45) CHARACTER SET utf8 COLLATE utf8_general_ci,
    realuserid BIGINT(10),
CONSTRAINT  PRIMARY KEY (id)
, KEY pu_00logsstanlog_tim_ix (timecreated)
, KEY pu_00logsstanlog_couanotim_ix (courseid, anonymous, timecreated)
, KEY pu_00logsstanlog_useconconc_ix (userid, contextlevel, contextinstanceid, crud, edulevel, timecreated)
, KEY pu_00logsstanlog_con_ix (contextid)
)
 ENGINE = InnoDB
 DEFAULT CHARACTER SET utf8
 DEFAULT COLLATE = utf8_general_ci 
 ROW_FORMAT=Dynamic
 COMMENT='Standard log table';
ALTER TABLE pu_00appraisal AUTO_INCREMENT = 106002;
ALTER TABLE pu_00appraisal_event AUTO_INCREMENT = 107001;
ALTER TABLE pu_00appraisal_event_message AUTO_INCREMENT = 108001;
ALTER TABLE pu_00appraisal_event_rcpt AUTO_INCREMENT = 109001;
ALTER TABLE pu_00appraisal_grp_cohort AUTO_INCREMENT = 110001;
ALTER TABLE pu_00appraisal_grp_org AUTO_INCREMENT = 111001;
ALTER TABLE pu_00appraisal_grp_pos AUTO_INCREMENT = 112001;
ALTER TABLE pu_00appraisal_history AUTO_INCREMENT = 113001;
ALTER TABLE pu_00appraisal_quest_field AUTO_INCREMENT = 114015;
ALTER TABLE pu_00appraisal_quest_field_role AUTO_INCREMENT = 115029;
ALTER TABLE pu_00appraisal_review_data AUTO_INCREMENT = 116001;
ALTER TABLE pu_00appraisal_role_assignment AUTO_INCREMENT = 117001;
ALTER TABLE pu_00appraisal_role_changes AUTO_INCREMENT = 118001;
ALTER TABLE pu_00appraisal_scale AUTO_INCREMENT = 119002;
ALTER TABLE pu_00appraisal_scale_data AUTO_INCREMENT = 120001;
ALTER TABLE pu_00appraisal_scale_value AUTO_INCREMENT = 121003;
ALTER TABLE pu_00appraisal_stage AUTO_INCREMENT = 122004;
ALTER TABLE pu_00appraisal_stage_data AUTO_INCREMENT = 123001;
ALTER TABLE pu_00appraisal_stage_page AUTO_INCREMENT = 124011;
ALTER TABLE pu_00appraisal_stage_role_setting AUTO_INCREMENT = 125007;
ALTER TABLE pu_00appraisal_user_assignment AUTO_INCREMENT = 126001;
ALTER TABLE pu_00appraisal_user_event AUTO_INCREMENT = 127001;
ALTER TABLE pu_00assign AUTO_INCREMENT = 128001;
ALTER TABLE pu_00assign_grades AUTO_INCREMENT = 129001;
ALTER TABLE pu_00assign_overrides AUTO_INCREMENT = 130001;
ALTER TABLE pu_00assign_plugin_config AUTO_INCREMENT = 131001;
ALTER TABLE pu_00assign_submission AUTO_INCREMENT = 132001;
ALTER TABLE pu_00assign_user_flags AUTO_INCREMENT = 133001;
ALTER TABLE pu_00assign_user_mapping AUTO_INCREMENT = 134001;
ALTER TABLE pu_00assignfeedback_comments AUTO_INCREMENT = 135001;
ALTER TABLE pu_00assignfeedback_editpdf_annot AUTO_INCREMENT = 136001;
ALTER TABLE pu_00assignfeedback_editpdf_cmnt AUTO_INCREMENT = 137001;
ALTER TABLE pu_00assignfeedback_editpdf_queue AUTO_INCREMENT = 138001;
ALTER TABLE pu_00assignfeedback_editpdf_quick AUTO_INCREMENT = 139001;
ALTER TABLE pu_00assignfeedback_file AUTO_INCREMENT = 140001;
ALTER TABLE pu_00assignsubmission_file AUTO_INCREMENT = 141001;
ALTER TABLE pu_00assignsubmission_onlinetext AUTO_INCREMENT = 142001;
ALTER TABLE pu_00auth_approved_request AUTO_INCREMENT = 143001;
ALTER TABLE pu_00auth_approved_request_snapshots AUTO_INCREMENT = 144001;
ALTER TABLE pu_00auth_connect_ids AUTO_INCREMENT = 145001;
ALTER TABLE pu_00auth_connect_servers AUTO_INCREMENT = 146001;
ALTER TABLE pu_00auth_connect_sso_requests AUTO_INCREMENT = 147001;
ALTER TABLE pu_00auth_connect_sso_sessions AUTO_INCREMENT = 148001;
ALTER TABLE pu_00auth_connect_user_collections AUTO_INCREMENT = 149001;
ALTER TABLE pu_00auth_connect_users AUTO_INCREMENT = 150001;
ALTER TABLE pu_00auth_oauth2_linked_login AUTO_INCREMENT = 151001;
ALTER TABLE pu_00backup_controllers AUTO_INCREMENT = 152001;
ALTER TABLE pu_00backup_courses AUTO_INCREMENT = 153001;
ALTER TABLE pu_00backup_logs AUTO_INCREMENT = 154001;
ALTER TABLE pu_00backup_trusted_files AUTO_INCREMENT = 155001;
ALTER TABLE pu_00badge AUTO_INCREMENT = 156001;
ALTER TABLE pu_00badge_backpack AUTO_INCREMENT = 157001;
ALTER TABLE pu_00badge_criteria AUTO_INCREMENT = 158001;
ALTER TABLE pu_00badge_criteria_met AUTO_INCREMENT = 159001;
ALTER TABLE pu_00badge_criteria_param AUTO_INCREMENT = 160001;
ALTER TABLE pu_00badge_endorsement AUTO_INCREMENT = 161001;
ALTER TABLE pu_00badge_external AUTO_INCREMENT = 162001;
ALTER TABLE pu_00badge_external_backpack AUTO_INCREMENT = 163002;
ALTER TABLE pu_00badge_external_identifier AUTO_INCREMENT = 164001;
ALTER TABLE pu_00badge_issued AUTO_INCREMENT = 165001;
ALTER TABLE pu_00badge_manual_award AUTO_INCREMENT = 166001;
ALTER TABLE pu_00badge_related AUTO_INCREMENT = 167001;
ALTER TABLE pu_00block AUTO_INCREMENT = 168062;
ALTER TABLE pu_00block_instances AUTO_INCREMENT = 169026;
ALTER TABLE pu_00block_positions AUTO_INCREMENT = 170001;
ALTER TABLE pu_00block_quicklinks AUTO_INCREMENT = 171004;
ALTER TABLE pu_00block_recent_activity AUTO_INCREMENT = 172001;
ALTER TABLE pu_00block_rss_client AUTO_INCREMENT = 173001;
ALTER TABLE pu_00block_totara_featured_links_tiles AUTO_INCREMENT = 174001;
ALTER TABLE pu_00block_totara_stats AUTO_INCREMENT = 175001;
ALTER TABLE pu_00blog_association AUTO_INCREMENT = 176001;
ALTER TABLE pu_00blog_external AUTO_INCREMENT = 177001;
ALTER TABLE pu_00book AUTO_INCREMENT = 178001;
ALTER TABLE pu_00book_chapters AUTO_INCREMENT = 179001;
ALTER TABLE pu_00cache_filters AUTO_INCREMENT = 180001;
ALTER TABLE pu_00cache_flags AUTO_INCREMENT = 181001;
ALTER TABLE pu_00capabilities AUTO_INCREMENT = 182830;
ALTER TABLE pu_00catalog AUTO_INCREMENT = 183001;
ALTER TABLE pu_00catalog_search_metadata AUTO_INCREMENT = 184001;
ALTER TABLE pu_00certif AUTO_INCREMENT = 185001;
ALTER TABLE pu_00certif_completion AUTO_INCREMENT = 186001;
ALTER TABLE pu_00certif_completion_history AUTO_INCREMENT = 187001;
ALTER TABLE pu_00certificate AUTO_INCREMENT = 188001;
ALTER TABLE pu_00certificate_issues AUTO_INCREMENT = 189001;
ALTER TABLE pu_00certificate_issues_history AUTO_INCREMENT = 190001;
ALTER TABLE pu_00chat AUTO_INCREMENT = 191001;
ALTER TABLE pu_00chat_messages AUTO_INCREMENT = 192001;
ALTER TABLE pu_00chat_messages_current AUTO_INCREMENT = 193001;
ALTER TABLE pu_00chat_users AUTO_INCREMENT = 194001;
ALTER TABLE pu_00choice AUTO_INCREMENT = 195001;
ALTER TABLE pu_00choice_answers AUTO_INCREMENT = 196001;
ALTER TABLE pu_00choice_options AUTO_INCREMENT = 197001;
ALTER TABLE pu_00cohort AUTO_INCREMENT = 198001;
ALTER TABLE pu_00cohort_members AUTO_INCREMENT = 199001;
ALTER TABLE pu_00cohort_msg_queue AUTO_INCREMENT = 200001;
ALTER TABLE pu_00cohort_plan_config AUTO_INCREMENT = 201001;
ALTER TABLE pu_00cohort_plan_history AUTO_INCREMENT = 202001;
ALTER TABLE pu_00cohort_role AUTO_INCREMENT = 203001;
ALTER TABLE pu_00cohort_rule_collections AUTO_INCREMENT = 204001;
ALTER TABLE pu_00cohort_rule_params AUTO_INCREMENT = 205001;
ALTER TABLE pu_00cohort_rules AUTO_INCREMENT = 206001;
ALTER TABLE pu_00cohort_rulesets AUTO_INCREMENT = 207001;
ALTER TABLE pu_00cohort_visibility AUTO_INCREMENT = 208001;
ALTER TABLE pu_00comments AUTO_INCREMENT = 209001;
ALTER TABLE pu_00comp AUTO_INCREMENT = 210001;
ALTER TABLE pu_00comp_criteria AUTO_INCREMENT = 211001;
ALTER TABLE pu_00comp_criteria_record AUTO_INCREMENT = 212001;
ALTER TABLE pu_00comp_framework AUTO_INCREMENT = 213001;
ALTER TABLE pu_00comp_record AUTO_INCREMENT = 214001;
ALTER TABLE pu_00comp_record_history AUTO_INCREMENT = 215001;
ALTER TABLE pu_00comp_relations AUTO_INCREMENT = 216001;
ALTER TABLE pu_00comp_scale AUTO_INCREMENT = 217002;
ALTER TABLE pu_00comp_scale_assignments AUTO_INCREMENT = 218001;
ALTER TABLE pu_00comp_scale_values AUTO_INCREMENT = 219004;
ALTER TABLE pu_00comp_template AUTO_INCREMENT = 220001;
ALTER TABLE pu_00comp_template_assignment AUTO_INCREMENT = 221001;
ALTER TABLE pu_00comp_type AUTO_INCREMENT = 222001;
ALTER TABLE pu_00comp_type_info_data AUTO_INCREMENT = 223001;
ALTER TABLE pu_00comp_type_info_data_param AUTO_INCREMENT = 224001;
ALTER TABLE pu_00comp_type_info_field AUTO_INCREMENT = 225001;
ALTER TABLE pu_00competency AUTO_INCREMENT = 226001;
ALTER TABLE pu_00competency_coursecomp AUTO_INCREMENT = 227001;
ALTER TABLE pu_00competency_coursecompsetting AUTO_INCREMENT = 228001;
ALTER TABLE pu_00competency_evidence AUTO_INCREMENT = 229001;
ALTER TABLE pu_00competency_framework AUTO_INCREMENT = 230001;
ALTER TABLE pu_00competency_modulecomp AUTO_INCREMENT = 231001;
ALTER TABLE pu_00competency_plan AUTO_INCREMENT = 232001;
ALTER TABLE pu_00competency_plancomp AUTO_INCREMENT = 233001;
ALTER TABLE pu_00competency_relatedcomp AUTO_INCREMENT = 234001;
ALTER TABLE pu_00competency_template AUTO_INCREMENT = 235001;
ALTER TABLE pu_00competency_templatecohort AUTO_INCREMENT = 236001;
ALTER TABLE pu_00competency_templatecomp AUTO_INCREMENT = 237001;
ALTER TABLE pu_00competency_usercomp AUTO_INCREMENT = 238001;
ALTER TABLE pu_00competency_usercompcourse AUTO_INCREMENT = 239001;
ALTER TABLE pu_00competency_usercompplan AUTO_INCREMENT = 240001;
ALTER TABLE pu_00competency_userevidence AUTO_INCREMENT = 241001;
ALTER TABLE pu_00competency_userevidencecomp AUTO_INCREMENT = 242001;
ALTER TABLE pu_00config AUTO_INCREMENT = 243538;
ALTER TABLE pu_00config_log AUTO_INCREMENT = 244001;
ALTER TABLE pu_00config_plugins AUTO_INCREMENT = 247040;
ALTER TABLE pu_00context AUTO_INCREMENT = 246031;
ALTER TABLE pu_00context_map AUTO_INCREMENT = 247063;
ALTER TABLE pu_00course AUTO_INCREMENT = 248002;
ALTER TABLE pu_00course_categories AUTO_INCREMENT = 249002;
ALTER TABLE pu_00course_completion_aggr_methd AUTO_INCREMENT = 250001;
ALTER TABLE pu_00course_completion_crit_compl AUTO_INCREMENT = 251001;
ALTER TABLE pu_00course_completion_criteria AUTO_INCREMENT = 252001;
ALTER TABLE pu_00course_completion_defaults AUTO_INCREMENT = 253001;
ALTER TABLE pu_00course_completion_history AUTO_INCREMENT = 254001;
ALTER TABLE pu_00course_completion_log AUTO_INCREMENT = 255001;
ALTER TABLE pu_00course_completions AUTO_INCREMENT = 256001;
ALTER TABLE pu_00course_format_options AUTO_INCREMENT = 257002;
ALTER TABLE pu_00course_info_data AUTO_INCREMENT = 258001;
ALTER TABLE pu_00course_info_data_param AUTO_INCREMENT = 259001;
ALTER TABLE pu_00course_info_field AUTO_INCREMENT = 260001;
ALTER TABLE pu_00course_modules AUTO_INCREMENT = 261001;
ALTER TABLE pu_00course_modules_completion AUTO_INCREMENT = 262001;
ALTER TABLE pu_00course_published AUTO_INCREMENT = 263001;
ALTER TABLE pu_00course_request AUTO_INCREMENT = 264001;
ALTER TABLE pu_00course_sections AUTO_INCREMENT = 265001;
ALTER TABLE pu_00data AUTO_INCREMENT = 266001;
ALTER TABLE pu_00data_content AUTO_INCREMENT = 267001;
ALTER TABLE pu_00data_fields AUTO_INCREMENT = 268001;
ALTER TABLE pu_00data_records AUTO_INCREMENT = 269001;
ALTER TABLE pu_00dp_competency_settings AUTO_INCREMENT = 270002;
ALTER TABLE pu_00dp_component_settings AUTO_INCREMENT = 271005;
ALTER TABLE pu_00dp_course_settings AUTO_INCREMENT = 272002;
ALTER TABLE pu_00dp_evidence_type AUTO_INCREMENT = 273001;
ALTER TABLE pu_00dp_objective_scale AUTO_INCREMENT = 274002;
ALTER TABLE pu_00dp_objective_scale_value AUTO_INCREMENT = 275004;
ALTER TABLE pu_00dp_objective_settings AUTO_INCREMENT = 276002;
ALTER TABLE pu_00dp_permissions AUTO_INCREMENT = 277053;
ALTER TABLE pu_00dp_plan AUTO_INCREMENT = 278001;
ALTER TABLE pu_00dp_plan_competency_assign AUTO_INCREMENT = 279001;
ALTER TABLE pu_00dp_plan_component_relation AUTO_INCREMENT = 280001;
ALTER TABLE pu_00dp_plan_course_assign AUTO_INCREMENT = 281001;
ALTER TABLE pu_00dp_plan_evidence AUTO_INCREMENT = 282001;
ALTER TABLE pu_00dp_plan_evidence_info_data AUTO_INCREMENT = 283001;
ALTER TABLE pu_00dp_plan_evidence_info_data_param AUTO_INCREMENT = 284001;
ALTER TABLE pu_00dp_plan_evidence_info_field AUTO_INCREMENT = 285004;
ALTER TABLE pu_00dp_plan_evidence_relation AUTO_INCREMENT = 286001;
ALTER TABLE pu_00dp_plan_history AUTO_INCREMENT = 287001;
ALTER TABLE pu_00dp_plan_objective AUTO_INCREMENT = 288001;
ALTER TABLE pu_00dp_plan_program_assign AUTO_INCREMENT = 289001;
ALTER TABLE pu_00dp_plan_settings AUTO_INCREMENT = 290002;
ALTER TABLE pu_00dp_priority_scale AUTO_INCREMENT = 291002;
ALTER TABLE pu_00dp_priority_scale_value AUTO_INCREMENT = 292004;
ALTER TABLE pu_00dp_program_settings AUTO_INCREMENT = 293002;
ALTER TABLE pu_00dp_template AUTO_INCREMENT = 294002;
ALTER TABLE pu_00editor_atto_autosave AUTO_INCREMENT = 295001;
ALTER TABLE pu_00enrol AUTO_INCREMENT = 296001;
ALTER TABLE pu_00enrol_flatfile AUTO_INCREMENT = 297001;
ALTER TABLE pu_00enrol_lti_lti2_consumer AUTO_INCREMENT = 298001;
ALTER TABLE pu_00enrol_lti_lti2_context AUTO_INCREMENT = 299001;
ALTER TABLE pu_00enrol_lti_lti2_nonce AUTO_INCREMENT = 300001;
ALTER TABLE pu_00enrol_lti_lti2_resource_link AUTO_INCREMENT = 301001;
ALTER TABLE pu_00enrol_lti_lti2_share_key AUTO_INCREMENT = 302001;
ALTER TABLE pu_00enrol_lti_lti2_tool_proxy AUTO_INCREMENT = 303001;
ALTER TABLE pu_00enrol_lti_lti2_user_result AUTO_INCREMENT = 304001;
ALTER TABLE pu_00enrol_lti_tool_consumer_map AUTO_INCREMENT = 305001;
ALTER TABLE pu_00enrol_lti_tools AUTO_INCREMENT = 306001;
ALTER TABLE pu_00enrol_lti_users AUTO_INCREMENT = 307001;
ALTER TABLE pu_00enrol_paypal AUTO_INCREMENT = 308001;
ALTER TABLE pu_00enrol_totara_f2f_pending AUTO_INCREMENT = 309001;
ALTER TABLE pu_00event AUTO_INCREMENT = 310001;
ALTER TABLE pu_00event_subscriptions AUTO_INCREMENT = 311001;
ALTER TABLE pu_00events_handlers AUTO_INCREMENT = 312001;
ALTER TABLE pu_00events_queue AUTO_INCREMENT = 313001;
ALTER TABLE pu_00events_queue_handlers AUTO_INCREMENT = 314001;
ALTER TABLE pu_00external_functions AUTO_INCREMENT = 315346;
ALTER TABLE pu_00external_services AUTO_INCREMENT = 316001;
ALTER TABLE pu_00external_services_functions AUTO_INCREMENT = 317001;
ALTER TABLE pu_00external_services_users AUTO_INCREMENT = 318001;
ALTER TABLE pu_00external_tokens AUTO_INCREMENT = 319001;
ALTER TABLE pu_00facetoface AUTO_INCREMENT = 320001;
ALTER TABLE pu_00facetoface_asset AUTO_INCREMENT = 321001;
ALTER TABLE pu_00facetoface_asset_dates AUTO_INCREMENT = 322001;
ALTER TABLE pu_00facetoface_asset_info_data AUTO_INCREMENT = 323001;
ALTER TABLE pu_00facetoface_asset_info_data_param AUTO_INCREMENT = 324001;
ALTER TABLE pu_00facetoface_asset_info_field AUTO_INCREMENT = 325001;
ALTER TABLE pu_00facetoface_cancellation_info_data AUTO_INCREMENT = 326001;
ALTER TABLE pu_00facetoface_cancellation_info_data_param AUTO_INCREMENT = 327001;
ALTER TABLE pu_00facetoface_cancellation_info_field AUTO_INCREMENT = 328002;
ALTER TABLE pu_00facetoface_facilitator AUTO_INCREMENT = 329001;
ALTER TABLE pu_00facetoface_facilitator_dates AUTO_INCREMENT = 330001;
ALTER TABLE pu_00facetoface_facilitator_info_data AUTO_INCREMENT = 331001;
ALTER TABLE pu_00facetoface_facilitator_info_data_param AUTO_INCREMENT = 332001;
ALTER TABLE pu_00facetoface_facilitator_info_field AUTO_INCREMENT = 333001;
ALTER TABLE pu_00facetoface_interest AUTO_INCREMENT = 334001;
ALTER TABLE pu_00facetoface_notification AUTO_INCREMENT = 335001;
ALTER TABLE pu_00facetoface_notification_hist AUTO_INCREMENT = 336001;
ALTER TABLE pu_00facetoface_notification_sent AUTO_INCREMENT = 337001;
ALTER TABLE pu_00facetoface_notification_tpl AUTO_INCREMENT = 338020;
ALTER TABLE pu_00facetoface_room AUTO_INCREMENT = 339001;
ALTER TABLE pu_00facetoface_room_dates AUTO_INCREMENT = 340001;
ALTER TABLE pu_00facetoface_room_info_data AUTO_INCREMENT = 341001;
ALTER TABLE pu_00facetoface_room_info_data_param AUTO_INCREMENT = 342001;
ALTER TABLE pu_00facetoface_room_info_field AUTO_INCREMENT = 343003;
ALTER TABLE pu_00facetoface_session_info_data AUTO_INCREMENT = 344001;
ALTER TABLE pu_00facetoface_session_info_data_param AUTO_INCREMENT = 345001;
ALTER TABLE pu_00facetoface_session_info_field AUTO_INCREMENT = 346001;
ALTER TABLE pu_00facetoface_session_roles AUTO_INCREMENT = 347001;
ALTER TABLE pu_00facetoface_sessioncancel_info_data AUTO_INCREMENT = 348001;
ALTER TABLE pu_00facetoface_sessioncancel_info_data_param AUTO_INCREMENT = 349001;
ALTER TABLE pu_00facetoface_sessioncancel_info_field AUTO_INCREMENT = 350001;
ALTER TABLE pu_00facetoface_sessions AUTO_INCREMENT = 351001;
ALTER TABLE pu_00facetoface_sessions_dates AUTO_INCREMENT = 352001;
ALTER TABLE pu_00facetoface_signup_info_data AUTO_INCREMENT = 353001;
ALTER TABLE pu_00facetoface_signup_info_data_param AUTO_INCREMENT = 354001;
ALTER TABLE pu_00facetoface_signup_info_field AUTO_INCREMENT = 355002;
ALTER TABLE pu_00facetoface_signups AUTO_INCREMENT = 356001;
ALTER TABLE pu_00facetoface_signups_dates_status AUTO_INCREMENT = 357001;
ALTER TABLE pu_00facetoface_signups_status AUTO_INCREMENT = 358001;
ALTER TABLE pu_00feedback AUTO_INCREMENT = 359001;
ALTER TABLE pu_00feedback360 AUTO_INCREMENT = 360001;
ALTER TABLE pu_00feedback360_email_assignment AUTO_INCREMENT = 361001;
ALTER TABLE pu_00feedback360_grp_cohort AUTO_INCREMENT = 362001;
ALTER TABLE pu_00feedback360_grp_org AUTO_INCREMENT = 363001;
ALTER TABLE pu_00feedback360_grp_pos AUTO_INCREMENT = 364001;
ALTER TABLE pu_00feedback360_quest_field AUTO_INCREMENT = 365001;
ALTER TABLE pu_00feedback360_resp_assignment AUTO_INCREMENT = 366001;
ALTER TABLE pu_00feedback360_scale AUTO_INCREMENT = 367001;
ALTER TABLE pu_00feedback360_scale_data AUTO_INCREMENT = 368001;
ALTER TABLE pu_00feedback360_scale_value AUTO_INCREMENT = 369001;
ALTER TABLE pu_00feedback360_user_assignment AUTO_INCREMENT = 370001;
ALTER TABLE pu_00feedback_completed AUTO_INCREMENT = 371001;
ALTER TABLE pu_00feedback_completed_history AUTO_INCREMENT = 372001;
ALTER TABLE pu_00feedback_completedtmp AUTO_INCREMENT = 373001;
ALTER TABLE pu_00feedback_item AUTO_INCREMENT = 374001;
ALTER TABLE pu_00feedback_sitecourse_map AUTO_INCREMENT = 375001;
ALTER TABLE pu_00feedback_template AUTO_INCREMENT = 376001;
ALTER TABLE pu_00feedback_value AUTO_INCREMENT = 377001;
ALTER TABLE pu_00feedback_value_history AUTO_INCREMENT = 378001;
ALTER TABLE pu_00feedback_valuetmp AUTO_INCREMENT = 379001;
ALTER TABLE pu_00file_conversion AUTO_INCREMENT = 380001;
ALTER TABLE pu_00files AUTO_INCREMENT = 381006;
ALTER TABLE pu_00files_reference AUTO_INCREMENT = 382001;
ALTER TABLE pu_00filter_active AUTO_INCREMENT = 383004;
ALTER TABLE pu_00filter_config AUTO_INCREMENT = 384001;
ALTER TABLE pu_00folder AUTO_INCREMENT = 385001;
ALTER TABLE pu_00forum AUTO_INCREMENT = 386001;
ALTER TABLE pu_00forum_digests AUTO_INCREMENT = 387001;
ALTER TABLE pu_00forum_discussion_subs AUTO_INCREMENT = 388001;
ALTER TABLE pu_00forum_discussions AUTO_INCREMENT = 389001;
ALTER TABLE pu_00forum_posts AUTO_INCREMENT = 390001;
ALTER TABLE pu_00forum_queue AUTO_INCREMENT = 391001;
ALTER TABLE pu_00forum_read AUTO_INCREMENT = 392001;
ALTER TABLE pu_00forum_subscriptions AUTO_INCREMENT = 393001;
ALTER TABLE pu_00forum_track_prefs AUTO_INCREMENT = 394001;
ALTER TABLE pu_00gap_aspirational AUTO_INCREMENT = 395001;
ALTER TABLE pu_00glossary AUTO_INCREMENT = 396001;
ALTER TABLE pu_00glossary_alias AUTO_INCREMENT = 397001;
ALTER TABLE pu_00glossary_categories AUTO_INCREMENT = 398001;
ALTER TABLE pu_00glossary_entries AUTO_INCREMENT = 399001;
ALTER TABLE pu_00glossary_entries_categories AUTO_INCREMENT = 400001;
ALTER TABLE pu_00glossary_formats AUTO_INCREMENT = 401008;
ALTER TABLE pu_00goal AUTO_INCREMENT = 402001;
ALTER TABLE pu_00goal_framework AUTO_INCREMENT = 403001;
ALTER TABLE pu_00goal_grp_cohort AUTO_INCREMENT = 404001;
ALTER TABLE pu_00goal_grp_org AUTO_INCREMENT = 405001;
ALTER TABLE pu_00goal_grp_pos AUTO_INCREMENT = 406001;
ALTER TABLE pu_00goal_item_history AUTO_INCREMENT = 407001;
ALTER TABLE pu_00goal_personal AUTO_INCREMENT = 408001;
ALTER TABLE pu_00goal_record AUTO_INCREMENT = 409001;
ALTER TABLE pu_00goal_scale AUTO_INCREMENT = 410002;
ALTER TABLE pu_00goal_scale_assignments AUTO_INCREMENT = 411001;
ALTER TABLE pu_00goal_scale_values AUTO_INCREMENT = 412004;
ALTER TABLE pu_00goal_type AUTO_INCREMENT = 413001;
ALTER TABLE pu_00goal_type_info_data AUTO_INCREMENT = 414001;
ALTER TABLE pu_00goal_type_info_data_param AUTO_INCREMENT = 415001;
ALTER TABLE pu_00goal_type_info_field AUTO_INCREMENT = 416001;
ALTER TABLE pu_00goal_user_assignment AUTO_INCREMENT = 417001;
ALTER TABLE pu_00goal_user_info_data AUTO_INCREMENT = 418001;
ALTER TABLE pu_00goal_user_info_data_param AUTO_INCREMENT = 419001;
ALTER TABLE pu_00goal_user_info_field AUTO_INCREMENT = 420001;
ALTER TABLE pu_00goal_user_type AUTO_INCREMENT = 421001;
ALTER TABLE pu_00goal_user_type_cohort AUTO_INCREMENT = 422001;
ALTER TABLE pu_00grade_categories AUTO_INCREMENT = 423001;
ALTER TABLE pu_00grade_categories_history AUTO_INCREMENT = 424001;
ALTER TABLE pu_00grade_grades AUTO_INCREMENT = 425001;
ALTER TABLE pu_00grade_grades_history AUTO_INCREMENT = 426001;
ALTER TABLE pu_00grade_import_newitem AUTO_INCREMENT = 427001;
ALTER TABLE pu_00grade_import_values AUTO_INCREMENT = 428001;
ALTER TABLE pu_00grade_items AUTO_INCREMENT = 429001;
ALTER TABLE pu_00grade_items_history AUTO_INCREMENT = 430001;
ALTER TABLE pu_00grade_letters AUTO_INCREMENT = 431001;
ALTER TABLE pu_00grade_outcomes AUTO_INCREMENT = 432001;
ALTER TABLE pu_00grade_outcomes_courses AUTO_INCREMENT = 433001;
ALTER TABLE pu_00grade_outcomes_history AUTO_INCREMENT = 434001;
ALTER TABLE pu_00grade_settings AUTO_INCREMENT = 435001;
ALTER TABLE pu_00grading_areas AUTO_INCREMENT = 436001;
ALTER TABLE pu_00grading_definitions AUTO_INCREMENT = 437001;
ALTER TABLE pu_00grading_instances AUTO_INCREMENT = 438001;
ALTER TABLE pu_00gradingform_guide_comments AUTO_INCREMENT = 439001;
ALTER TABLE pu_00gradingform_guide_criteria AUTO_INCREMENT = 440001;
ALTER TABLE pu_00gradingform_guide_fillings AUTO_INCREMENT = 441001;
ALTER TABLE pu_00gradingform_rubric_criteria AUTO_INCREMENT = 442001;
ALTER TABLE pu_00gradingform_rubric_fillings AUTO_INCREMENT = 443001;
ALTER TABLE pu_00gradingform_rubric_levels AUTO_INCREMENT = 444001;
ALTER TABLE pu_00groupings AUTO_INCREMENT = 445001;
ALTER TABLE pu_00groupings_groups AUTO_INCREMENT = 446001;
ALTER TABLE pu_00groups AUTO_INCREMENT = 447001;
ALTER TABLE pu_00groups_members AUTO_INCREMENT = 448001;
ALTER TABLE pu_00imscp AUTO_INCREMENT = 449001;
ALTER TABLE pu_00job_assignment AUTO_INCREMENT = 450001;
ALTER TABLE pu_00label AUTO_INCREMENT = 451001;
ALTER TABLE pu_00lesson AUTO_INCREMENT = 452001;
ALTER TABLE pu_00lesson_answers AUTO_INCREMENT = 453001;
ALTER TABLE pu_00lesson_attempts AUTO_INCREMENT = 454001;
ALTER TABLE pu_00lesson_branch AUTO_INCREMENT = 455001;
ALTER TABLE pu_00lesson_grades AUTO_INCREMENT = 456001;
ALTER TABLE pu_00lesson_overrides AUTO_INCREMENT = 457001;
ALTER TABLE pu_00lesson_pages AUTO_INCREMENT = 458001;
ALTER TABLE pu_00lesson_timer AUTO_INCREMENT = 459001;
ALTER TABLE pu_00license AUTO_INCREMENT = 460010;
ALTER TABLE pu_00lock_db AUTO_INCREMENT = 461001;
ALTER TABLE pu_00log AUTO_INCREMENT = 462001;
ALTER TABLE pu_00log_display AUTO_INCREMENT = 463001;
ALTER TABLE pu_00log_queries AUTO_INCREMENT = 464001;
ALTER TABLE pu_00logstore_standard_log AUTO_INCREMENT = 465001;
ALTER TABLE pu_00lti AUTO_INCREMENT = 466001;
ALTER TABLE pu_00lti_access_tokens AUTO_INCREMENT = 467001;
ALTER TABLE pu_00lti_submission AUTO_INCREMENT = 468001;
ALTER TABLE pu_00lti_submission_history AUTO_INCREMENT = 469001;
ALTER TABLE pu_00lti_tool_proxies AUTO_INCREMENT = 470001;
ALTER TABLE pu_00lti_tool_settings AUTO_INCREMENT = 471001;
ALTER TABLE pu_00lti_types AUTO_INCREMENT = 472001;
ALTER TABLE pu_00lti_types_config AUTO_INCREMENT = 473001;
ALTER TABLE pu_00ltiservice_gradebookservices AUTO_INCREMENT = 474001;
ALTER TABLE pu_00message AUTO_INCREMENT = 475001;
ALTER TABLE pu_00message_contacts AUTO_INCREMENT = 476001;
ALTER TABLE pu_00message_metadata AUTO_INCREMENT = 477001;
ALTER TABLE pu_00message_popup AUTO_INCREMENT = 478001;
ALTER TABLE pu_00message_processors AUTO_INCREMENT = 479006;
ALTER TABLE pu_00message_providers AUTO_INCREMENT = 480040;
ALTER TABLE pu_00message_read AUTO_INCREMENT = 481001;
ALTER TABLE pu_00message_working AUTO_INCREMENT = 482001;
ALTER TABLE pu_00messageinbound_datakeys AUTO_INCREMENT = 483001;
ALTER TABLE pu_00messageinbound_handlers AUTO_INCREMENT = 484004;
ALTER TABLE pu_00messageinbound_messagelist AUTO_INCREMENT = 485001;
ALTER TABLE pu_00mnet_application AUTO_INCREMENT = 486003;
ALTER TABLE pu_00mnet_host AUTO_INCREMENT = 487003;
ALTER TABLE pu_00mnet_host2service AUTO_INCREMENT = 488001;
ALTER TABLE pu_00mnet_log AUTO_INCREMENT = 489001;
ALTER TABLE pu_00mnet_remote_rpc AUTO_INCREMENT = 490017;
ALTER TABLE pu_00mnet_remote_service2rpc AUTO_INCREMENT = 491017;
ALTER TABLE pu_00mnet_rpc AUTO_INCREMENT = 492016;
ALTER TABLE pu_00mnet_service AUTO_INCREMENT = 493005;
ALTER TABLE pu_00mnet_service2rpc AUTO_INCREMENT = 494016;
ALTER TABLE pu_00mnet_session AUTO_INCREMENT = 495001;
ALTER TABLE pu_00mnet_sso_access_control AUTO_INCREMENT = 496001;
ALTER TABLE pu_00mnetservice_enrol_courses AUTO_INCREMENT = 497001;
ALTER TABLE pu_00mnetservice_enrol_enrolments AUTO_INCREMENT = 498001;
ALTER TABLE pu_00modules AUTO_INCREMENT = 499024;
ALTER TABLE pu_00my_pages AUTO_INCREMENT = 500003;
ALTER TABLE pu_00oauth2_access_token AUTO_INCREMENT = 501001;
ALTER TABLE pu_00oauth2_endpoint AUTO_INCREMENT = 502001;
ALTER TABLE pu_00oauth2_issuer AUTO_INCREMENT = 503001;
ALTER TABLE pu_00oauth2_system_account AUTO_INCREMENT = 504001;
ALTER TABLE pu_00oauth2_user_field_mapping AUTO_INCREMENT = 505001;
ALTER TABLE pu_00org AUTO_INCREMENT = 506001;
ALTER TABLE pu_00org_competencies AUTO_INCREMENT = 507001;
ALTER TABLE pu_00org_framework AUTO_INCREMENT = 508001;
ALTER TABLE pu_00org_relations AUTO_INCREMENT = 509001;
ALTER TABLE pu_00org_type AUTO_INCREMENT = 510001;
ALTER TABLE pu_00org_type_info_data AUTO_INCREMENT = 511001;
ALTER TABLE pu_00org_type_info_data_param AUTO_INCREMENT = 512001;
ALTER TABLE pu_00org_type_info_field AUTO_INCREMENT = 513001;
ALTER TABLE pu_00page AUTO_INCREMENT = 514001;
ALTER TABLE pu_00persistent_login AUTO_INCREMENT = 515001;
ALTER TABLE pu_00portfolio_instance AUTO_INCREMENT = 516001;
ALTER TABLE pu_00portfolio_instance_config AUTO_INCREMENT = 517001;
ALTER TABLE pu_00portfolio_instance_user AUTO_INCREMENT = 518001;
ALTER TABLE pu_00portfolio_log AUTO_INCREMENT = 519001;
ALTER TABLE pu_00portfolio_mahara_queue AUTO_INCREMENT = 520001;
ALTER TABLE pu_00portfolio_tempdata AUTO_INCREMENT = 521001;
ALTER TABLE pu_00pos AUTO_INCREMENT = 522001;
ALTER TABLE pu_00pos_competencies AUTO_INCREMENT = 523001;
ALTER TABLE pu_00pos_framework AUTO_INCREMENT = 524001;
ALTER TABLE pu_00pos_relations AUTO_INCREMENT = 525001;
ALTER TABLE pu_00pos_type AUTO_INCREMENT = 526001;
ALTER TABLE pu_00pos_type_info_data AUTO_INCREMENT = 527001;
ALTER TABLE pu_00pos_type_info_data_param AUTO_INCREMENT = 528001;
ALTER TABLE pu_00pos_type_info_field AUTO_INCREMENT = 529001;
ALTER TABLE pu_00post AUTO_INCREMENT = 530001;
ALTER TABLE pu_00profiling AUTO_INCREMENT = 531001;
ALTER TABLE pu_00prog AUTO_INCREMENT = 532001;
ALTER TABLE pu_00prog_assignment AUTO_INCREMENT = 533001;
ALTER TABLE pu_00prog_completion AUTO_INCREMENT = 534001;
ALTER TABLE pu_00prog_completion_history AUTO_INCREMENT = 535001;
ALTER TABLE pu_00prog_completion_log AUTO_INCREMENT = 536001;
ALTER TABLE pu_00prog_courseset AUTO_INCREMENT = 537001;
ALTER TABLE pu_00prog_courseset_course AUTO_INCREMENT = 538001;
ALTER TABLE pu_00prog_exception AUTO_INCREMENT = 539001;
ALTER TABLE pu_00prog_extension AUTO_INCREMENT = 540001;
ALTER TABLE pu_00prog_future_user_assignment AUTO_INCREMENT = 541001;
ALTER TABLE pu_00prog_info_data AUTO_INCREMENT = 542001;
ALTER TABLE pu_00prog_info_data_param AUTO_INCREMENT = 543001;
ALTER TABLE pu_00prog_info_field AUTO_INCREMENT = 544001;
ALTER TABLE pu_00prog_message AUTO_INCREMENT = 545001;
ALTER TABLE pu_00prog_messagelog AUTO_INCREMENT = 546001;
ALTER TABLE pu_00prog_recurrence AUTO_INCREMENT = 547001;
ALTER TABLE pu_00prog_user_assignment AUTO_INCREMENT = 548001;
ALTER TABLE pu_00qtype_ddimageortext AUTO_INCREMENT = 549001;
ALTER TABLE pu_00qtype_ddimageortext_drags AUTO_INCREMENT = 550001;
ALTER TABLE pu_00qtype_ddimageortext_drops AUTO_INCREMENT = 551001;
ALTER TABLE pu_00qtype_ddmarker AUTO_INCREMENT = 552001;
ALTER TABLE pu_00qtype_ddmarker_drags AUTO_INCREMENT = 553001;
ALTER TABLE pu_00qtype_ddmarker_drops AUTO_INCREMENT = 554001;
ALTER TABLE pu_00qtype_essay_options AUTO_INCREMENT = 555001;
ALTER TABLE pu_00qtype_match_options AUTO_INCREMENT = 556001;
ALTER TABLE pu_00qtype_match_subquestions AUTO_INCREMENT = 557001;
ALTER TABLE pu_00qtype_multichoice_options AUTO_INCREMENT = 558001;
ALTER TABLE pu_00qtype_randomsamatch_options AUTO_INCREMENT = 559001;
ALTER TABLE pu_00qtype_shortanswer_options AUTO_INCREMENT = 560001;
ALTER TABLE pu_00question AUTO_INCREMENT = 561001;
ALTER TABLE pu_00question_answers AUTO_INCREMENT = 562001;
ALTER TABLE pu_00question_attempt_step_data AUTO_INCREMENT = 563001;
ALTER TABLE pu_00question_attempt_steps AUTO_INCREMENT = 564001;
ALTER TABLE pu_00question_attempts AUTO_INCREMENT = 565001;
ALTER TABLE pu_00question_calculated AUTO_INCREMENT = 566001;
ALTER TABLE pu_00question_calculated_options AUTO_INCREMENT = 567001;
ALTER TABLE pu_00question_categories AUTO_INCREMENT = 568001;
ALTER TABLE pu_00question_dataset_definitions AUTO_INCREMENT = 569001;
ALTER TABLE pu_00question_dataset_items AUTO_INCREMENT = 570001;
ALTER TABLE pu_00question_datasets AUTO_INCREMENT = 571001;
ALTER TABLE pu_00question_ddwtos AUTO_INCREMENT = 572001;
ALTER TABLE pu_00question_gapselect AUTO_INCREMENT = 573001;
ALTER TABLE pu_00question_hints AUTO_INCREMENT = 574001;
ALTER TABLE pu_00question_multianswer AUTO_INCREMENT = 575001;
ALTER TABLE pu_00question_numerical AUTO_INCREMENT = 576001;
ALTER TABLE pu_00question_numerical_options AUTO_INCREMENT = 577001;
ALTER TABLE pu_00question_numerical_units AUTO_INCREMENT = 578001;
ALTER TABLE pu_00question_response_analysis AUTO_INCREMENT = 579001;
ALTER TABLE pu_00question_response_count AUTO_INCREMENT = 580001;
ALTER TABLE pu_00question_statistics AUTO_INCREMENT = 581001;
ALTER TABLE pu_00question_truefalse AUTO_INCREMENT = 582001;
ALTER TABLE pu_00question_usages AUTO_INCREMENT = 583001;
ALTER TABLE pu_00quickaccess_preferences AUTO_INCREMENT = 584001;
ALTER TABLE pu_00quiz AUTO_INCREMENT = 585001;
ALTER TABLE pu_00quiz_attempts AUTO_INCREMENT = 586001;
ALTER TABLE pu_00quiz_feedback AUTO_INCREMENT = 587001;
ALTER TABLE pu_00quiz_grades AUTO_INCREMENT = 588001;
ALTER TABLE pu_00quiz_overrides AUTO_INCREMENT = 589001;
ALTER TABLE pu_00quiz_overview_regrades AUTO_INCREMENT = 590001;
ALTER TABLE pu_00quiz_reports AUTO_INCREMENT = 591005;
ALTER TABLE pu_00quiz_sections AUTO_INCREMENT = 592001;
ALTER TABLE pu_00quiz_slots AUTO_INCREMENT = 593001;
ALTER TABLE pu_00quiz_statistics AUTO_INCREMENT = 594001;
ALTER TABLE pu_00rating AUTO_INCREMENT = 595001;
ALTER TABLE pu_00reminder AUTO_INCREMENT = 596001;
ALTER TABLE pu_00reminder_message AUTO_INCREMENT = 597001;
ALTER TABLE pu_00reminder_sent AUTO_INCREMENT = 598001;
ALTER TABLE pu_00report_builder AUTO_INCREMENT = 599001;
ALTER TABLE pu_00report_builder_cache AUTO_INCREMENT = 600001;
ALTER TABLE pu_00report_builder_columns AUTO_INCREMENT = 601001;
ALTER TABLE pu_00report_builder_filters AUTO_INCREMENT = 602001;
ALTER TABLE pu_00report_builder_global_restriction AUTO_INCREMENT = 603001;
ALTER TABLE pu_00report_builder_graph AUTO_INCREMENT = 604001;
ALTER TABLE pu_00report_builder_saved AUTO_INCREMENT = 605001;
ALTER TABLE pu_00report_builder_saved_user_default AUTO_INCREMENT = 606001;
ALTER TABLE pu_00report_builder_schedule AUTO_INCREMENT = 607001;
ALTER TABLE pu_00report_builder_schedule_email_audience AUTO_INCREMENT = 608001;
ALTER TABLE pu_00report_builder_schedule_email_external AUTO_INCREMENT = 609001;
ALTER TABLE pu_00report_builder_schedule_email_systemuser AUTO_INCREMENT = 610001;
ALTER TABLE pu_00report_builder_search_cols AUTO_INCREMENT = 611001;
ALTER TABLE pu_00report_builder_settings AUTO_INCREMENT = 612001;
ALTER TABLE pu_00reportbuilder_grp_cohort_record AUTO_INCREMENT = 613001;
ALTER TABLE pu_00reportbuilder_grp_cohort_user AUTO_INCREMENT = 614001;
ALTER TABLE pu_00reportbuilder_grp_org_record AUTO_INCREMENT = 615001;
ALTER TABLE pu_00reportbuilder_grp_org_user AUTO_INCREMENT = 616001;
ALTER TABLE pu_00reportbuilder_grp_pos_record AUTO_INCREMENT = 617001;
ALTER TABLE pu_00reportbuilder_grp_pos_user AUTO_INCREMENT = 618001;
ALTER TABLE pu_00reportbuilder_grp_user_record AUTO_INCREMENT = 619001;
ALTER TABLE pu_00reportbuilder_grp_user_user AUTO_INCREMENT = 620001;
ALTER TABLE pu_00repository AUTO_INCREMENT = 621007;
ALTER TABLE pu_00repository_instance_config AUTO_INCREMENT = 622001;
ALTER TABLE pu_00repository_instances AUTO_INCREMENT = 623007;
ALTER TABLE pu_00repository_opensesame_bdls AUTO_INCREMENT = 624001;
ALTER TABLE pu_00repository_opensesame_bps AUTO_INCREMENT = 625001;
ALTER TABLE pu_00repository_opensesame_pkgs AUTO_INCREMENT = 626001;
ALTER TABLE pu_00resource AUTO_INCREMENT = 627001;
ALTER TABLE pu_00resource_old AUTO_INCREMENT = 628001;
ALTER TABLE pu_00role AUTO_INCREMENT = 629010;
ALTER TABLE pu_00role_allow_assign AUTO_INCREMENT = 630009;
ALTER TABLE pu_00role_allow_override AUTO_INCREMENT = 631013;
ALTER TABLE pu_00role_allow_switch AUTO_INCREMENT = 632011;
ALTER TABLE pu_00role_assignments AUTO_INCREMENT = 633001;
ALTER TABLE pu_00role_capabilities AUTO_INCREMENT = 635604;
ALTER TABLE pu_00role_context_levels AUTO_INCREMENT = 635014;
ALTER TABLE pu_00role_names AUTO_INCREMENT = 636001;
ALTER TABLE pu_00scale AUTO_INCREMENT = 637003;
ALTER TABLE pu_00scale_history AUTO_INCREMENT = 638001;
ALTER TABLE pu_00scorm AUTO_INCREMENT = 639001;
ALTER TABLE pu_00scorm_aicc_session AUTO_INCREMENT = 640001;
ALTER TABLE pu_00scorm_scoes AUTO_INCREMENT = 641001;
ALTER TABLE pu_00scorm_scoes_data AUTO_INCREMENT = 642001;
ALTER TABLE pu_00scorm_scoes_track AUTO_INCREMENT = 643001;
ALTER TABLE pu_00scorm_seq_mapinfo AUTO_INCREMENT = 644001;
ALTER TABLE pu_00scorm_seq_objective AUTO_INCREMENT = 645001;
ALTER TABLE pu_00scorm_seq_rolluprule AUTO_INCREMENT = 646001;
ALTER TABLE pu_00scorm_seq_rolluprulecond AUTO_INCREMENT = 647001;
ALTER TABLE pu_00scorm_seq_rulecond AUTO_INCREMENT = 648001;
ALTER TABLE pu_00scorm_seq_ruleconds AUTO_INCREMENT = 649001;
ALTER TABLE pu_00scorm_trusted_packages AUTO_INCREMENT = 650001;
ALTER TABLE pu_00search_index_requests AUTO_INCREMENT = 651001;
ALTER TABLE pu_00sessions AUTO_INCREMENT = 652001;
ALTER TABLE pu_00stats_daily AUTO_INCREMENT = 653001;
ALTER TABLE pu_00stats_monthly AUTO_INCREMENT = 654001;
ALTER TABLE pu_00stats_user_daily AUTO_INCREMENT = 655001;
ALTER TABLE pu_00stats_user_monthly AUTO_INCREMENT = 656001;
ALTER TABLE pu_00stats_user_weekly AUTO_INCREMENT = 657001;
ALTER TABLE pu_00stats_weekly AUTO_INCREMENT = 658001;
ALTER TABLE pu_00survey AUTO_INCREMENT = 659006;
ALTER TABLE pu_00survey_analysis AUTO_INCREMENT = 660001;
ALTER TABLE pu_00survey_answers AUTO_INCREMENT = 661001;
ALTER TABLE pu_00survey_questions AUTO_INCREMENT = 662074;
ALTER TABLE pu_00tag AUTO_INCREMENT = 663001;
ALTER TABLE pu_00tag_area AUTO_INCREMENT = 664014;
ALTER TABLE pu_00tag_coll AUTO_INCREMENT = 665002;
ALTER TABLE pu_00tag_correlation AUTO_INCREMENT = 666001;
ALTER TABLE pu_00tag_instance AUTO_INCREMENT = 667001;
ALTER TABLE pu_00task_adhoc AUTO_INCREMENT = 668002;
ALTER TABLE pu_00task_scheduled AUTO_INCREMENT = 669114;
ALTER TABLE pu_00tenant AUTO_INCREMENT = 670001;
ALTER TABLE pu_00tool_customlang AUTO_INCREMENT = 671001;
ALTER TABLE pu_00tool_customlang_components AUTO_INCREMENT = 672001;
ALTER TABLE pu_00tool_monitor_events AUTO_INCREMENT = 673001;
ALTER TABLE pu_00tool_monitor_history AUTO_INCREMENT = 674001;
ALTER TABLE pu_00tool_monitor_rules AUTO_INCREMENT = 675001;
ALTER TABLE pu_00tool_monitor_subscriptions AUTO_INCREMENT = 676001;
ALTER TABLE pu_00tool_recyclebin_category AUTO_INCREMENT = 677001;
ALTER TABLE pu_00tool_recyclebin_course AUTO_INCREMENT = 678001;
ALTER TABLE pu_00tool_sitepolicy_consent_options AUTO_INCREMENT = 679001;
ALTER TABLE pu_00tool_sitepolicy_localised_consent AUTO_INCREMENT = 680001;
ALTER TABLE pu_00tool_sitepolicy_localised_policy AUTO_INCREMENT = 681001;
ALTER TABLE pu_00tool_sitepolicy_policy_version AUTO_INCREMENT = 682001;
ALTER TABLE pu_00tool_sitepolicy_site_policy AUTO_INCREMENT = 683001;
ALTER TABLE pu_00tool_sitepolicy_user_consent AUTO_INCREMENT = 684001;
ALTER TABLE pu_00tool_usertours_steps AUTO_INCREMENT = 685001;
ALTER TABLE pu_00tool_usertours_tours AUTO_INCREMENT = 686001;
ALTER TABLE pu_00totara_compl_import_cert AUTO_INCREMENT = 687001;
ALTER TABLE pu_00totara_compl_import_course AUTO_INCREMENT = 688001;
ALTER TABLE pu_00totara_connect_client_cohorts AUTO_INCREMENT = 689001;
ALTER TABLE pu_00totara_connect_client_courses AUTO_INCREMENT = 690001;
ALTER TABLE pu_00totara_connect_client_org_frameworks AUTO_INCREMENT = 691001;
ALTER TABLE pu_00totara_connect_client_pos_frameworks AUTO_INCREMENT = 692001;
ALTER TABLE pu_00totara_connect_clients AUTO_INCREMENT = 693001;
ALTER TABLE pu_00totara_connect_sso_sessions AUTO_INCREMENT = 694001;
ALTER TABLE pu_00totara_core_certification_vis_map AUTO_INCREMENT = 695001;
ALTER TABLE pu_00totara_core_course_vis_map AUTO_INCREMENT = 696001;
ALTER TABLE pu_00totara_core_program_vis_map AUTO_INCREMENT = 697001;
ALTER TABLE pu_00totara_dashboard AUTO_INCREMENT = 698002;
ALTER TABLE pu_00totara_dashboard_cohort AUTO_INCREMENT = 699001;
ALTER TABLE pu_00totara_dashboard_user AUTO_INCREMENT = 700001;
ALTER TABLE pu_00totara_navigation AUTO_INCREMENT = 701022;
ALTER TABLE pu_00totara_navigation_settings AUTO_INCREMENT = 702001;
ALTER TABLE pu_00totara_sync_log AUTO_INCREMENT = 703001;
ALTER TABLE pu_00totara_userdata_export AUTO_INCREMENT = 704001;
ALTER TABLE pu_00totara_userdata_export_item AUTO_INCREMENT = 705001;
ALTER TABLE pu_00totara_userdata_export_type AUTO_INCREMENT = 706001;
ALTER TABLE pu_00totara_userdata_export_type_item AUTO_INCREMENT = 707001;
ALTER TABLE pu_00totara_userdata_purge AUTO_INCREMENT = 708001;
ALTER TABLE pu_00totara_userdata_purge_item AUTO_INCREMENT = 709001;
ALTER TABLE pu_00totara_userdata_purge_type AUTO_INCREMENT = 710001;
ALTER TABLE pu_00totara_userdata_purge_type_item AUTO_INCREMENT = 711001;
ALTER TABLE pu_00totara_userdata_user AUTO_INCREMENT = 712003;
ALTER TABLE pu_00upgrade_log AUTO_INCREMENT = 713001;
ALTER TABLE pu_00url AUTO_INCREMENT = 714001;
ALTER TABLE pu_00user AUTO_INCREMENT = 715003;
ALTER TABLE pu_00user_devices AUTO_INCREMENT = 716001;
ALTER TABLE pu_00user_enrolments AUTO_INCREMENT = 717001;
ALTER TABLE pu_00user_info_category AUTO_INCREMENT = 718001;
ALTER TABLE pu_00user_info_data AUTO_INCREMENT = 719001;
ALTER TABLE pu_00user_info_field AUTO_INCREMENT = 720001;
ALTER TABLE pu_00user_lastaccess AUTO_INCREMENT = 721001;
ALTER TABLE pu_00user_password_history AUTO_INCREMENT = 722001;
ALTER TABLE pu_00user_password_resets AUTO_INCREMENT = 723001;
ALTER TABLE pu_00user_preferences AUTO_INCREMENT = 724001;
ALTER TABLE pu_00user_private_key AUTO_INCREMENT = 725001;
ALTER TABLE pu_00wiki AUTO_INCREMENT = 726001;
ALTER TABLE pu_00wiki_links AUTO_INCREMENT = 727001;
ALTER TABLE pu_00wiki_locks AUTO_INCREMENT = 728001;
ALTER TABLE pu_00wiki_pages AUTO_INCREMENT = 729001;
ALTER TABLE pu_00wiki_subwikis AUTO_INCREMENT = 730001;
ALTER TABLE pu_00wiki_synonyms AUTO_INCREMENT = 731001;
ALTER TABLE pu_00wiki_versions AUTO_INCREMENT = 732001;
ALTER TABLE pu_00workshop AUTO_INCREMENT = 733001;
ALTER TABLE pu_00workshop_aggregations AUTO_INCREMENT = 734001;
ALTER TABLE pu_00workshop_assessments AUTO_INCREMENT = 735001;
ALTER TABLE pu_00workshop_grades AUTO_INCREMENT = 736001;
ALTER TABLE pu_00workshop_submissions AUTO_INCREMENT = 737001;
ALTER TABLE pu_00workshopallocation_scheduled AUTO_INCREMENT = 738001;
ALTER TABLE pu_00workshopeval_best_settings AUTO_INCREMENT = 739001;
ALTER TABLE pu_00workshopform_accumulative AUTO_INCREMENT = 740001;
ALTER TABLE pu_00workshopform_comments AUTO_INCREMENT = 741001;
ALTER TABLE pu_00workshopform_numerrors AUTO_INCREMENT = 742001;
ALTER TABLE pu_00workshopform_numerrors_map AUTO_INCREMENT = 743001;
ALTER TABLE pu_00workshopform_rubric AUTO_INCREMENT = 744001;
ALTER TABLE pu_00workshopform_rubric_config AUTO_INCREMENT = 745001;
ALTER TABLE pu_00workshopform_rubric_levels AUTO_INCREMENT = 746001;
