diff --git a/database/migrations/1618661863952_forms.ts b/database/migrations/1618661863952_forms.ts new file mode 100644 index 0000000..c0c7ab2 --- /dev/null +++ b/database/migrations/1618661863952_forms.ts @@ -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) + } +}