feat(api): add fleet snapshots and durable event stream

This commit is contained in:
chick
2026-07-17 14:16:46 +08:00
parent 1cc4a995ee
commit b4ae28c8f0
12 changed files with 1777 additions and 1 deletions
@@ -270,6 +270,18 @@ export const MIGRATIONS: readonly Migration[] = [
'CREATE INDEX idx_operation_preparations_status_expires_at ON operation_preparations(status, expires_at)',
],
},
{
id: 6,
name: 'durable-event-journal',
statements: [
`CREATE TABLE event_journal (
sequence INTEGER PRIMARY KEY AUTOINCREMENT,
public_id TEXT NOT NULL UNIQUE,
envelope_json TEXT NOT NULL
)`,
'CREATE INDEX idx_event_journal_sequence ON event_journal(sequence)',
],
},
];
const createMigrationsTable = `CREATE TABLE schema_migrations (