diff --git a/src/main/java/party/cybsec/oyeshops/database/DatabaseManager.java b/src/main/java/party/cybsec/oyeshops/database/DatabaseManager.java index 453a78c..4a56c34 100644 --- a/src/main/java/party/cybsec/oyeshops/database/DatabaseManager.java +++ b/src/main/java/party/cybsec/oyeshops/database/DatabaseManager.java @@ -78,7 +78,20 @@ public class DatabaseManager { try { stmt.execute("alter table player_preferences add column seen_intro boolean not null default false"); } catch (SQLException ignored) { - // column likely exists + } + + // migration: add owed_amount, enabled, created_at to shops if missing + try { + stmt.execute("alter table shops add column owed_amount integer not null default 0"); + } catch (SQLException ignored) { + } + try { + stmt.execute("alter table shops add column enabled boolean not null default true"); + } catch (SQLException ignored) { + } + try { + stmt.execute("alter table shops add column created_at integer not null default 0"); + } catch (SQLException ignored) { } // indexes