FIX: Better DB upgrade
authorJanis Streib <janis@dogcraft.de>
Sat, 21 Mar 2015 21:54:24 +0000 (22:54 +0100)
committerJanis Streib <janis@dogcraft.de>
Sat, 21 Mar 2015 21:54:24 +0000 (22:54 +0100)
src/org/cacert/gigi/database/DatabaseConnection.java

index eac822bd5ae50465cbe4cb78845987797d1fa364..5d987191a248452717c61e312f77d28fceaa6b95 100644 (file)
@@ -132,7 +132,7 @@ public class DatabaseConnection {
                     }
                     version++;
                 }
-                s.addBatch("INSERT INTO schemeVersion SET version='" + version + "'");
+                s.addBatch("UPDATE schemeVersion SET version='" + version + "'");
                 System.out.println("UPGRADING Database to version " + version);
                 s.executeBatch();
                 System.out.println("done.");