framework icon indicating copy to clipboard operation
framework copied to clipboard

Undefined array key -1 Sqlite

Open andresilvagomez opened this issue 3 years ago • 0 comments

  • Laravel Version: 9.24.0
  • PHP Version: 8.1.8
  • Database Driver & Version:

Description:

ErrorException

Undefined array key -1

at vendor/doctrine/dbal/src/Schema/SqliteSchemaManager.php:605 601▕ $foreignKeyCount = count($foreignKeyDetails); 602▕ 603▕ foreach ($columns as $i => $column) { 604▕ // SQLite identifies foreign keys in reverse order of appearance in SQL ➜ 605▕ $columns[$i] = array_merge($column, $foreignKeyDetails[$foreignKeyCount - $column['id'] - 1]); 606▕ } 607▕ 608▕ return $columns; 609▕ }

Steps To Reproduce:

In Each Test.

andresilvagomez avatar Aug 10 '22 14:08 andresilvagomez

This is a doctrine/dbal package issue, they will fix that with next release (4.0.1 ) https://github.com/doctrine/dbal/issues/5584#issuecomment-1210723304

yelloalejo avatar Aug 11 '22 00:08 yelloalejo