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,24 @@
import { BaseSchema } from '@adonisjs/lucid/schema'
/**
* Segments (articles) of a binary. The primary key makes re-ingesting the
* same range a no-op.
*/
export default class extends BaseSchema {
protected tableName = 'parts'
async up() {
this.schema.createTable(this.tableName, (table) => {
table.bigInteger('binary_id').notNullable().references('binaries.id').onDelete('CASCADE')
table.integer('number').notNullable()
table.text('message_id').notNullable()
table.integer('bytes').notNullable()
table.bigInteger('article_number')
table.primary(['binary_id', 'number'])
})
}
async down() {
this.schema.dropTable(this.tableName)
}
}