Quick check so people don't try to upgrade an existing 4 to v 5.
authorGreg Sabino Mullane <greg@endpoint.com>
Fri, 27 May 2011 04:34:45 +0000 (00:34 -0400)
committerGreg Sabino Mullane <greg@endpoint.com>
Fri, 27 May 2011 04:34:45 +0000 (00:34 -0400)
bucardo_ctl

index 6cc2f7df3acea3675d94d02ae6253c071a01ac30..e62facd3251c33d52e00ccfb2f9c6bab57dc41f5 100755 (executable)
@@ -6358,6 +6358,13 @@ sub upgrade {
 
     my $changes = 0;
 
+    ## Quick sanity to make sure we don't try to cross the 4/5 boundary
+    if (!relation_exists('bucardo', 'syncrun')) {
+      print "Sorry, but Bucardo version 4 cannot be upgraded to version 5\n";
+      print "You will have to recreate your information (dbs, syncs, etc.)\n";
+      exit 1;
+    }
+
     ## Make sure the upgrade_log table is in place
 
     if (!relation_exists('bucardo', 'upgrade_log')) {