forked from sagi/seepur
Sagi Dayan
d7c9359ef2
- DB migrations - Login/Register flows - Dockerfile - Layouts, Partials, Components - Sass - Bulma.io - sqlite
26 lines
497 B
JavaScript
26 lines
497 B
JavaScript
'use strict'
|
|
|
|
/** @type {import('@adonisjs/lucid/src/Schema')} */
|
|
const Schema = use('Schema')
|
|
|
|
class ChildSchema extends Schema {
|
|
up () {
|
|
this.create('children', (table) => {
|
|
table.increments()
|
|
table.string('name')
|
|
table.date('birthday')
|
|
table.bigInteger('user_id')
|
|
table.string('avatar')
|
|
table.string('state')
|
|
table.timestamps()
|
|
|
|
table.index(['user_id'])
|
|
})
|
|
}
|
|
|
|
down () {
|
|
this.drop('children')
|
|
}
|
|
}
|
|
|
|
module.exports = ChildSchema
|