Commit 689e7e43 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Drop unique constraint on secret url


Signed-off-by: default avatarRichard Mansfield <richardm@catalyst.net.nz>
parent ab7ea38e
......@@ -698,7 +698,7 @@
<KEY NAME="usrfk" TYPE="foreign" FIELDS="usr" REFTABLE="usr" REFFIELDS="id" />
</KEYS>
<INDEXES>
<INDEX NAME="tokenuk" UNIQUE="true" FIELDS="token"/>
<INDEX NAME="tokenix" UNIQUE="false" FIELDS="token"/>
</INDEXES>
</TABLE>
<TABLE NAME="view_visit">
......
......@@ -2131,5 +2131,17 @@ function xmldb_core_upgrade($oldversion=0) {
}
if ($oldversion < 2010080402) {
// Drop unique constraint on token column of view_access
$table = new XMLDBTable('view_access');
$index = new XMLDBIndex('tokenuk');
$index->setAttributes(XMLDB_INDEX_UNIQUE, array('token'));
drop_index($table, $index);
$index = new XMLDBIndex('tokenix');
$index->setAttributes(XMLDB_INDEX_NOTUNIQUE, array('token'));
add_index($table, $index);
}
return $status;
}
......@@ -28,7 +28,7 @@
defined('INTERNAL') || die();
$config = new StdClass;
$config->version = 2010080401;
$config->version = 2010080402;
$config->release = '1.3.0beta4dev';
$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