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'
|
||||
|
||||
/**
|
||||
* NZBs posted to Usenet are read into releases (CONCEPT.md D26): the archive
|
||||
* password they may carry, and a lookup of files by their first segment.
|
||||
*/
|
||||
export default class extends BaseSchema {
|
||||
async up() {
|
||||
this.schema.alterTable('releases', (table) => {
|
||||
// From <meta type="password"> of a posted NZB; passed on in our NZBs.
|
||||
table.text('password')
|
||||
})
|
||||
this.defer(async (db) => {
|
||||
await db.rawQuery(`CREATE INDEX IF NOT EXISTS files_first_segment_idx ON files ((message_ids->'1'->>'id'))`)
|
||||
})
|
||||
}
|
||||
|
||||
async down() {
|
||||
this.defer(async (db) => {
|
||||
await db.rawQuery('DROP INDEX IF EXISTS files_first_segment_idx')
|
||||
})
|
||||
this.schema.alterTable('releases', (table) => table.dropColumn('password'))
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user