diff options
Diffstat (limited to 'database/migrations/1566385379883_service_schema.js')
-rw-r--r-- | database/migrations/1566385379883_service_schema.js | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/database/migrations/1566385379883_service_schema.js b/database/migrations/1566385379883_service_schema.js index a725699..093fb13 100644 --- a/database/migrations/1566385379883_service_schema.js +++ b/database/migrations/1566385379883_service_schema.js | |||
@@ -1,24 +1,23 @@ | |||
1 | 'use strict' | ||
2 | 1 | ||
3 | /** @type {import('@adonisjs/lucid/src/Schema')} */ | 2 | /** @type {import('@adonisjs/lucid/src/Schema')} */ |
4 | const Schema = use('Schema') | 3 | const Schema = use('Schema'); |
5 | 4 | ||
6 | class ServiceSchema extends Schema { | 5 | class ServiceSchema extends Schema { |
7 | up () { | 6 | up() { |
8 | this.create('services', (table) => { | 7 | this.create('services', (table) => { |
9 | table.increments() | 8 | table.increments(); |
10 | table.string('userId', 80).notNullable() | 9 | table.string('userId', 80).notNullable(); |
11 | table.string('serviceId', 80).notNullable() | 10 | table.string('serviceId', 80).notNullable(); |
12 | table.string('name', 80).notNullable() | 11 | table.string('name', 80).notNullable(); |
13 | table.string('recipeId', 254).notNullable() | 12 | table.string('recipeId', 254).notNullable(); |
14 | table.json('settings') | 13 | table.json('settings'); |
15 | table.timestamps() | 14 | table.timestamps(); |
16 | }) | 15 | }); |
17 | } | 16 | } |
18 | 17 | ||
19 | down () { | 18 | down() { |
20 | this.drop('services') | 19 | this.drop('services'); |
21 | } | 20 | } |
22 | } | 21 | } |
23 | 22 | ||
24 | module.exports = ServiceSchema | 23 | module.exports = ServiceSchema; |