From c44835d6a46e2febe548a522881f70254ad20db8 Mon Sep 17 00:00:00 2001 From: Oliver Tappe Date: Wed, 3 Jun 2009 21:56:14 +0000 Subject: Refactored implementation of preboot evironment to support the creation of several preboot media from a single preboot client: * added new client attribute preboot_media which holds the list of media that shall be created for that preboot client (currently, only 'cd' is known) * the boot_type value 'preboot_cd' has been renamed to 'preboot' * db-schema has been bumped to 0.36 to adjust the db-contents to the new expectations * adjusted config-demuxer accordingly git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2929 95ad53e4-c205-0410-b2fa-d234c58c8868 --- config-db/OpenSLX/DBSchema.pm | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'config-db/OpenSLX/DBSchema.pm') diff --git a/config-db/OpenSLX/DBSchema.pm b/config-db/OpenSLX/DBSchema.pm index f11ced10..b4130e15 100644 --- a/config-db/OpenSLX/DBSchema.pm +++ b/config-db/OpenSLX/DBSchema.pm @@ -34,7 +34,7 @@ use OpenSLX::Basics; ### fk => foreign key (integer) ################################################################################ -my $VERSION = 0.35; +my $VERSION = 0.36; my $DbSchema = { 'version' => $VERSION, @@ -805,6 +805,23 @@ sub _schemaUpgradeDBFrom undef ); + return 1; + }, + 0.36 => sub { + my $metaDB = shift; + + # value 'preboot-cd' in client-attr 'boot_type' has been changed + # to 'preboot', and a separate attribute 'preboot_media' has been + # introduced: + foreach my $client ($metaDB->fetchClientByFilter()) { + my $attrs = $metaDB->fetchClientAttrs($client->{id}); + if ($attrs->{boot_type} eq 'preboot-cd') { + $attrs->{boot_type} = 'preboot'; + $attrs->{preboot_media} = 'cd'; + $metaDB->setClientAttrs($client->{id}, $attrs); + } + } + return 1; }, ); -- cgit v1.2.3-55-g7522