summaryrefslogtreecommitdiffstats
path: root/config-db/OpenSLX/DBSchema.pm
diff options
context:
space:
mode:
authorOliver Tappe2008-01-08 11:28:49 +0100
committerOliver Tappe2008-01-08 11:28:49 +0100
commita608f561c48bf247e313f383e6f806f10d70f253 (patch)
tree13e2a35b0b448d1063e56e14aea864cbe2a6ca31 /config-db/OpenSLX/DBSchema.pm
parent* fixed several smaller bugs found when testing slxexport (diff)
downloadcore-a608f561c48bf247e313f383e6f806f10d70f253.tar.gz
core-a608f561c48bf247e313f383e6f806f10d70f253.tar.xz
core-a608f561c48bf247e313f383e6f806f10d70f253.zip
* added new DB-table 'installed_plugin', moving schema version to 0.21
* added functionality to DB-layer for adding, removing and fetching plugins that have been installed into a vendor-OS. * added a set of tests related to installed plugins. git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1447 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'config-db/OpenSLX/DBSchema.pm')
-rw-r--r--config-db/OpenSLX/DBSchema.pm35
1 files changed, 34 insertions, 1 deletions
diff --git a/config-db/OpenSLX/DBSchema.pm b/config-db/OpenSLX/DBSchema.pm
index cd92c07e..dc55b1b7 100644
--- a/config-db/OpenSLX/DBSchema.pm
+++ b/config-db/OpenSLX/DBSchema.pm
@@ -38,7 +38,7 @@ use POSIX qw(locale_h);
my $lang = setlocale(LC_MESSAGES);
my $country = $lang =~ m[^\w\w_(\w\w)] ? lc($1) : 'us';
-my $VERSION = 0.2;
+my $VERSION = 0.21;
my $DbSchema = {
'version' => $VERSION,
@@ -152,6 +152,19 @@ my $DbSchema = {
'system_id:fk', # foreign key
],
},
+ 'installed_plugin' => {
+ # holds the plugins that have been installed into a specific
+ # vendor-OS
+ 'cols' => [
+ 'id:pk', # primary key
+ 'vendor_os_id:fk', # foreign key
+ 'plugin_name:s.64', # name of installed plugin
+ # (e.g. suse-9.3-kde, debian-3.1-ppc,
+ # suse-10.2-cloned-from-kiwi).
+ # This is used as the folder name for the
+ # corresponding stage1, too.
+ ],
+ },
'meta' => {
# information about the database as such
'cols' => [
@@ -630,4 +643,24 @@ sub _upgradeDBTo0_2
return 1;
}
+sub _upgradeDBTo0_21
+{
+ my $self = shift;
+ my $metaDB = shift;
+
+ # move attributes into separate tables ...
+ #
+ # ... system attributes ...
+ $metaDB->schemaAddTable(
+ 'installed_plugin',
+ [
+ 'id:pk',
+ 'vendor_os_id:fk',
+ 'plugin_name:s.64',
+ ]
+ );
+
+ return 1;
+}
+
1;