Fix error saving new backpack with autocleanup enabled on SQLite

This commit is contained in:
GeorgH93 2018-07-27 20:44:32 +02:00
parent d2405995d6
commit e0f32d6982
No known key found for this signature in database
GPG Key ID: D1630D37F9E4B3C8

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2014-2016 GeorgH93
* Copyright (C) 2014-2018 GeorgH93
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -79,10 +79,7 @@ protected HikariConfig getPoolConfig()
@Override
protected void updateQuerysForDialect()
{
if(maxAge > 0)
{
queryInsertBP = queryInsertBP.replaceAll("\\) VALUES \\(\\?,\\?,\\?", "{FieldBPLastUpdate}) VALUES (?,?,?,DATE('now')");
}
queryInsertBP = queryInsertBP.replaceAll("\\) VALUES \\(\\?,\\?,\\?", ",{FieldBPLastUpdate}) VALUES (?,?,?,DATE('now')");
queryDeleteOldBackpacks = "DELETE FROM `{TableBackpacks}` WHERE `{FieldBPLastUpdate}` < DATE('now', '-{VarMaxAge} days')";
queryUpdateBP = queryUpdateBP.replaceAll("\\{NOW}", "DATE('now')");
if(useUUIDs)