<?xml version="1.0" encoding="UTF-8" ?>
<XMLDB PATH="course/format/grid/db" VERSION="20210526" COMMENT="XMLDB file for Moodle course/format/grid"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="../../../../lib/xmldb/xmldb.xsd"
>
  <TABLES>
    <TABLE NAME="format_grid_icon" COMMENT="Icon images for each topic, used by the grid course format">
      <FIELDS>
        <FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true"/>
        <FIELD NAME="image" TYPE="text" NOTNULL="false" SEQUENCE="false"/>
        <FIELD NAME="displayedimageindex" TYPE="int" LENGTH="10" NOTNULL="true" DEFAULT="0" SEQUENCE="false" COMMENT="Used to ensure the browser gets the new image when changed.  Sequence controlled by code."/>
        <FIELD NAME="updatedisplayedimage" TYPE="int" LENGTH="1" NOTNULL="true" DEFAULT="0" SEQUENCE="false" COMMENT="If '1' then the displayed image needs updating due to a change in settings."/>
        <FIELD NAME="sectionid" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false"/>
        <FIELD NAME="courseid" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false" COMMENT="Needed to identify records when deleting a course"/>
        <FIELD NAME="alttext" TYPE="text" NOTNULL="false" SEQUENCE="false"/>
      </FIELDS>
      <KEYS>
        <KEY NAME="primary" TYPE="primary" FIELDS="id"/>
      </KEYS>
      <INDEXES>
        <INDEX NAME="section" UNIQUE="true" FIELDS="sectionid"/>
        <INDEX NAME="course" UNIQUE="false" FIELDS="courseid"/>
      </INDEXES>
    </TABLE>
    <TABLE NAME="format_grid_summary" COMMENT="A table to hold a single flag on whether to show section 0 above the grid or in the grid">
      <FIELDS>
        <FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true"/>
        <FIELD NAME="showsummary" TYPE="int" LENGTH="1" NOTNULL="true" SEQUENCE="false" COMMENT="Flag whether the course administrator wants section 0 to be shown or hidden in the grid"/>
        <FIELD NAME="courseid" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false"/>
      </FIELDS>
      <KEYS>
        <KEY NAME="primary" TYPE="primary" FIELDS="id"/>
      </KEYS>
    </TABLE>
  </TABLES>
</XMLDB>
