1575323434337_elements_stewards_schema.js

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

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

class ElementsStewardsSchema extends Schema {
  up () {
    this.create('elements_stewards', (table) => {
      table.integer('element_id').references('id').inTable('elements')
      table.integer('steward_id').references('id').inTable('stewards')
      table.timestamps()
    })
  }

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

module.exports = ElementsStewardsSchema