fix(db): add migrations for missing shop columns on existing dbs
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user