src/Generators/templates/schema.mustache
'use strict'
const Schema = use('Schema')
class {{ name }} extends Schema {
up () {
this.create('{{ table }}', (table) => {
{{ #columnsArray }}
{{ &knexString }}
{{ /columnsArray }}
{{ #timestamp }}
table.timestamps()
{{ /timestamp }}
{{ #softDelete }}
table.softDeletes()
{{ /softDelete }}
})
}
down () {
this.drop('{{ table }}')
}
}
module.exports = {{ name }}