Commit 2ae2a648 authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Add public_url slot to apt_instances (and history) to record the

public url of the sliver on the backend cluster. Displayed only
to admins on the status page, might change that later.
parent 0e17f951
......@@ -100,6 +100,7 @@ CREATE TABLE `apt_instance_history` (
`creator_idx` mediumint(8) unsigned NOT NULL default '0',
`creator_uuid` varchar(40) NOT NULL default '',
`aggregate_urn` varchar(128) default NULL,
`public_url` tinytext,
`created` datetime default NULL,
`destroyed` datetime default NULL,
`servername` tinytext,
......@@ -120,6 +121,7 @@ CREATE TABLE `apt_instances` (
`creator_idx` mediumint(8) unsigned NOT NULL default '0',
`creator_uuid` varchar(40) NOT NULL default '',
`aggregate_urn` varchar(128) default NULL,
`public_url` tinytext,
`created` datetime default NULL,
`status` varchar(32) default NULL,
`extension_code` varchar(32) default NULL,
......
#
# Modify APT instances table.
#
use strict;
use libdb;
sub DoUpdate($$$)
{
my ($dbhandle, $dbname, $version) = @_;
if (!DBSlotExists("apt_instances", "public_url")) {
DBQueryFatal("alter table apt_instances add ".
" `public_url` tinytext after aggregate_urn");
}
if (!DBSlotExists("apt_instance_history", "public_url")) {
DBQueryFatal("alter table apt_instance_history add ".
" `public_url` tinytext after aggregate_urn");
}
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