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

Kill the viaAPT flag from users and projects table, and switch to

a text field that says emulab,cloudlab, or aptlab.
parent 97bd5067
......@@ -3809,7 +3809,7 @@ CREATE TABLE `projects` (
`nonlocal_id` varchar(128) default NULL,
`nonlocal_type` tinytext,
`manager_urn` varchar(128) default NULL,
`viaAPT` tinyint(1) default '0',
`genesis` enum('emulab','aptlab','cloudlab') NOT NULL default 'emulab',
PRIMARY KEY (`pid_idx`),
UNIQUE KEY `pid` (`pid`),
KEY `unix_gid` (`unix_gid`),
......@@ -4575,7 +4575,7 @@ CREATE TABLE `users` (
`default_project` mediumint(8) unsigned default NULL,
`nocollabtools` tinyint(1) default '0',
`initial_passphrase` varchar(128) default NULL,
`viaAPT` tinyint(1) default '0',
`genesis` enum('emulab','aptlab','cloudlab') NOT NULL default 'emulab',
PRIMARY KEY (`uid_idx`),
KEY `unix_uid` (`unix_uid`),
KEY `status` (`status`),
......
#
# Update to projects and users for apt/cloud
#
use strict;
use libdb;
sub DoUpdate($$$)
{
my ($dbhandle, $dbname, $version) = @_;
if (!DBSlotExists("projects", "genesis")) {
DBQueryFatal("ALTER TABLE projects ADD ".
" `genesis` enum('emulab','aptlab','cloudlab') ".
" NOT NULL default 'emulab'");
}
if (!DBSlotExists("users", "genesis")) {
DBQueryFatal("ALTER TABLE users ADD ".
" `genesis` enum('emulab','aptlab','cloudlab') ".
" NOT NULL default 'emulab'");
}
if (DBSlotExists("projects", "viaAPT")) {
DBQueryFatal("update projects set genesis='aptlab' where viaAPT=1");
DBQueryFatal("ALTER TABLE projects drop viaAPT");
}
if (DBSlotExists("users", "viaAPT")) {
DBQueryFatal("update users set genesis='aptlab' where viaAPT=1");
DBQueryFatal("ALTER TABLE users drop viaAPT");
}
return 0;
}
# 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