Maintenance: distance wear, broken-state burn ×1.5, repair action (ISS-069, v0.39.0)
CI / build + unit + e2e (pull_request) Successful in 9m34s
CI / build + unit + e2e (pull_request) Successful in 9m34s
This commit is contained in:
+11
-1
@@ -31,7 +31,9 @@ CREATE TABLE IF NOT EXISTS planes (
|
||||
lat REAL NOT NULL,
|
||||
lon REAL NOT NULL,
|
||||
departure_sim_time INTEGER,
|
||||
queue TEXT NOT NULL DEFAULT '[]'
|
||||
queue TEXT NOT NULL DEFAULT '[]',
|
||||
health REAL NOT NULL DEFAULT 100,
|
||||
repair_until_sim_time INTEGER
|
||||
);
|
||||
CREATE TABLE IF NOT EXISTS packages (
|
||||
id TEXT PRIMARY KEY NOT NULL,
|
||||
@@ -88,6 +90,14 @@ function migrateColumns(raw: RawSqlJsDatabase): void {
|
||||
if (!cols('packages').has('special')) {
|
||||
raw.exec('ALTER TABLE packages ADD COLUMN special TEXT');
|
||||
}
|
||||
// v0.39.0 (ISS-069): plane health — pre-existing rows backfill to full health.
|
||||
if (!cols('planes').has('health')) {
|
||||
raw.exec('ALTER TABLE planes ADD COLUMN health REAL NOT NULL DEFAULT 100');
|
||||
}
|
||||
// v0.39.0 (ISS-069): repair gate — nullable, no default; pre-existing rows stay NULL = not in repair.
|
||||
if (!cols('planes').has('repair_until_sim_time')) {
|
||||
raw.exec('ALTER TABLE planes ADD COLUMN repair_until_sim_time INTEGER');
|
||||
}
|
||||
// v0.30.0 (ISS-057): last-selected speed — pre-existing rows backfill to the row's OWN
|
||||
// current time_scale so a legacy DB resumes at the speed it was running, not the default.
|
||||
if (!cols('sim_state').has('last_selected_time_scale')) {
|
||||
|
||||
Reference in New Issue
Block a user