implemented a lot of features

This commit is contained in:
Daan Meijer committed 2026-09-29 00:32:01 +02:00
1 parent 62f1767df3
commit bcb9be5da9
141 files changed
+10705 -385

No files matched your search

@@ -0,0 +1,32 @@
import { BaseSchema } from '@adonisjs/lucid/schema'
/**
* Files that are still being collected from XOVER. One row per uploaded file,
* identified by file_key (see lib/subject/file_key.ts).
*/
export default class extends BaseSchema {
protected tableName = 'binaries'
async up() {
this.schema.createTable(this.tableName, (table) => {
table.bigIncrements('id')
table.string('file_key', 40).notNullable().unique()
table.text('poster').notNullable()
table.text('subject').notNullable()
table.text('name').notNullable()
table.integer('total_parts').notNullable()
table.jsonb('groups').notNullable()
table.timestamp('posted_at', { useTz: true })
table.timestamp('first_seen_at', { useTz: true }).notNullable()
table.timestamp('last_seen_at', { useTz: true }).notNullable().index()
table.timestamp('completed_at', { useTz: true })
// Set when two different articles claim the same part number (see IngestService).
table.timestamp('conflicted_at', { useTz: true })
table.integer('file_id').unsigned().references('files.id').onDelete('SET NULL')
})
}
async down() {
this.schema.dropTable(this.tableName)
}
}