Commit 6d956e8c authored by Leigh Stoller's avatar Leigh Stoller

Also record the expiration at the time the user requested the extension,

for a more complete picture of what the user was seeing.
parent a45f190f
......@@ -1716,6 +1716,7 @@ sub DoExtend()
"wanted" => $wanted,
"granted" => $granted,
"admin" => $this_user->IsAdmin() ? 1 : 0,
"expiration" => TBDateStringLocal($expires_time),
};
if ($needapproval) {
$extensionargs->{"needapproval"} = 1;
......
......@@ -267,6 +267,7 @@ CREATE TABLE `apt_instance_extension_info` (
`autoapproved_reason` tinytext,
`autoapproved_metrics` mediumtext,
`maxextension` datetime default NULL,
`expiration` datetime default NULL,
`admin` tinyint(1) NOT NULL default '0',
`reason` mediumtext,
`message` mediumtext,
......
use strict;
use libdb;
sub DoUpdate($$$)
{
my ($dbhandle, $dbname, $version) = @_;
if (!DBSlotExists("apt_instance_extension_info", "expiration")) {
DBQueryFatal("alter table apt_instance_extension_info add ".
" `expiration` datetime default NULL ".
" after maxextension");
}
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