summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
authorjeff <jeff>2007-12-14 21:32:32 +0000
committerjeff <jeff>2007-12-14 21:32:32 +0000
commitee873dffcea182e714385913e75e1134725d8321 (patch)
tree154584c892c21775c65aa589836aed7d523066ea /FS
parent674115921f5fba37fd9173a8bbe298233cbf4b31 (diff)
correct order of operations
Diffstat (limited to 'FS')
-rwxr-xr-xFS/bin/freeside-upgrade16
1 files changed, 8 insertions, 8 deletions
diff --git a/FS/bin/freeside-upgrade b/FS/bin/freeside-upgrade
index 01ca00c3d..0e1d07660 100755
--- a/FS/bin/freeside-upgrade
+++ b/FS/bin/freeside-upgrade
@@ -93,14 +93,6 @@ if ( $dbh->{Driver}->{Name} =~ /^mysql/i ) {
}
}
-$dbh->commit or die $dbh->errstr; # we *MUST* commit before upgrading data
-dbdef_create($dbh, $dbdef_file);
-delete $FS::Schema::dbdef_cache{$dbdef_file}; #force an actual reload
-$dbh = adminsuidsetup($user);
-
-upgrade()
- unless $DRY_RUN;
-
$dbh->commit or die $dbh->errstr;
dbdef_create($dbh, $dbdef_file);
@@ -126,6 +118,14 @@ unless ( $DRY_RUN ) {
$dbh->commit or die $dbh->errstr;
$dbh->disconnect or die $dbh->errstr;
+$dbh = adminsuidsetup($user);
+
+upgrade()
+ unless $DRY_RUN;
+
+$dbh->commit or die $dbh->errstr;
+$dbh->disconnect or die $dbh->errstr;
+
###
sub dbdef_create { # reverse engineer the schema from the DB and save to file