1575322085612_standards_schema.js
Home
/
database /
migrations /
1575322085612_standards_schema.js
'use strict'
/** @type {import('@adonisjs/lucid/src/Schema')} */
const Schema = use('Schema')
class StandardsSchema extends Schema {
up () {
this.create('standards', (table) => {
table.increments('id')
table.integer('element_id').notNullable().unsigned().references('id').inTable('elements')
table.string('document').notNullable()
table.float('version', 2).unsigned().notNullable()
table.date('retired').nullable()
table.timestamps()
})
}
down () {
this.drop('standards')
}
}
module.exports = StandardsSchema