Commit 29c5d361 authored by Leigh Stoller's avatar Leigh Stoller

Bump credential idx to a full int, we just overflowed the mediumint

on the Mothership.
parent 886c4b7f
...@@ -155,7 +155,7 @@ CREATE TABLE `geni_tickets` ( ...@@ -155,7 +155,7 @@ CREATE TABLE `geni_tickets` (
DROP TABLE IF EXISTS `geni_credentials`; DROP TABLE IF EXISTS `geni_credentials`;
CREATE TABLE `geni_credentials` ( CREATE TABLE `geni_credentials` (
`idx` mediumint(8) unsigned NOT NULL default '0', `idx` int(10) unsigned NOT NULL default '0',
`uuid` varchar(40) NOT NULL default '', `uuid` varchar(40) NOT NULL default '',
`owner_uuid` varchar(40) NOT NULL default '', `owner_uuid` varchar(40) NOT NULL default '',
`this_uuid` varchar(40) NOT NULL default '', `this_uuid` varchar(40) NOT NULL default '',
...@@ -241,7 +241,7 @@ CREATE TABLE `geni_resources` ( ...@@ -241,7 +241,7 @@ CREATE TABLE `geni_resources` (
`expires` datetime default NULL, `expires` datetime default NULL,
`updated` datetime default NULL, `updated` datetime default NULL,
`slice_idx` mediumint(8) unsigned NOT NULL default '0', `slice_idx` mediumint(8) unsigned NOT NULL default '0',
`credential_idx` mediumint(8) unsigned NOT NULL default '0', `credential_idx` int(10) unsigned NOT NULL default '0',
`manifest_idx` mediumint(8) unsigned NOT NULL default '0', `manifest_idx` mediumint(8) unsigned NOT NULL default '0',
`ticket_idx` mediumint(8) unsigned NOT NULL default '0', `ticket_idx` mediumint(8) unsigned NOT NULL default '0',
`newticket_idx` mediumint(8) unsigned NOT NULL default '0', `newticket_idx` mediumint(8) unsigned NOT NULL default '0',
......
#
# IDX to small.
#
use strict;
use GeniDB;
sub DoUpdate($$$)
{
my ($dbhandle, $dbname, $version) = @_;
DBSetDefault($dbhandle);
DBQueryFatal("alter table geni_resources change credential_idx ".
" credential_idx int(10) unsigned NOT NULL default '0'");
DBQueryFatal("alter table geni_credentials change `idx` ".
" `idx` int(10) unsigned NOT NULL default '0'");
return 0;
}
1;
# Local Variables:
# mode:perl
# End:
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