25 lines
1.0 KiB
TypeScript
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() {}
|
|
}
|