Files
artdanj-api/database/migrations/1618661863952_forms.ts
2021-06-30 22:27:07 +02:00

21 lines
476 B
TypeScript
Executable File

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