Files
usenet-indexer/database/migrations/1770000003600_worker_cursors.ts
T
Daan MeijerandClaude Opus 5.5 e627862a8d
Test and deploy / test (push) Successful in 49s
Test and deploy / edge (push) Successful in 1m57s
Test and deploy / deploy (push) Successful in 2m4s
The merger keeps its place over a restart (worker_cursors), not from 1970 each deploy
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 13:45:25 +02:00

21 lines
645 B
TypeScript

import { BaseSchema } from '@adonisjs/lucid/schema'
/**
* Where a worker's incremental rounds go on after a restart. The merger kept its "since" in memory only: each deploy
* or pause started it from 1970, a first round over every par2 set and inner stem ever found (25+ min with par2_files
* on the HDD) before the sidecar fold's turn (LOG.md 2026-10-15 (58)).
*/
export default class extends BaseSchema {
async up() {
this.schema.raw(`
CREATE TABLE worker_cursors (
name text PRIMARY KEY,
at timestamptz NOT NULL
)`)
}
async down() {
this.schema.raw(`DROP TABLE IF EXISTS worker_cursors`)
}
}