From ff521cf496ed408d71ddb08eb5ed596980c25172 Mon Sep 17 00:00:00 2001
From: felmer <felmer>
Date: Tue, 25 Sep 2012 09:34:52 +0000
Subject: [PATCH] SqlMigrationTest: start version has to be positive

SVN: 26788
---
 .../cisd/dbmigration/migration/SqlMigrationTestAbstract.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dbmigration/sourceTest/java/ch/systemsx/cisd/dbmigration/migration/SqlMigrationTestAbstract.java b/dbmigration/sourceTest/java/ch/systemsx/cisd/dbmigration/migration/SqlMigrationTestAbstract.java
index ba4489c3ee8..86cbd37e73e 100644
--- a/dbmigration/sourceTest/java/ch/systemsx/cisd/dbmigration/migration/SqlMigrationTestAbstract.java
+++ b/dbmigration/sourceTest/java/ch/systemsx/cisd/dbmigration/migration/SqlMigrationTestAbstract.java
@@ -79,7 +79,7 @@ public abstract class SqlMigrationTestAbstract
     {
         SqlMigrationVersion newestVersion = new SqlMigrationVersion(newestVersionString);
         SqlMigrationVersion firstVersion =
-                new SqlMigrationVersion(newestVersion.getVersionInt() - CHECK_NUMBER_OF_MIGRATIONS);
+                new SqlMigrationVersion(Math.max(1, newestVersion.getVersionInt() - CHECK_NUMBER_OF_MIGRATIONS));
 
         DatabaseConfigurationContext migrationContext = null;
         DatabaseConfigurationContext scratchContext = null;
-- 
GitLab