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,24 @@
|
||||
import { BaseSchema } from '@adonisjs/lucid/schema'
|
||||
|
||||
/**
|
||||
* Segments of files cut off by a range's edge (REBUILD.md, fragments): kept
|
||||
* by range, merged when the neighbouring range is done, then written as a
|
||||
* chunk.
|
||||
*/
|
||||
export default class extends BaseSchema {
|
||||
async up() {
|
||||
this.schema.createTable('fragments', (table) => {
|
||||
table.bigIncrements('id')
|
||||
table.bigInteger('range_id').notNullable()
|
||||
table.string('file_key', 40).notNullable()
|
||||
table.bigInteger('article_number').notNullable()
|
||||
table.jsonb('segment').notNullable()
|
||||
table.index(['file_key'])
|
||||
table.index(['range_id'])
|
||||
})
|
||||
}
|
||||
|
||||
async down() {
|
||||
this.schema.dropTable('fragments')
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user