21 lines
519 B
TypeScript
21 lines
519 B
TypeScript
import { BaseSchema } from '@adonisjs/lucid/schema'
|
|
|
|
export default class extends BaseSchema {
|
|
protected tableName = 'keywords'
|
|
|
|
async up() {
|
|
this.schema.createTable(this.tableName, (table) => {
|
|
table.increments('id')
|
|
table.string('name').notNullable()
|
|
table.string('type').notNullable()
|
|
table.string('match_type').defaultTo('include')
|
|
table.boolean('is_active').defaultTo(true)
|
|
table.timestamps()
|
|
})
|
|
}
|
|
|
|
async down() {
|
|
this.schema.dropTable(this.tableName)
|
|
}
|
|
}
|