neos / neos-development-collection

The unified repository containing the Neos core packages, used for Neos development.
https://www.neos.io/
GNU General Public License v3.0
260 stars 221 forks source link

`flow cr:setup --reset-projections` might fail if tables to be truncated dont exist #5008

Closed mhsdesign closed 1 month ago

mhsdesign commented 2 months ago

We possibly have to try catch this:

private function truncateDatabaseTables(): void
{
    $connection = $this->dbalClient->getConnection();
    try {
        $connection->executeQuery('TRUNCATE table ' . $this->tableNamePrefix . '_node');
    } catch (\Doctrine\DBAL\Exception\TableNotFoundException) {
    }

otherwise - in our dev phase at least - when we add tables to projections, the command doesnt work as expected as it will fail to truncate new tables. I think its fair that reset would be forgiving.

bwaidelich commented 1 month ago

@mhsdesign #5089 should do the trick, no?