File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
core/src/main/java/com/github/games647/fastlogin/core/storage Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -120,11 +120,11 @@ protected void migrateTable(MigratableStorage table) {
120120 core .getPlugin ().getLog ().info ("Starting database migration of table {} to version {}" ,
121121 table .getTableName (), i + 1 );
122122 try (Connection con = storage .getDataSource ().getConnection ();
123- Statement migrateStmt = con .createStatement ();
124- PreparedStatement saveStmt = con .prepareStatement (INSERT_MIGRATION );
125- ) {
123+ PreparedStatement saveStmt = con .prepareStatement (INSERT_MIGRATION )) {
126124 for (String statement : getMigrationStatement (table , i )) {
127- migrateStmt .executeUpdate (statement );
125+ try (Statement migrateStmt = con .createStatement ()) {
126+ migrateStmt .executeUpdate (statement );
127+ }
128128 }
129129
130130 // add entry to migrations table
You can’t perform that action at this time.
0 commit comments