Files
artdanj-api/database/migrations/1618661863952_forms.ts
Arthur DANJOU 404d193b46 Working
Signed-off-by: Arthur DANJOU <arthurdanjou@outlook.fr>
2021-07-01 16:13:22 +02:00

21 lines
486 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').primary()
table.string('name')
table.string('email')
table.string('subject')
table.string('content')
table.timestamps(true, true)
})
}
public async down () {
this.schema.dropTable(this.tableName)
}
}