aboutsummaryrefslogtreecommitdiffstats
path: root/database/migrations/1566385379883_service_schema.js
blob: bdc066e5fa3b179d93263ec234c4480c22930607 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
'use strict'

/** @type {import('@adonisjs/lucid/src/Schema')} */
const Schema = use('Schema')

class ServiceSchema extends Schema {
  up () {
    this.create('services', (table) => {
      table.increments()
      table.string('userId', 80).notNullable()
      table.string('name', 80).notNullable()
      table.string('recipeId', 254).notNullable()
      table.json('settings')
      table.timestamps()
    })
  }

  down () {
    this.drop('services')
  }
}

module.exports = ServiceSchema