mirror of
https://github.com/ArthurDanjou/artdanj-api.git
synced 2026-01-18 05:57:58 +01:00
21 lines
466 B
TypeScript
21 lines
466 B
TypeScript
import BaseSchema from '@ioc:Adonis/Lucid/Schema'
|
|
|
|
export default class Forms extends BaseSchema {
|
|
protected tableName = 'forms'
|
|
|
|
public async up () {
|
|
this.schema.createTable(this.tableName, (table) => {
|
|
table.increments('id')
|
|
table.string('name')
|
|
table.string('email')
|
|
table.string('subject')
|
|
table.string('content')
|
|
table.timestamps()
|
|
})
|
|
}
|
|
|
|
public async down () {
|
|
this.schema.dropTable(this.tableName)
|
|
}
|
|
}
|