initial commit
This commit is contained in:
commit
cd234531b9
37 changed files with 5529 additions and 0 deletions
21
backend/migrations/20250702165756_create_recipes_table.js
Normal file
21
backend/migrations/20250702165756_create_recipes_table.js
Normal file
|
@ -0,0 +1,21 @@
|
|||
/**
|
||||
* @param { import("knex").Knex } knex
|
||||
* @returns { Promise<void> }
|
||||
*/
|
||||
exports.up = function (knex) {
|
||||
return knex.schema.createTable('recipes', function (table) {
|
||||
table.increments('id').primary();
|
||||
table.string('name').notNullable().unique();
|
||||
table.string('cuisine').notNullable();
|
||||
table.timestamps(true, true);
|
||||
})
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* @param { import("knex").Knex } knex
|
||||
* @returns { Promise<void> }
|
||||
*/
|
||||
exports.down = function (knex) {
|
||||
return knex.schema.dropTable('users');
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue