Commit a36c0985 authored by Roisin Pearson's avatar Roisin Pearson Committed by Cecilia Vela Gurovic
Browse files

Bug 1742347 Adding new view_versioning table

This table will hold the views block and artefact data for a particular version
merge of other patches.
behatnotneeded

Change-Id: I6821b5ee39a508c35bc85d3ce53b8e24d2a78a7b
parent a0e290ee
......@@ -1409,6 +1409,20 @@
<KEY NAME="usrfk" TYPE="foreign" FIELDS="usr" REFTABLE="usr" REFFIELDS="id"/>
</KEYS>
</TABLE>
<TABLE NAME="view_versioning">
<FIELDS>
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true" />
<FIELD NAME="view" TYPE="int" LENGTH="10" NOTNULL="true" />
<FIELD NAME="ctime" TYPE="datetime" NOTNULL="true" />
<FIELD NAME="blockdata" TYPE="text" LENGTH="big" NOTNULL="false" />
<FIELD NAME="artefactids" TYPE="text" LENGTH="big" NOTNULL="false" />
<FIELD NAME="commentdata" TYPE="text" LENGTH="big" NOTNULL="false" />
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id" />
<KEY NAME="viewfk" TYPE="foreign" FIELDS="view" REFTABLE="view" REFFIELDS="id"/>
</KEYS>
</TABLE>
<TABLE NAME="tag">
<FIELDS>
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true" />
......
......@@ -710,6 +710,7 @@ function xmldb_core_upgrade($oldversion=0) {
create_table($table);
}
if ($oldversion < 2018013000) {
log_debug('Auto accept the privacy agreement for all site admins');
$sitecontentid = get_field('site_content_version', 'id', 'type', 'privacy', 'institution', 'mahara');
......@@ -1087,5 +1088,21 @@ function xmldb_core_upgrade($oldversion=0) {
add_field($table, $field);
}
if ($oldversion < 2018091200) {
log_debug('Adding view_versioning table');
$table = new XMLDBTable('view_versioning');
$table->addFieldInfo('id', XMLDB_TYPE_INTEGER, 10, XMLDB_UNSIGNED,
XMLDB_NOTNULL, XMLDB_SEQUENCE, null, null, null);
$table->addFieldInfo('view', XMLDB_TYPE_INTEGER, 10, false, XMLDB_NOTNULL);
$table->addFieldInfo('ctime', XMLDB_TYPE_DATETIME, null, null, XMLDB_NOTNULL);
$table->addFieldInfo('blockdata', XMLDB_TYPE_TEXT, null, null, XMLDB_NOTNULL);
$table->addFieldInfo('artefactids', XMLDB_TYPE_TEXT);
$table->addFieldInfo('commentdata', XMLDB_TYPE_TEXT);
$table->addKeyInfo('primary', XMLDB_KEY_PRIMARY, array('id'));
$table->addKeyInfo('viewfk', XMLDB_KEY_FOREIGN, array('view'), 'view', array('id'));
create_table($table);
}
return $status;
}
......@@ -16,7 +16,7 @@ $config = new stdClass();
// See https://wiki.mahara.org/wiki/Developer_Area/Version_Numbering_Policy
// For upgrades on stable branches, increment the version by one. On master, use the date.
$config->version = 2018090400;
$config->version = 2018091200;
$config->series = '18.10';
$config->release = '18.10dev';
$config->minupgradefrom = 2017031605;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment