Advertisement
Guest User

Untitled

a guest
Mar 18th, 2018
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.25 KB | None | 0 0
  1.  Illuminate\Database\QueryException  : SQLSTATE[HY000]: General error: 1215 Cannot add foreign key constraint (SQL: alter table `lessons` add constraint `lessons_section_id_foreign` foreign key (`section_id`) references `sections` (`id`) on delete no action)
  2.  
  3.   at /Users/kardashov/projects/panda-school/vendor/laravel/framework/src/Illuminate/Database/Connection.php: 664
  4.   660:         // If an exception occurs when attempting to run a query, we'll format the error
  5.   661:         // message to include the bindings with SQL, which will make this exception a
  6.   662:         // lot more helpful to the developer instead of just the database's errors.
  7.   663:         catch (Exception $e) {
  8.   664:             throw new QueryException(
  9.   665:                 $query, $this->prepareBindings($bindings), $e
  10.   666:             );
  11.   667:         }
  12.   668:
  13.   669:         return $result;
  14.  
  15.   Exception trace:
  16.  
  17.   1   PDOException::("SQLSTATE[HY000]: General error: 1215 Cannot add foreign key constraint")
  18.       /Users/kardashov/projects/panda-school/vendor/laravel/framework/src/Illuminate/Database/Connection.php : 458
  19.  
  20.   2   PDOStatement::execute()
  21.       /Users/kardashov/projects/panda-school/vendor/laravel/framework/src/Illuminate/Database/Connection.php : 458
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement