1575323309230_stewards_schema.js
Home
/
database /
migrations /
1575323309230_stewards_schema.js
'use strict'
/** @type {import('@adonisjs/lucid/src/Schema')} */
const Schema = use('Schema')
class StewardsSchema extends Schema {
up () {
this.create('stewards', (table) => {
table.increments('id')
table.integer('contact_id').notNullable().references('id').inTable('contacts')
table.date('start_date').notNullable()
table.date('end_date').notNullable()
table.timestamps()
})
}
down () {
this.drop('stewards')
}
}
module.exports = StewardsSchema