fix(db): add migrations for missing shop columns on existing dbs

This commit is contained in:
cybsec committed 2026-02-04 21:20:05 -05:00
1 parent a53a4dac61
commit 3e1698614e
1 file changed
+14 -1
@@ -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