25 lines
663 B
JavaScript
25 lines
663 B
JavaScript
![]() |
/**
|
||
|
* @param { import("knex").Knex } knex
|
||
|
* @returns { Promise<void> }
|
||
|
*/
|
||
|
exports.up = function (knex) {
|
||
|
return knex.schema.table('recipe_ingredients', table => {
|
||
|
table.string('raw', 255).defaultTo('');
|
||
|
table.integer('ingredient_id').nullable().alter();
|
||
|
table.string('quantity').nullable().alter();
|
||
|
table.string('unit').nullable().alter();
|
||
|
}).table('recipe_steps', table => {
|
||
|
table.string('instruction', 510).alter();
|
||
|
});
|
||
|
};
|
||
|
|
||
|
/**
|
||
|
* @param { import("knex").Knex } knex
|
||
|
* @returns { Promise<void> }
|
||
|
*/
|
||
|
exports.down = function (knex) {
|
||
|
return knex.schema.table('recipe_ingredients', table => {
|
||
|
table.dropColumn('raw');
|
||
|
});
|
||
|
};
|