From b018adf240679ec59a7344e30be39400f1ecd8af Mon Sep 17 00:00:00 2001 From: vantezzen Date: Thu, 22 Aug 2019 11:12:36 +0200 Subject: Initial commit --- .../migrations/1566385379883_service_schema.js | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 database/migrations/1566385379883_service_schema.js (limited to 'database/migrations/1566385379883_service_schema.js') diff --git a/database/migrations/1566385379883_service_schema.js b/database/migrations/1566385379883_service_schema.js new file mode 100644 index 0000000..bdc066e --- /dev/null +++ b/database/migrations/1566385379883_service_schema.js @@ -0,0 +1,23 @@ +'use strict' + +/** @type {import('@adonisjs/lucid/src/Schema')} */ +const Schema = use('Schema') + +class ServiceSchema extends Schema { + up () { + this.create('services', (table) => { + table.increments() + table.string('userId', 80).notNullable() + table.string('name', 80).notNullable() + table.string('recipeId', 254).notNullable() + table.json('settings') + table.timestamps() + }) + } + + down () { + this.drop('services') + } +} + +module.exports = ServiceSchema -- cgit v1.2.3-54-g00ecf