1575323434337_elements_stewards_schema.js

22 lines | 504 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.increments('id')
      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