Commit a3f6fbfe authored by Hugh Davenport's avatar Hugh Davenport
Browse files

Add primary keys to some tables missing them



Bug #845948

Change-Id: I447f82e2296d20197e138f3f619798fdf16417da
Signed-off-by: default avatarHugh Davenport <hugh@catalyst.net.nz>
parent ed48acb7
......@@ -4,6 +4,7 @@
<FIELD NAME="category" TYPE="char" LENGTH="50" NOTNULL="true" />
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="blocktype" />
<KEY NAME="blocktypefk" TYPE="foreign" FIELDS="blocktype" REFTABLE="blocktype_installed" REFFIELDS="name" />
<KEY NAME="categoryfk" TYPE="foreign" FIELDS="category" REFTABLE="blocktype_category" REFFIELDS="name" />
</KEYS>
......
......@@ -504,6 +504,7 @@
<FIELD NAME="edited" TYPE="int" LENGTH="1" DEFAULT="0" NOTNULL="false" />
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="artefact,usr" />
<KEY NAME="usrfk" TYPE="foreign" FIELDS="usr" REFTABLE="usr" REFFIELDS="id" />
</KEYS>
<INDEXES>
......
......@@ -2775,5 +2775,16 @@ function xmldb_core_upgrade($oldversion=0) {
insert_record('cron', $cron);
}
if ($oldversion < 2011111500) {
$table = new XMLDBTable('blocktype_installed_category');
$key = new XMLDBKey('primary');
$key->setAttributes(XMLDB_KEY_PRIMARY, array('blocktype'));
add_key($table, $key);
$table = new XMLDBTable('artefact_log');
$key = new XMLDBKey('primary');
$key->setAttributes(XMLDB_KEY_PRIMARY, array('artefact', 'usr'));
add_key($table, $key);
}
return $status;
}
......@@ -28,7 +28,7 @@
defined('INTERNAL') || die();
$config = new StdClass;
$config->version = 2011102700;
$config->version = 2011111500;
$config->release = '1.5.0dev';
$config->minupgradefrom = 2008040200;
$config->minupgraderelease = '1.0.0 (release tag 1.0.0_RELEASE)';
......
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