blob: b863200b46c580c6293ee68cfe3359f4975bcc8d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
import { BaseSchema } from '@adonisjs/lucid/schema'
export default class extends BaseSchema {
protected tableName = 'workspaces'
public async up(): Promise<void> {
this.schema.createTable(this.tableName, (table) => {
table.increments()
table.string('workspaceId', 80).notNullable().unique()
table.string('userId', 80).notNullable()
table.string('name', 80).notNullable()
table.integer('order')
table.json('services')
table.json('data')
table.timestamps()
})
}
public async down(): Promise<void> {
this.schema.dropTable(this.tableName)
}
}
|