1575323184990_funding_schema.js
Home
/
database /
migrations /
1575323184990_funding_schema.js
'use strict'
/** @type {import('@adonisjs/lucid/src/Schema')} */
const Schema = use('Schema')
class FundingSchema extends Schema {
up () {
this.create('fundings', (table) => {
table.increments('id')
table.float('amount', 2).notNullable()
table.string('document').notNullable()
table.date('date_awarded').notNullable()
table.integer('element_id').notNullable().references('id').inTable('elements')
table.timestamps()
})
}
down () {
this.drop('fundings')
}
}
module.exports = FundingSchema