Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not migrate tl_bs_grid if it does not exist #49

Closed
wants to merge 1 commit into from

Conversation

fritzmg
Copy link
Contributor

@fritzmg fritzmg commented Apr 10, 2022

When creating a fresh Contao installation including this extension and then running contao:migrate, the following error will occur:

[Doctrine\DBAL\Driver\PDO\Exception (42S02)]
  SQLSTATE[42S02]: Base table or view not found: 1146 Table 'eiseinfalt.tl_bs_grid' doesn't exist  


Exception trace:
  at vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\PDO\Exception.php:18
 Doctrine\DBAL\Driver\PDO\Exception::new() at vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\PDOConnection.php:143
 Doctrine\DBAL\Driver\PDOConnection->doQuery() at vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\PDOQueryImplementation.php:38
 Doctrine\DBAL\Driver\PDOConnection->query() at vendor\doctrine\dbal\lib\Doctrine\DBAL\Connection.php:1309
 Doctrine\DBAL\Connection->executeQuery() at vendor\contao-bootstrap\grid\src\Migration\MigrateAutoGridWidths.php:56
 ContaoBootstrap\Grid\Migration\MigrateAutoGridWidths->__invoke() at vendor\contao-bootstrap\grid\src\Resources\contao\config\runonce.php:17 
 Contao\CoreBundle\Command\MigrateCommand->{closure}() at vendor\contao-bootstrap\grid\src\Resources\contao\config\runonce.php:18
 include() at vendor\contao\core-bundle\src\Command\MigrateCommand.php:275
 Contao\CoreBundle\Command\MigrateCommand->executeRunonceFile() at vendor\contao\core-bundle\src\Command\MigrateCommand.php:235
 Contao\CoreBundle\Command\MigrateCommand->executeMigrations() at vendor\contao\core-bundle\src\Command\MigrateCommand.php:138
 Contao\CoreBundle\Command\MigrateCommand->executeCommand() at vendor\contao\core-bundle\src\Command\MigrateCommand.php:91
 Contao\CoreBundle\Command\MigrateCommand->execute() at vendor\symfony\console\Command\Command.php:255
 Symfony\Component\Console\Command\Command->run() at vendor\symfony\console\Application.php:1027
 Symfony\Component\Console\Application->doRunCommand() at vendor\symfony\framework-bundle\Console\Application.php:97
 Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand() at vendor\symfony\console\Application.php:273
 Symfony\Component\Console\Application->doRun() at vendor\symfony\framework-bundle\Console\Application.php:83
 Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at vendor\symfony\console\Application.php:149
 Symfony\Component\Console\Application->run() at vendor\contao\manager-bundle\bin\contao-console:37
 include() at vendor\bin\contao-console:112

This PR fixes that by checking whether the table is actually present.

@dmolineus
Copy link
Member

Thanks for your pull request. The issue is already fixed in the develop branch (2de6521) and get's released this or next week.

@dmolineus dmolineus closed this Apr 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants