()
| 165 | } |
| 166 | |
| 167 | private synchronized void executeUpdateScript() throws InstallationException { |
| 168 | |
| 169 | try { |
| 170 | File file = new File(getClass().getClassLoader().getResource("/database/updatev3_0tov3_1.sql").getFile()); |
| 171 | String data = FileUtils.readFileToString(file, Charset.defaultCharset() ); |
| 172 | |
| 173 | Connection databaseConnection = Database.getDatabaseConnection(null, true); |
| 174 | Statement psProcToexecute = databaseConnection.createStatement(); |
| 175 | psProcToexecute.executeUpdate(data); |
| 176 | |
| 177 | } catch (Exception e) { |
| 178 | log.fatal(e); |
| 179 | e.printStackTrace(); |
| 180 | throw new InstallationException(e); |
| 181 | } |
| 182 | } |
| 183 | } |
no test coverage detected