Commit 32b265cc authored by Leigh B Stoller's avatar Leigh B Stoller

Change unix_uid from smallint to an int, at Chuck Cranor's request.

parent ce77e70e
......@@ -3937,7 +3937,7 @@ CREATE TABLE `nonlocal_user_accounts` (
`uid` varchar(8) NOT NULL default '',
`uid_idx` mediumint(8) unsigned NOT NULL default '0',
`uid_uuid` varchar(40) NOT NULL default '',
`unix_uid` smallint(5) unsigned NOT NULL auto_increment,
`unix_uid` int(10) unsigned NOT NULL auto_increment,
`created` datetime default NULL,
`updated` datetime default NULL,
`privs` enum('user','local_root') default 'local_root',
......@@ -5544,7 +5544,7 @@ CREATE TABLE `users` (
`usr_shell` tinytext,
`usr_pswd` tinytext NOT NULL,
`usr_w_pswd` tinytext,
`unix_uid` smallint(5) unsigned NOT NULL default '0',
`unix_uid` int(10) unsigned NOT NULL default '0',
`status` enum('newuser','unapproved','unverified','active','frozen','archived','nonlocal','inactive','other') NOT NULL default 'newuser',
`admin` tinyint(4) default '0',
`foreign_admin` tinyint(4) default '0',
use strict;
use libdb;
sub DoUpdate($$$)
my ($dbhandle, $dbname, $version) = @_;
my $type = DBSlotType("nonlocal_user_accounts", "unix_uid");
if ($type =~ /smallint/) {
DBQueryFatal("alter table nonlocal_user_accounts change unix_uid ".
" `unix_uid` int(10) unsigned NOT NULL auto_increment");
$type = DBSlotType("users", "unix_uid");
if ($type =~ /smallint/) {
DBQueryFatal("alter table users change unix_uid ".
" `unix_uid` int(10) unsigned NOT NULL default '0'");
return 0;
# Local Variables:
# mode:perl
# End:
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment