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

BUG: 9.0 cr:prune is a noop if projections are empty already or not up to date #4913

Closed
mhsdesign opened this issue Feb 26, 2024 · 1 comment · Fixed by #5297
Closed

BUG: 9.0 cr:prune is a noop if projections are empty already or not up to date #4913

mhsdesign opened this issue Feb 26, 2024 · 1 comment · Fixed by #5297
Assignees
Labels

Comments

@mhsdesign
Copy link
Member

... as we rely on the content stream projection being up to date which might not be the case for a dev system in error state

$contentStreamIds = $this->contentRepository->getContentStreamFinder()->findAllIds();

maybe we need some hardcode db reset cr:prune --agressive-show-no-mercy

@mhsdesign
Copy link
Member Author

Basically we just empty the tables like we do here :D

$eventTableName = DoctrineEventStoreFactory::databaseTableName($contentRepositoryId);
$confirmed = $this->output->askConfirmation(sprintf('We will clear the events from "%s". ARE YOU SURE [n]? ', $eventTableName), false);
if (!$confirmed) {
$this->outputLine('Cancelled...');
$this->quit();
}
$this->connection->executeStatement('TRUNCATE ' . $connection->quoteIdentifier($eventTableName));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
1 participant