Olá Alura,
O link está aqui:
git@github.com:tiagobrandao03/2612-doctrine.git
Estou tendo problema ao adicionar uma coluna na entidade Course
. Não consigo inserir dados, porque consta que eu não declarei a coluna $nome
. Aqui está o erro:
C:\xampp\htdocs\2612-doctrine>php bin/insert-course.php "Doctrine"
PHP Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 1 table Course has no column named nome in C:\xampp\htdocs\2612-doctrine\vendor\doctrine\dbal\src\Driver\PDO\Connection.php:59
Stack trace:
#0 C:\xampp\htdocs\2612-doctrine\vendor\doctrine\dbal\src\Driver\PDO\Connection.php(59): PDO->prepare('INSERT INTO Cou...')
#1 C:\xampp\htdocs\2612-doctrine\vendor\doctrine\dbal\src\Connection.php(1052): Doctrine\DBAL\Driver\PDO\Connection->prepare('INSERT INTO Cou...')
#2 C:\xampp\htdocs\2612-doctrine\vendor\doctrine\orm\lib\Doctrine\ORM\Persisters\Entity\BasicEntityPersister.php(264): Doctrine\DBAL\Connection->prepare('INSERT INTO Cou...')
#3 C:\xampp\htdocs\2612-doctrine\vendor\doctrine\orm\lib\Doctrine\ORM\UnitOfWork.php(1145): Doctrine\ORM\Persisters\Entity\BasicEntityPersister->executeInserts()
#4 C:\xampp\htdocs\2612-doctrine\vendor\doctrine\orm\lib\Doctrine\ORM\UnitOfWork.php(431): Doctrine\ORM\UnitOfWork->executeInserts(Object(Doctrine\ORM\Mapping\ClassMetadata))
#5 C:\xampp\htdocs\2612-doctrine\vendor\doctrine\orm\lib\Doctrine\ORM\EntityManager.php(403): Doctrine\ORM\UnitOfWork->commit(NULL)
#6 C:\xampp\htdocs\2612-doctrine\bin\insert-course.php(14): Doctrine\ORM\EntityManager->flush()
#7 {main}