Skip to content

Commit 565562e

Browse files
Patch to feature 2.2
NOTE: set api_key_id to nullable to fix issues regarding `SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails` errors
1 parent 64a361f commit 565562e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

database/migrations/2015_03_02_031822_create_api_keys_table.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function up()
3131

3232
Schema::create('api_logs', function (Blueprint $table) {
3333
$table->increments('id');
34-
$table->integer('api_key_id')->unsigned();
34+
$table->integer('api_key_id', false, true)->nullable();
3535
$table->string('route', 150);
3636
$table->string('method', 6);
3737
$table->text('params');

0 commit comments

Comments
 (0)