Files
usenet-indexer/database/migrations/1770000003800_rules_dropped_posters.ts
T
Daan MeijerandClaude Opus 5.5 3d24db5565
Test and deploy / test (push) Successful in 50s
Test and deploy / edge (push) Successful in 1m55s
Test and deploy / deploy (push) Successful in 1m47s
Rules drop posters at the header pass: the CelebMovie family (rule set version 3)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 11:36:46 +02:00

25 lines
1.0 KiB
TypeScript

import { BaseSchema } from '@adonisjs/lucid/schema'
/**
* A rule set version with droppedPosters (lib/rules/rule_set.ts): the newest set plus the CelebMovie family, whose
* scraped celebrity pictures workers drop at the header pass from now on (LOG.md 2026-10-16 (65)). A new version, so the
* ranges record which ran with it. Nothing where there's no rule set yet (the default gets it) or the newest has it.
*/
const POSTERS = ['celebmovie', 'celebwow', 'celebfx', 'iluvcelebs', 'nudecelebs', 'celebsextapes']
export default class extends BaseSchema {
async up() {
this.defer(async (db) => {
const latest = await db.from('rule_sets').orderBy('version', 'desc').first()
if (!latest || 'droppedPosters' in latest.rules) return
await db.table('rule_sets').insert({
version: Number(latest.version) + 1,
rules: JSON.stringify({ ...latest.rules, droppedPosters: POSTERS }),
note: 'dropped posters: the CelebMovie family (2026-10-16)',
})
})
}
async down() {}
}