Skip to content

Commit

Permalink
fix: make foreign key unsigned
Browse files Browse the repository at this point in the history
  • Loading branch information
thetutlage committed Jun 26, 2020
1 parent 163fe31 commit 76bf350
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion templates/migrations/api_tokens.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default class {{ tokensSchemaName }} extends BaseSchema {
public async up () {
this.schema.createTable(this.tableName, (table) => {
table.increments('id').primary()
table.integer('user_id').references('id').inTable('users').onDelete('CASCADE')
table.integer('user_id').unsigned().references('id').inTable('users').onDelete('CASCADE')
table.string('name').notNullable()
table.string('type').notNullable()
table.string('token', 64).notNullable()
Expand Down

0 comments on commit 76bf350

Please sign in to comment.