Commit 2f735b22 authored by Leigh Stoller's avatar Leigh Stoller

Add a "portal" tag to the login table so we know which portal a user has

logged on.

Add a couple extension related bits to the apt_instances table.
parent 59b243a2
......@@ -238,6 +238,8 @@ CREATE TABLE `apt_instances` (
`extension_history` mediumtext,
`extension_adminonly` tinyint(1) NOT NULL default '0',
`extension_requested` tinyint(1) NOT NULL default '0',
`extension_denied` tinyint(1) NOT NULL default '0',
`extension_denied_reason` mediumtext,
`extension_count` smallint(5) unsigned NOT NULL default '0',
`extension_days` smallint(5) unsigned NOT NULL default '0',
`physnode_count` smallint(5) unsigned NOT NULL default '0',
......@@ -2662,6 +2664,7 @@ CREATE TABLE `login` (
`timeout` varchar(10) NOT NULL default '',
`adminon` tinyint(1) NOT NULL default '0',
`opskey` varchar(64) NOT NULL,
`portal` enum('emulab','aptlab','cloudlab','phantomnet') NOT NULL default 'emulab',
PRIMARY KEY (`uid_idx`,`hashkey`),
UNIQUE KEY `hashhash` (`uid_idx`,`hashhash`),
UNIQUE KEY `uidkey` (`uid`,`hashkey`)
......
#
#
#
use strict;
use libdb;
sub DoUpdate($$$)
{
my ($dbhandle, $dbname, $version) = @_;
if (!DBSlotExists("apt_instances", "extension_denied")) {
DBQueryFatal("alter table apt_instances add ".
" `extension_denied` tinyint(1) NOT NULL default '0' ".
"after extension_requested");
}
if (!DBSlotExists("apt_instances", "extension_denied_reason")) {
DBQueryFatal("alter table apt_instances add ".
" `extension_denied_reason` mediumtext ".
"after extension_denied");
}
if (!DBSlotExists("login", "portal")) {
DBQueryFatal("alter table login add ".
" `portal` enum('emulab','aptlab','cloudlab', ".
" 'phantomnet') NOT NULL default 'emulab' ".
"after opskey");
}
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