import { BaseSchema } from '@adonisjs/lucid/schema' /** Archive listings from the first RAR volume (CONCEPT.md D19). */ export default class extends BaseSchema { async up() { this.schema.alterTable('files', (table) => { // RarInfo of a first volume: format, flags and entries. table.jsonb('archive') }) this.schema.alterTable('releases', (table) => { // Password protected: encrypted file data or encrypted headers. table.boolean('encrypted') // Entries of the release's first archive volume. table.jsonb('contents') }) } async down() { this.schema.alterTable('releases', (table) => { table.dropColumn('contents') table.dropColumn('encrypted') }) this.schema.alterTable('files', (table) => table.dropColumn('archive')) } }