1575321261885_themes_schema.js

21 lines | 370 B Blame History Raw Download
'use strict'

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

class ThemesSchema extends Schema {
  up () {
    this.create('themes', (table) => {
      table.increments('id')
      table.string('name').notNullable().unique()
      table.timestamps()
    })
  }

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

module.exports = ThemesSchema