diff options
author | Oliver Tappe | 2008-01-08 12:36:28 +0100 |
---|---|---|
committer | Oliver Tappe | 2008-01-08 12:36:28 +0100 |
commit | 9b6ff69dfa421af29e14ee6b756538e798649145 (patch) | |
tree | 12e7fbcbbd87d3f956d45fb438e4f707000b4557 /config-db | |
parent | * added missing invocation of _upgradeDBTo0_21(), such that now (diff) | |
download | core-9b6ff69dfa421af29e14ee6b756538e798649145.tar.gz core-9b6ff69dfa421af29e14ee6b756538e798649145.tar.xz core-9b6ff69dfa421af29e14ee6b756538e798649145.zip |
* improved robustness of schema upgrading code against intermediate
problems (or oversights like my last one)
git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1449 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'config-db')
-rw-r--r-- | config-db/OpenSLX/DBSchema.pm | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/config-db/OpenSLX/DBSchema.pm b/config-db/OpenSLX/DBSchema.pm index 80030e10..7e8c0162 100644 --- a/config-db/OpenSLX/DBSchema.pm +++ b/config-db/OpenSLX/DBSchema.pm @@ -395,7 +395,6 @@ sub checkAndUpgradeDBSchemaIfNecessary ) ); $self->_schemaUpgradeDBFrom($metaDB, $currVersion); - $metaDB->schemaSetDBVersion($DbSchema->{version}); vlog(1, _tr('upgrade done')); } else { vlog(1, _tr('DB matches current schema version (%s)', $currVersion)); @@ -436,7 +435,7 @@ sub _upgradeDBTo0_2 my $self = shift; my $metaDB = shift; - vlog(1, "upgrading schema version to 0.2 ..."); + vlog(0, "upgrading schema version to 0.2"); # move attributes into separate tables ... # @@ -643,6 +642,8 @@ sub _upgradeDBTo0_2 ] ); + $metaDB->schemaSetDBVersion(0.2); + return 1; } @@ -651,7 +652,7 @@ sub _upgradeDBTo0_21 my $self = shift; my $metaDB = shift; - vlog(1, "upgrading schema version to 0.21 ..."); + vlog(0, "upgrading schema version to 0.21"); # move attributes into separate tables ... # @@ -665,6 +666,8 @@ sub _upgradeDBTo0_21 ] ); + $metaDB->schemaSetDBVersion(0.21); + return 1; } |