import { BaseSchema } from '@adonisjs/lucid/schema' /** * nntp_shares: the account's connections shared by the processes that read articles (app/services/nntp_shares.ts). * Each process's row says what it could use and has open, and what it may open; a row without a heartbeat for a * minute is a process gone (its connections closed with it). The split was fixed per process: with history paused * the coordinator's 38 stood idle while the prober's 8 were the limit (LOG.md 2026-10-18 (75)). */ export default class extends BaseSchema { async up() { this.schema.raw(` CREATE TABLE IF NOT EXISTS nntp_shares ( name text PRIMARY KEY, priority integer NOT NULL, min integer NOT NULL, want integer NOT NULL, open integer NOT NULL, granted integer NOT NULL, heartbeat_at timestamptz NOT NULL DEFAULT now() )`) } async down() { this.schema.raw(`DROP TABLE IF EXISTS nntp_shares`) } }