import { BaseSchema } from '@adonisjs/lucid/schema' /** * Previous contents of the docker-compose.yml files, saved before every * change made from the dashboard. */ export default class extends BaseSchema { protected tableName = 'compose_versions' async up() { this.schema.createTable(this.tableName, (table) => { table.increments('id') table.string('path').notNullable().index() table.text('content').notNullable() table.string('username').nullable() table.string('reason').nullable() table.timestamp('created_at').notNullable() }) } async down() { this.schema.dropTable(this.tableName) } }