Commit ca85709c authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Begin the process of cleaning up the webtask code. I am making heavy use

of these now, time to start managing them properly (we have lots of stale
ones in the DB).
parent b49fc53c
......@@ -293,6 +293,7 @@ CREATE TABLE `apt_instances` (
`gid_idx` mediumint(8) unsigned NOT NULL default '0',
`aggregate_urn` varchar(128) default NULL,
`public_url` tinytext,
`webtask_id` varchar(128) NOT NULL default '',
`created` datetime default NULL,
`status` varchar(32) default NULL,
`status_timestamp` datetime default NULL,
......@@ -383,6 +384,7 @@ CREATE TABLE `apt_profile_versions` (
`deleted` datetime default NULL,
`disabled` tinyint(1) NOT NULL default '0',
`uuid` varchar(40) NOT NULL,
`webtask_id` varchar(128) NOT NULL default '',
`parent_profileid` int(8) unsigned default NULL,
`parent_version` int(8) unsigned default NULL,
`status` varchar(32) default NULL,
......@@ -410,6 +412,7 @@ CREATE TABLE `apt_profiles` (
`gid` varchar(32) NOT NULL default '',
`gid_idx` mediumint(8) unsigned NOT NULL default '0',
`uuid` varchar(40) NOT NULL,
`webtask_id` varchar(128) NOT NULL default '',
`public` tinyint(1) NOT NULL default '0',
`shared` tinyint(1) NOT NULL default '0',
`listed` tinyint(1) NOT NULL default '0',
......@@ -2469,6 +2472,7 @@ CREATE TABLE `images` (
`gid` varchar(32) NOT NULL default '',
`gid_idx` mediumint(8) unsigned NOT NULL default '0',
`uuid` varchar(40) NOT NULL default '',
`webtask_id` varchar(128) NOT NULL default '',
`nodelta` tinyint(1) NOT NULL default '0',
`noversioning` tinyint(1) NOT NULL default '0',
`metadata_url` tinytext,
......
use strict;
use libdb;
sub DoUpdate($$$)
{
my ($dbhandle, $dbname, $version) = @_;
if (!DBSlotExists("apt_instances", "webtask_id")) {
DBQueryFatal("alter table apt_instances " .
" add `webtask_id` varchar(128) NOT NULL default '' ".
" after public_url");
}
if (!DBSlotExists("apt_profiles", "webtask_id")) {
DBQueryFatal("alter table apt_profiles " .
" add `webtask_id` varchar(128) NOT NULL default '' ".
" after uuid");
}
if (!DBSlotExists("apt_profile_versions", "webtask_id")) {
DBQueryFatal("alter table apt_profile_versions " .
" add `webtask_id` varchar(128) NOT NULL default '' ".
" after uuid");
}
if (!DBSlotExists("images", "webtask_id")) {
DBQueryFatal("alter table images " .
" add `webtask_id` varchar(128) NOT NULL default '' ".
" after uuid");
}
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