Commit 190ea782 authored by Leigh B Stoller's avatar Leigh B Stoller

Add lockdown bits to protgeni and APT schemas. This has been pushed down

the stack for too long, need to get it done.
parent 2a925190
......@@ -59,6 +59,7 @@ CREATE TABLE `geni_slices` (
`locked` datetime default NULL,
`stitch_locked` datetime default NULL,
`hosed` tinyint(1) NOT NULL default '0',
`lockdown` tinyint(1) NOT NULL default '0',
`creator_uuid` varchar(40) NOT NULL default '',
`creator_urn` tinytext,
`speaksfor_uuid` varchar(40) default NULL,
......
#
# Add a lockdown bit.
#
use strict;
use GeniDB;
sub DoUpdate($$$)
{
my ($dbhandle, $dbname, $version) = @_;
DBSetDefault($dbhandle);
if (! DBSlotExists("geni_slices", "lockdown")) {
DBQueryFatal("alter table geni_slices add ".
" `lockdown` tinyint(1) NOT NULL default '0' ".
" after hosed");
}
return 0;
}
1;
# Local Variables:
# mode:perl
# End:
......@@ -134,6 +134,8 @@ CREATE TABLE `apt_instances` (
`public_url` tinytext,
`created` datetime default NULL,
`status` varchar(32) default NULL,
`admin_lockdown` tinyint(1) NOT NULL default '0',
`user_lockdown` tinyint(1) NOT NULL default '0',
`extension_code` varchar(32) default NULL,
`extension_reason` mediumtext,
`servername` tinytext,
......
#
# APT stuff
#
use strict;
use libdb;
sub DoUpdate($$$)
{
my ($dbhandle, $dbname, $version) = @_;
if (!DBSlotExists("apt_instances", "admin_lockdown")) {
DBQueryFatal("alter table apt_instances add ".
" `admin_lockdown` tinyint(1) NOT NULL default '0' ".
" after status");
}
if (!DBSlotExists("apt_instances", "user_lockdown")) {
DBQueryFatal("alter table apt_instances add ".
" `user_lockdown` tinyint(1) NOT NULL default '0' ".
" after admin_lockdown");
}
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