/** * @param { import("knex").Knex } knex * @returns { Promise } */ exports.up = function(knex) { return knex.schema .createTable('customCraftingRecipes', (table) => { table.increments('id'); table.string('station'); }) .createTable('customCraftingRecipeItems', (table) => { table.integer('id').references('id').inTable('customCraftingRecipes').notNullable(); table.integer('item').notNullable(); table.integer('quantity').defaultTo(1); table.enum('type', ['input', 'output', 'requirement']); }); }; /** * @param { import("knex").Knex } knex * @returns { Promise } */ exports.down = function(knex) { return knex.schema .dropTable('customCraftingRecipes') .dropTable('customCraftingRecipes'); };