implemented a lot of features
This commit is contained in:
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'
|
||||
|
||||
/**
|
||||
* Body downloads per group (CONCEPT.md D24). Identifying obfuscated articles
|
||||
* costs one body download each; busy groups carry far more of them than the
|
||||
* line can fetch, so they are indexed header-only (normal subjects) unless
|
||||
* enabled.
|
||||
*/
|
||||
export default class extends BaseSchema {
|
||||
protected tableName = 'groups'
|
||||
|
||||
async up() {
|
||||
this.schema.alterTable(this.tableName, (table) => {
|
||||
table.boolean('fetch_bodies').notNullable().defaultTo(false)
|
||||
})
|
||||
this.defer(async (db) => {
|
||||
await db.rawQuery(`UPDATE groups SET fetch_bodies = true WHERE name = 'alt.binaries.test'`)
|
||||
})
|
||||
}
|
||||
|
||||
async down() {
|
||||
this.schema.alterTable(this.tableName, (table) => table.dropColumn('fetch_bodies'))
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user