import { BaseSchema } from '@adonisjs/lucid/schema' /** * A completed binary whose file is queued for content inspection keeps its * row until inspection has stored the file's fingerprint on it (LOG.md * 2026-10-06 (11)): par2 naming (D16) matches par2 listings against binary * fingerprints and attaches sets to binaries. With the inspection queue * days behind, the GC deleted them first (after 6 hours unfingerprinted, * 48 hours stale). TRUE while waiting; cleared by inspection. */ export default class extends BaseSchema { async up() { await this.db.rawQuery(`SET LOCAL lock_timeout = '2min'`) await this.db.rawQuery(`ALTER TABLE binaries ADD COLUMN IF NOT EXISTS awaiting_inspection boolean`) } async down() { await this.db.rawQuery(`ALTER TABLE binaries DROP COLUMN IF EXISTS awaiting_inspection`) } }