import BaseSchema from '@ioc:Adonis/Lucid/Schema'; export default class extends BaseSchema { protected tableName = 'recipes'; public async up(): Promise { this.schema.createTable(this.tableName, table => { table.increments(); table.string('name', 80).notNullable(); table.string('recipeId', 254).notNullable().unique(); table.json('data'); table.timestamps(); }); } public async down(): Promise { this.schema.dropTable(this.tableName); } }