From 5970b8e5bbf993c88c1f901708a7c5075a916770 Mon Sep 17 00:00:00 2001 From: vantezzen Date: Fri, 23 Aug 2019 14:04:22 +0200 Subject: Add support for workspaces --- database/migrations/1566554231482_recipe_schema.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 database/migrations/1566554231482_recipe_schema.js (limited to 'database/migrations/1566554231482_recipe_schema.js') diff --git a/database/migrations/1566554231482_recipe_schema.js b/database/migrations/1566554231482_recipe_schema.js new file mode 100644 index 0000000..7d8f5a8 --- /dev/null +++ b/database/migrations/1566554231482_recipe_schema.js @@ -0,0 +1,22 @@ +'use strict' + +/** @type {import('@adonisjs/lucid/src/Schema')} */ +const Schema = use('Schema') + +class RecipeSchema extends Schema { + up () { + this.create('recipes', (table) => { + table.increments() + table.string('name', 80).notNullable() + table.string('recipeId', 254).notNullable().unique() + table.json('data') + table.timestamps() + }) + } + + down () { + this.drop('recipes') + } +} + +module.exports = RecipeSchema -- cgit v1.2.3-70-g09d2