diff options
Diffstat (limited to 'database/migrations/1566554359294_workspace_schema.js')
-rw-r--r-- | database/migrations/1566554359294_workspace_schema.js | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/database/migrations/1566554359294_workspace_schema.js b/database/migrations/1566554359294_workspace_schema.js new file mode 100644 index 0000000..84e0bb9 --- /dev/null +++ b/database/migrations/1566554359294_workspace_schema.js | |||
@@ -0,0 +1,25 @@ | |||
1 | 'use strict' | ||
2 | |||
3 | /** @type {import('@adonisjs/lucid/src/Schema')} */ | ||
4 | const Schema = use('Schema') | ||
5 | |||
6 | class WorkspaceSchema extends Schema { | ||
7 | up () { | ||
8 | this.create('workspaces', (table) => { | ||
9 | table.increments() | ||
10 | table.string('workspaceId', 80).notNullable().unique() | ||
11 | table.string('userId', 80).notNullable() | ||
12 | table.string('name', 80).notNullable() | ||
13 | table.integer('order') | ||
14 | table.json('services') | ||
15 | table.json('data') | ||
16 | table.timestamps() | ||
17 | }) | ||
18 | } | ||
19 | |||
20 | down () { | ||
21 | this.drop('workspaces') | ||
22 | } | ||
23 | } | ||
24 | |||
25 | module.exports = WorkspaceSchema | ||