aboutsummaryrefslogtreecommitdiffstats
path: root/src/internal-server/database/migrations/1566554359294_workspace_schema.js
blob: 421a406b510a69f2eaa98ba9465578c055155ea2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/** @type {import('@adonisjs/lucid/src/Schema')} */
const Schema = use('Schema');

class WorkspaceSchema extends Schema {
  up() {
    this.create('workspaces', (table) => {
      table.increments();
      table.string('workspaceId', 80).notNullable().unique();
      table.string('name', 80).notNullable();
      table.integer('order');
      table.json('services');
      table.json('data');
      table.timestamps();
    });
  }

  down() {
    this.drop('workspaces');
  }
}

module.exports = WorkspaceSchema;