29 lines
811 B
JavaScript
29 lines
811 B
JavaScript
/**
|
|
* @param { import("knex").Knex } knex
|
|
* @returns { Promise<void> }
|
|
*/
|
|
exports.up = function(knex) {
|
|
return knex.schema
|
|
.createTable('customCraftingRecipes', (table) => {
|
|
table.increments('id');
|
|
table.string('guild');
|
|
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<void> }
|
|
*/
|
|
exports.down = function(knex) {
|
|
return knex.schema
|
|
.dropTable('customCraftingRecipes')
|
|
.dropTable('customCraftingRecipeItems');
|
|
};
|