Rebuild: schema for groups, rule sets, ranges, release catalog, chunk store, fragments, probe queue, rule bookkeeping and nodes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Daan MeijerandClaude Opus 5.5 committed 2026-10-09 00:19:00 +02:00
1 parent a18ead666b
commit 2209921846
11 files changed
+1228

No files matched your search

@@ -0,0 +1,35 @@
import { BaseSchema } from '@adonisjs/lucid/schema'
/**
* What the rules dropped, per range (REBUILD.md, rules and recovery), and
* the sample of it kept in full.
*/
export default class extends BaseSchema {
async up() {
this.schema.createTable('rule_counts', (table) => {
table.bigInteger('range_id').notNullable()
table.string('rule', 12).notNullable()
table.text('key').notNullable()
table.bigInteger('articles').notNullable().defaultTo(0)
table.bigInteger('files').notNullable().defaultTo(0)
table.primary(['range_id', 'rule', 'key'])
})
this.schema.createTable('rule_samples', (table) => {
table.bigIncrements('id')
table.bigInteger('range_id').notNullable()
table.string('rule', 12).notNullable()
table.text('rule_key').notNullable()
table.string('release_key', 40).notNullable()
table.text('name').notNullable()
table.integer('files').notNullable()
table.integer('segments').notNullable()
table.binary('payload').notNullable()
table.index(['rule', 'rule_key'])
})
}
async down() {
this.schema.dropTable('rule_samples')
this.schema.dropTable('rule_counts')
}
}