Hello, I've been getting Cannot add foreign key constraint when running php artisan migrate since the update to 3.2.4.
My table_prefix = totem_
Illuminate\Database\QueryException : SQLSTATE[HY000]: General error: 1215 Cannot add foreign key constraint (SQL: alter table `totem_task_results` add constraint `task_id_fk` foreign key (`task_id`) references `tasks` (`id`))
at C:\Projects\API\vendor\laravel\framework\src\Illuminate\Database\Connection.php: 664
660: // If an exception occurs when attempting to run a query, we'll format the error
661: // message to include the bindings with SQL, which will make this exception a
662: // lot more helpful to the developer instead of just the database's errors.
663: catch (Exception $e) {
664: throw new QueryException(
665: $query, $this->prepareBindings($bindings), $e
666: );
667: }
668:
669: return $result;
Exception trace:
1 Doctrine\DBAL\Driver\PDOException::("SQLSTATE[HY000]: General error: 1215 Cannot add foreign key constraint")
C:\Projects\API\vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\PDOStatement.php : 143
2 PDOException::("SQLSTATE[HY000]: General error: 1215 Cannot add foreign key constraint")
C:\Projects\API\vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\PDOStatement.php : 141
Please use the argument -v to see more details.
Hello, I've been getting
Cannot add foreign key constraint
when runningphp artisan migrate
since the update to3.2.4
.My
table_prefix
=totem_