add Skill

This commit is contained in:
2021-08-14 12:25:38 +02:00
parent f9098be315
commit a5062cc854
7 changed files with 139 additions and 1 deletions

View File

@@ -0,0 +1,22 @@
import BaseSchema from '@ioc:Adonis/Lucid/Schema'
export default class Skills extends BaseSchema {
protected tableName = 'skills'
public async up () {
this.schema.createTable(this.tableName, (table) => {
table.increments('id')
table.string('name')
table
.integer('file_id')
.unsigned()
.references('files.id')
.onDelete('CASCADE')
table.timestamps(true, true)
})
}
public async down () {
this.schema.dropTable(this.tableName)
}
}