1575321574938_elements_schema.js
Home
/
database /
migrations /
1575321574938_elements_schema.js
'use strict'
/** @type {import('@adonisjs/lucid/src/Schema')} */
const Schema = use('Schema')
class ElementsSchema extends Schema {
up () {
this.create('elements', (table) => {
table.increments('id')
table.string('name').notNullable()
table.integer('theme_id').notNullable().unsigned().references('id').inTable('themes')
table.integer('priority').nullable().unsigned()
table.integer('refresh_rate').nullable()
})
}
down () {
this.drop('elements')
}
}
module.exports = ElementsSchema