2020-01-18 20:46:06 +00:00
|
|
|
'use strict'
|
|
|
|
|
|
|
|
/** @type {import('@adonisjs/lucid/src/Schema')} */
|
|
|
|
const Schema = use('Schema')
|
|
|
|
|
|
|
|
class ChildSchema extends Schema {
|
2020-03-17 22:16:34 +00:00
|
|
|
up() {
|
2020-01-18 20:46:06 +00:00
|
|
|
this.create('children', (table) => {
|
2020-03-17 22:16:34 +00:00
|
|
|
table.increments();
|
|
|
|
table.string('name');
|
|
|
|
table.date('dob');
|
|
|
|
table.string('avatar');
|
2020-04-12 14:25:42 +00:00
|
|
|
table.string('profile_cover');
|
2020-03-17 22:16:34 +00:00
|
|
|
table.timestamps();
|
2020-01-18 20:46:06 +00:00
|
|
|
})
|
|
|
|
}
|
|
|
|
|
2020-03-17 22:16:34 +00:00
|
|
|
down() {
|
2020-01-18 20:46:06 +00:00
|
|
|
this.drop('children')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = ChildSchema
|