[Rt-commit] rt branch, 4.0/upgrade-no-db-changes-fix, created. rt-4.0.0rc4-35-gb8d8092
Ruslan Zakirov
ruz at bestpractical.com
Tue Feb 1 20:00:06 EST 2011
The branch, 4.0/upgrade-no-db-changes-fix has been created
at b8d8092e48a8868d8c95112fcc9092ff0f450fbd (commit)
- Log -----------------------------------------------------------------
commit b8d8092e48a8868d8c95112fcc9092ff0f450fbd
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date: Wed Feb 2 03:59:27 2011 +0300
handle no-versions to upgrade to earlier
diff --git a/sbin/rt-setup-database.in b/sbin/rt-setup-database.in
index d104215..9610094 100755
--- a/sbin/rt-setup-database.in
+++ b/sbin/rt-setup-database.in
@@ -318,15 +318,15 @@ sub action_upgrade {
if RT::Handle::cmp_version( $upgrading_from, $upgrading_to ) == 0;
my @versions = get_versions_from_to($base_dir, $upgrading_from, undef);
+ return (1, "No DB changes since $upgrading_from")
+ unless @versions;
+
if (RT::Handle::cmp_version($versions[-1], $upgrading_to) > 0) {
print "\n***** There are upgrades for $versions[-1], which is later than $upgrading_to,\n";
print "***** which you are nominally upgrading to. Upgrading to $versions[-1] instead.\n";
$upgrading_to = $versions[-1];
}
- return (1, "No DB changes between $upgrading_from and $upgrading_to")
- unless @versions;
-
print "\nGoing to apply following upgrades:\n";
print map "* $_\n", @versions;
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list