diff options
Diffstat (limited to 'database/migrations/1566554359294_workspace_schema.ts')
-rw-r--r-- | database/migrations/1566554359294_workspace_schema.ts | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/database/migrations/1566554359294_workspace_schema.ts b/database/migrations/1566554359294_workspace_schema.ts index 77e1189..b863200 100644 --- a/database/migrations/1566554359294_workspace_schema.ts +++ b/database/migrations/1566554359294_workspace_schema.ts | |||
@@ -1,22 +1,22 @@ | |||
1 | import BaseSchema from '@ioc:Adonis/Lucid/Schema'; | 1 | import { BaseSchema } from '@adonisjs/lucid/schema' |
2 | 2 | ||
3 | export default class extends BaseSchema { | 3 | export default class extends BaseSchema { |
4 | protected tableName = 'workspaces'; | 4 | protected tableName = 'workspaces' |
5 | 5 | ||
6 | public async up(): Promise<void> { | 6 | public async up(): Promise<void> { |
7 | this.schema.createTable(this.tableName, table => { | 7 | this.schema.createTable(this.tableName, (table) => { |
8 | table.increments(); | 8 | table.increments() |
9 | table.string('workspaceId', 80).notNullable().unique(); | 9 | table.string('workspaceId', 80).notNullable().unique() |
10 | table.string('userId', 80).notNullable(); | 10 | table.string('userId', 80).notNullable() |
11 | table.string('name', 80).notNullable(); | 11 | table.string('name', 80).notNullable() |
12 | table.integer('order'); | 12 | table.integer('order') |
13 | table.json('services'); | 13 | table.json('services') |
14 | table.json('data'); | 14 | table.json('data') |
15 | table.timestamps(); | 15 | table.timestamps() |
16 | }); | 16 | }) |
17 | } | 17 | } |
18 | 18 | ||
19 | public async down(): Promise<void> { | 19 | public async down(): Promise<void> { |
20 | this.schema.dropTable(this.tableName); | 20 | this.schema.dropTable(this.tableName) |
21 | } | 21 | } |
22 | } | 22 | } |