Use ordered SQLite migrations (Refs #75)
CI / checks (push) Successful in 5m6s

This commit is contained in:
2026-10-10 00:01:18 -04:00
parent a0663e43b8
commit 8d1bb69591
56 changed files with 1085 additions and 736 deletions
@@ -222,6 +222,7 @@ describe('routine host observation retention', () => {
api.handle.exec(
"UPDATE ec_host_operations SET observation_success=0; DELETE FROM ec_host_schema_migrations WHERE name='completed-status-batches'"
);
api.handle.pragma('user_version = 0');
api.closeDb();
expect(
api
@@ -380,6 +381,7 @@ describe('routine host observation retention', () => {
DROP TRIGGER operation_history_count_update; DROP TABLE ec_host_operation_history_counts;
DELETE FROM ec_host_schema_migrations WHERE name='history-counts-v1'`);
api.handle.exec('ALTER TABLE ec_host_operations DROP COLUMN observation_success');
api.handle.pragma('user_version = 0');
api.closeDb();
expect(api.pruneHostObservations()).toBe(2);