Add form migration

This commit is contained in:
2021-04-17 14:20:11 +02:00
parent 635bc090ea
commit b71f33e50a

View File

@@ -0,0 +1,20 @@
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(true)
})
}
public async down () {
this.schema.dropTable(this.tableName)
}
}