From 6bebfcf3cf75a3066c68271497c7f17b89320658 Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Sun, 17 Jul 2016 17:51:36 +0200 Subject: [PATCH] Fixed crash on database upgrade. --- .../src/main/scala/com/nutomic/ensichat/core/util/Database.scala | 1 + 1 file changed, 1 insertion(+) diff --git a/core/src/main/scala/com/nutomic/ensichat/core/util/Database.scala b/core/src/main/scala/com/nutomic/ensichat/core/util/Database.scala index e58f2a4..b9dc8d5 100644 --- a/core/src/main/scala/com/nutomic/ensichat/core/util/Database.scala +++ b/core/src/main/scala/com/nutomic/ensichat/core/util/Database.scala @@ -105,6 +105,7 @@ class Database(path: File, settings: SettingsInterface, callbackInterface: Callb return logger.info(s"Upgrading database from version $oldVersion to $DatabaseVersion") + Class.forName("org.h2.Driver") val connection = DriverManager.getConnection(DatabasePath) if (oldVersion <= 2) { connection.createStatement().executeUpdate("ALTER TABLE MESSAGES ADD COLUMN (tokens INT);")