public function cleanupWorkspacesAfterFinalizing()
    {
        $queryBuilder = $this->getQueryBuilder();

        $constraints = [
            $queryBuilder->expr()->andX(
                $queryBuilder->expr()->eq(
                    'pid',
                    $queryBuilder->createNamedParameter(-1, \PDO::PARAM_INT)
                ),
                $queryBuilder->expr()->eq(
                    't3ver_wsid',
                    $queryBuilder->createNamedParameter(0, \PDO::PARAM_INT)
                ),
                $queryBuilder->expr()->gt(
                    't3ver_id',
                    $queryBuilder->createNamedParameter(0, \PDO::PARAM_INT)
                )
            ),
        ];

        $queryBuilder->delete('tt_content')
            ->where(...$constraints)
            ->execute();
    }