Check if transactions table has to be created and fix logging transactions.
This commit is contained in:
parent
0e73b5ee41
commit
0674c969db
|
|
@ -30,7 +30,7 @@ public record DatabaseHelper(PlayerShops plugin, DatabaseManager databaseManager
|
|||
if (!databaseManager().hasTable("shops"))
|
||||
createShopTable();
|
||||
|
||||
if (databaseManager().hasTable("transactions"))
|
||||
if (!databaseManager().hasTable("transactions"))
|
||||
createTransactionsTable();
|
||||
}
|
||||
|
||||
|
|
@ -196,7 +196,7 @@ public record DatabaseHelper(PlayerShops plugin, DatabaseManager databaseManager
|
|||
* Log a transaction with a shop
|
||||
*/
|
||||
public void logTransaction(Player player, PlayerShop shop, int orders) {
|
||||
String query = "INSERT INTO transaction (shop_id, actor_name, actor_uuid, server, action, time, price, amount, item) " +
|
||||
String query = "INSERT INTO transactions (shop_id, actor_name, actor_uuid, server, action, time, price, amount, item) " +
|
||||
"VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)";
|
||||
databaseManager().addDatabaseQuery(
|
||||
new DatabaseQuery(query, new DatabaseQuery.DatabaseTask() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user