fix mysql migration log insert

This commit is contained in:
wea_ondara
2022-11-26 07:33:27 +01:00
parent 2910b2c282
commit d4efbfff46

View File

@@ -17,7 +17,7 @@ public class MysqlMigrationApplier extends MigrationApplier {
@Override @Override
protected void insertMigrationLog(Migration m) throws SQLException { protected void insertMigrationLog(Migration m) throws SQLException {
try (var stmt = connection.prepareStatement("INSERT INTO `" + options.getMigrationsTableName() + "` (`name`, `version`) VALUES (?, ?)")) {//TODO configurable log table name try (var stmt = connection.prepareStatement("INSERT INTO `" + options.getMigrationsTableName() + "` (`migration`, `version`) VALUES (?, ?)")) {//TODO configurable log table name
stmt.setString(1, m.getClass().getSimpleName()); stmt.setString(1, m.getClass().getSimpleName());
stmt.setString(2, "0.1"); //TODO insert actual library version stmt.setString(2, "0.1"); //TODO insert actual library version
stmt.executeUpdate(); stmt.executeUpdate();