1575323907842_submission_notes_schema.js

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

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

class SubmissionNotesSchema extends Schema {
  up () {
    this.create('submission_notes', (table) => {
      table.increments('id')
      table.integer('submission_id').notNullable().unsigned().references('id').inTable('submissions')
      table.text('content').notNullable()
      table.timestamps()
    })
  }

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

module.exports = SubmissionNotesSchema