1584137383826_modify_date_steward_schema.js
Home
/
database /
migrations /
1584137383826_modify_date_steward_schema.js
'use strict'
/** @type {import('@adonisjs/lucid/src/Schema')} */
const Schema = use('Schema')
class ModifyDateStewardSchema extends Schema {
up () {
this.alter('stewards', (table) => {
// alter table
table.date('start_date').nullable().alter()
table.date('end_date').nullable().alter()
})
}
down () {
this.alter('stewards', (table) => {
// reverse alternations
table.date('start_date').notNullable().alter()
table.date('end_date').notNullable().alter()
})
}
}
module.exports = ModifyDateStewardSchema