<?xml version="1.0" encoding="UTF-8" ?>
<XMLDB PATH="admin/tool/log/store/socialflow/db" VERSION="20200212" COMMENT="XMLDB file for Moodle logstore/socialflow"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="../../../../../../lib/xmldb/xmldb.xsd"
>
  <TABLES>
    <TABLE NAME="logstore_socialflow_log" COMMENT="Log table">
      <FIELDS>
        <FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true"/>
        <FIELD NAME="eventid" TYPE="int" LENGTH="7" NOTNULL="true" SEQUENCE="false"/>
        <FIELD NAME="courseid" TYPE="int" LENGTH="10" NOTNULL="false" SEQUENCE="false"/>
        <FIELD NAME="contextid" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false"/>
        <FIELD NAME="userid" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
        <FIELD NAME="timecreated" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false"/>
      </FIELDS>
      <KEYS>
        <KEY NAME="primary" TYPE="primary" FIELDS="id"/>
      </KEYS>
      <INDEXES>
        <INDEX NAME="socilog_courseid_idx" UNIQUE="false" FIELDS="courseid"/>
        <INDEX NAME="socilog_timecreated_idx" UNIQUE="false" FIELDS="timecreated"/>
        <INDEX NAME="socilog_2col_idx" UNIQUE="false" FIELDS="contextid,userid"/>
      </INDEXES>
    </TABLE>
    <TABLE NAME="logstore_socialflow_evts" COMMENT="Event tracked">
      <FIELDS>
        <FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true"/>
        <FIELD NAME="eventname" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false"/>
        <FIELD NAME="actiontype" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false"/>
        <FIELD NAME="moduletable" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false"/>
        <FIELD NAME="hasclosingdate" TYPE="int" LENGTH="1" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
        <FIELD NAME="closingdatefield" TYPE="char" LENGTH="255" NOTNULL="false" SEQUENCE="false"/>
        <FIELD NAME="haslatesubmit" TYPE="int" LENGTH="1" NOTNULL="true" DEFAULT="0" SEQUENCE="false"/>
        <FIELD NAME="latedatefield" TYPE="char" LENGTH="255" NOTNULL="false" SEQUENCE="false"/>
      </FIELDS>
      <KEYS>
        <KEY NAME="primary" TYPE="primary" FIELDS="id"/>
      </KEYS>
      <INDEXES>
        <INDEX NAME="socievts_hasclosingdate_idx" UNIQUE="false" FIELDS="eventname"/>
        <INDEX NAME="socievts_haslatesubmit_idx" UNIQUE="false" FIELDS="eventname"/>
      </INDEXES>
    </TABLE>
      <TABLE NAME="logstore_socialflow_hits" COMMENT="Computed hits">
      <FIELDS>
         <FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true"/>
         <FIELD NAME="eventid" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false"/>
         <FIELD NAME="courseid" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false"/>
         <FIELD NAME="contextid" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false"/>
         <FIELD NAME="nbhits" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false"/>
         <FIELD NAME="lasttime" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false"/>
         <FIELD NAME="userids" TYPE="text"  NOTNULL="true" SEQUENCE="false"/>
      </FIELDS>
       <KEYS>
        <KEY NAME="primary" TYPE="primary" FIELDS="id"/>
      </KEYS>
      <INDEXES>
        <INDEX NAME="socihits_courseid_idx" UNIQUE="false" FIELDS="courseid"/>
        <INDEX NAME="socihits_2col_idx" UNIQUE="false" FIELDS="contextid,eventid"/>
      </INDEXES>
      </TABLE>
       <TABLE NAME="logstore_socialflow_nbpa" COMMENT="Number of participants">
       <FIELDS>
         <FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true"/>
         <FIELD NAME="courseid" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false"/>
         <FIELD NAME="nbpa" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false"/>
      </FIELDS>
      <KEYS>
        <KEY NAME="primary" TYPE="primary" FIELDS="id"/>
      </KEYS>
        <INDEXES>
        <INDEX NAME="socinbpa_courseid_idx" UNIQUE="false" FIELDS="courseid"/>
      </INDEXES>
      </TABLE>
      <TABLE NAME="logstore_socialflow_closing" COMMENT="Hits closing dates">
      <FIELDS>
         <FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true"/>
         <FIELD NAME="hitid" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false"/>
         <FIELD NAME="closingdate" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false"/>
      </FIELDS>
      <KEYS>
        <KEY NAME="primary" TYPE="primary" FIELDS="id"/>
      </KEYS>
      <INDEXES>
        <INDEX NAME="sociclo_hitid_idx" UNIQUE="true" FIELDS="hitid"/>
      </INDEXES>
      </TABLE>
  </TABLES>
</XMLDB>