forked from sagi/seepur
22 lines
450 B
JavaScript
22 lines
450 B
JavaScript
'use strict'
|
|
|
|
/** @type {import('@adonisjs/lucid/src/Schema')} */
|
|
const Schema = use('Schema')
|
|
|
|
class BookSchema extends Schema {
|
|
up() {
|
|
this.create('books', (table) => {
|
|
table.increments()
|
|
table.bigInteger('user_id').notNullable();
|
|
table.integer('pages').notNullable();
|
|
table.string('book_folder').notNullable();
|
|
table.timestamps()
|
|
})
|
|
}
|
|
|
|
down() {
|
|
this.drop('books')
|
|
}
|
|
}
|
|
|
|
module.exports = BookSchema
|