1575322303589_standards_notes_schema.js

22 lines | 494 B Blame History Raw Download
'use strict'

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

class StandardsNotesSchema extends Schema {
  up () {
    this.create('standards_notes', (table) => {
      table.increments('id')
      table.integer('standard_id').notNullable().unsigned().references('id').inTable('standards')
      table.text('content').notNullable()
      table.timestamps()
    })
  }

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

module.exports = StandardsNotesSchema