Included user-information in employee Model.

This commit is contained in:
Sockenklaus
2021-11-04 14:00:13 +01:00
parent 63c1407643
commit 3d2e551a8e
13 changed files with 171 additions and 217 deletions

View File

@@ -6,7 +6,7 @@ export default class ApiTokens extends BaseSchema {
public async up() {
this.schema.createTable(this.tableName, (table) => {
table.increments('id').primary()
table.integer('user_id').unsigned().references('id').inTable('users').onDelete('CASCADE')
table.integer('user_id').unsigned().references('id').inTable('employee').onDelete('CASCADE')
table.string('name').notNullable()
table.string('type').notNullable()
table.string('token', 64).notNullable().unique()