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:
1 parent
a18ead666b
commit
2209921846
11 files changed
+1228
No files matched your search
@@ -0,0 +1,27 @@
|
||||
import { BaseSchema } from '@adonisjs/lucid/schema'
|
||||
|
||||
/**
|
||||
* The indexed groups (REBUILD.md, group list). `priority` decides a
|
||||
* crosspost's owner: the indexed group in its Xref with the lowest number.
|
||||
* New groups get numbers after the existing ones, so they never take
|
||||
* articles from groups already done.
|
||||
*/
|
||||
export default class extends BaseSchema {
|
||||
async up() {
|
||||
this.schema.createTable('groups', (table) => {
|
||||
table.increments('id')
|
||||
table.string('name', 255).notNullable().unique()
|
||||
table.integer('priority').notNullable().unique()
|
||||
table.boolean('active').notNullable().defaultTo(true)
|
||||
// From GROUP when planned: the server's oldest and newest article.
|
||||
table.bigInteger('low').nullable()
|
||||
table.bigInteger('high').nullable()
|
||||
table.timestamp('planned_at', { useTz: true }).nullable()
|
||||
table.timestamp('created_at', { useTz: true }).notNullable().defaultTo(this.now())
|
||||
})
|
||||
}
|
||||
|
||||
async down() {
|
||||
this.schema.dropTable('groups')
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user