555 737 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
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("images", "webtask_id")) {
        DBQueryFatal("alter table images " .
		     " add `webtask_id` varchar(128) NOT NULL default '' ".
		     "   after uuid");
    }
    return 0;
}

# Local Variables:
# mode:perl
# End: