'use strict' /** @type {import('@adonisjs/lucid/src/Schema')} */ const Schema = use('Schema') class LinkSchema extends Schema { up() { this.create('links', (table) => { table.increments(); table.bigInteger('user_id'); table.bigInteger('child_id'); table.boolean('is_parent'); table.timestamps(); table.index(['user_id']); table.index(['child_id']); }) } down() { this.drop('links') } } module.exports = LinkSchema