diff options
Diffstat (limited to 'database/migrations/1566554359294_workspace_schema.js')
-rw-r--r-- | database/migrations/1566554359294_workspace_schema.js | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/database/migrations/1566554359294_workspace_schema.js b/database/migrations/1566554359294_workspace_schema.js index 84e0bb9..0a3c138 100644 --- a/database/migrations/1566554359294_workspace_schema.js +++ b/database/migrations/1566554359294_workspace_schema.js | |||
@@ -1,25 +1,24 @@ | |||
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 WorkspaceSchema extends Schema { | 5 | class WorkspaceSchema extends Schema { |
7 | up () { | 6 | up() { |
8 | this.create('workspaces', (table) => { | 7 | this.create('workspaces', (table) => { |
9 | table.increments() | 8 | table.increments(); |
10 | table.string('workspaceId', 80).notNullable().unique() | 9 | table.string('workspaceId', 80).notNullable().unique(); |
11 | table.string('userId', 80).notNullable() | 10 | table.string('userId', 80).notNullable(); |
12 | table.string('name', 80).notNullable() | 11 | table.string('name', 80).notNullable(); |
13 | table.integer('order') | 12 | table.integer('order'); |
14 | table.json('services') | 13 | table.json('services'); |
15 | table.json('data') | 14 | table.json('data'); |
16 | table.timestamps() | 15 | table.timestamps(); |
17 | }) | 16 | }); |
18 | } | 17 | } |
19 | 18 | ||
20 | down () { | 19 | down() { |
21 | this.drop('workspaces') | 20 | this.drop('workspaces'); |
22 | } | 21 | } |
23 | } | 22 | } |
24 | 23 | ||
25 | module.exports = WorkspaceSchema | 24 | module.exports = WorkspaceSchema; |