MDL-32235 fixing DB schema
Removing the table "scheduled" created by the XMLDB by default (it's a bug in XMLDB, I'm just too lazy now to fix it). Adding new fields to hold the result of the most recent execution.
This commit is contained in:
@@ -1,25 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<XMLDB PATH="mod/workshop/allocation/scheduled/db" VERSION="20120328" COMMENT="XMLDB file for Moodle mod/workshop/allocation/scheduled"
|
||||
<XMLDB PATH="mod/workshop/allocation/scheduled/db" VERSION="20120330" COMMENT="XMLDB file for Moodle mod/workshop/allocation/scheduled"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="../../../../../lib/xmldb/xmldb.xsd"
|
||||
>
|
||||
<TABLES>
|
||||
<TABLE NAME="scheduled" COMMENT="Default comment for scheduled, please edit me" NEXT="workshopallocation_scheduled">
|
||||
<FIELDS>
|
||||
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true"/>
|
||||
</FIELDS>
|
||||
<KEYS>
|
||||
<KEY NAME="primary" TYPE="primary" FIELDS="id"/>
|
||||
</KEYS>
|
||||
</TABLE>
|
||||
<TABLE NAME="workshopallocation_scheduled" COMMENT="Stores the allocation settings for the scheduled allocator" PREVIOUS="scheduled">
|
||||
<TABLE NAME="workshopallocation_scheduled" COMMENT="Stores the allocation settings for the scheduled allocator">
|
||||
<FIELDS>
|
||||
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true" NEXT="workshopid"/>
|
||||
<FIELD NAME="workshopid" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false" COMMENT="workshop id we are part of" PREVIOUS="id" NEXT="enabled"/>
|
||||
<FIELD NAME="enabled" TYPE="int" LENGTH="2" NOTNULL="true" DEFAULT="0" SEQUENCE="false" COMMENT="Is the scheduled allocation enabled" PREVIOUS="workshopid" NEXT="submissionend"/>
|
||||
<FIELD NAME="submissionend" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false" COMMENT="What was the workshop's submissionend when this record was created or modified" PREVIOUS="enabled" NEXT="timeallocated"/>
|
||||
<FIELD NAME="timeallocated" TYPE="int" LENGTH="10" NOTNULL="false" SEQUENCE="false" COMMENT="When was the last scheduled allocation executed" PREVIOUS="submissionend" NEXT="settings"/>
|
||||
<FIELD NAME="settings" TYPE="text" NOTNULL="false" SEQUENCE="false" COMMENT="The pre-defined settings for the underlying random allocation to run it with" PREVIOUS="timeallocated"/>
|
||||
<FIELD NAME="settings" TYPE="text" NOTNULL="false" SEQUENCE="false" COMMENT="The pre-defined settings for the underlying random allocation to run it with" PREVIOUS="timeallocated" NEXT="resultstatus"/>
|
||||
<FIELD NAME="resultstatus" TYPE="int" LENGTH="10" NOTNULL="false" SEQUENCE="false" COMMENT="The resulting status of the most recent execution" PREVIOUS="settings" NEXT="resultmessage"/>
|
||||
<FIELD NAME="resultmessage" TYPE="char" LENGTH="1333" NOTNULL="false" SEQUENCE="false" COMMENT="Optional short message describing the resulting status" PREVIOUS="resultstatus" NEXT="resultlog"/>
|
||||
<FIELD NAME="resultlog" TYPE="text" NOTNULL="false" SEQUENCE="false" COMMENT="The log of the most recent execution" PREVIOUS="resultmessage"/>
|
||||
</FIELDS>
|
||||
<KEYS>
|
||||
<KEY NAME="primary" TYPE="primary" FIELDS="id" NEXT="fkuq_workshopid"/>
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->component = 'workshopallocation_scheduled';
|
||||
$plugin->version = 2012032801;
|
||||
$plugin->version = 2012033000;
|
||||
$plugin->requires = 2012032300;
|
||||
$plugin->dependencies = array(
|
||||
'workshopallocation_random' => 2012032800,
|
||||
|
||||
Reference in New Issue
Block a user