reverts bad hard coded table name

This commit is contained in:
Michael Gerner Andreasen 2016-12-27 00:54:47 +01:00 committed by GitHub
parent 20299a4b2e
commit 358d50bcc7

View File

@ -46,7 +46,7 @@ public class TransactionLoggerMySQL implements TransactionLogger {
private void createTables() {
try (Connection conn = dbConn.openConnection()) {
PreparedStatement ps = conn.prepareStatement(String.format("CREATE TABLE IF NOT EXISTS `test` (`source` VARCHAR(128), `destination` VARCHAR(128), `amount` DECIMAL(18, 2), `reason` VARCHAR(128), `logged` TIMESTAMP NOT NULL default CURRENT_TIMESTAMP)", dbConn.getTable("transaction_logs")));
PreparedStatement ps = conn.prepareStatement(String.format("CREATE TABLE IF NOT EXISTS `%s` (`source` VARCHAR(128), `destination` VARCHAR(128), `amount` DECIMAL(18, 2), `reason` VARCHAR(128), `logged` TIMESTAMP NOT NULL default CURRENT_TIMESTAMP)", dbConn.getTable("transaction_logs")));
ps.executeUpdate();
} catch (SQLException e) {
throw new RuntimeException("Failed to create transaction logger tables", e);