Commit c343dc1b authored by Leigh B Stoller's avatar Leigh B Stoller

Fix the primary key on nonlocal_user_bindings; users can be a member

or more then one experiment, of course.
parent 8c6807e0
......@@ -2408,7 +2408,7 @@ CREATE TABLE `nonlocal_user_bindings` (
`uid` varchar(8) NOT NULL default '',
`uid_idx` mediumint(8) unsigned NOT NULL default '0',
`exptidx` int(11) NOT NULL default '0',
PRIMARY KEY (`uid_idx`),
PRIMARY KEY (`uid_idx`,`exptidx`),
KEY `uid` (`uid`)
# Change primary key on nonlocal_user_bindings
use strict;
use libdb;
sub DoUpdate($$$)
my ($dbhandle, $dbname, $version) = @_;
my $query_result =
DBQueryFatal("show index from nonlocal_user_bindings ".
"where Key_name='PRIMARY'");
if ($query_result->numrows == 1) {
DBQueryFatal("alter table nonlocal_user_bindings drop primary key");
DBQueryFatal("alter table nonlocal_user_bindings add primary key ".
return 0;
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