Skip to content

Commit

Permalink
Merge pull request #5394 from mhsdesign/bugfix/exclude-non-doctrine-m…
Browse files Browse the repository at this point in the history
…anaged-tables-from-migration-generate

BUGFIX: Avoid that `doctrine:migrationgenerate` drops pure dbal tables
  • Loading branch information
kitsunet authored Dec 16, 2024
2 parents f0c6111 + 447c4dc commit 58db026
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Neos.Neos/Configuration/Settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,14 @@ Neos:
neos-site: Sites
neos-plugin: Plugins

persistence:
doctrine:
migrations:
ignoredTables:
'neos_asset_usage': true
'neos_neos_workspace_metadata': true
'neos_neos_workspace_role': true

Fusion:
rendering:
exceptionHandler: Neos\Fusion\Core\ExceptionHandlers\ThrowingHandler
Expand Down
10 changes: 10 additions & 0 deletions Neos.Neos/Tests/Behavior/Features/Bootstrap/AssetUsageTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@ trait AssetUsageTrait
*/
abstract private function getObject(string $className): object;

/**
* @BeforeScenario
*/
final public function pruneAssetUsage(): void
{
foreach (static::$alreadySetUpContentRepositories as $contentRepositoryId) {
$this->getObject(\Neos\Neos\AssetUsage\Domain\AssetUsageRepository::class)->removeAll($contentRepositoryId);
}
}

/**
* @Then I expect the AssetUsageService to have the following AssetUsages:
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,17 @@ trait WorkspaceServiceTrait
*/
abstract private function getObject(string $className): object;

/**
* @BeforeScenario
*/
final public function pruneWorkspaceService(): void
{
foreach (static::$alreadySetUpContentRepositories as $contentRepositoryId) {
$this->getObject(\Neos\Neos\Domain\Repository\WorkspaceMetadataAndRoleRepository::class)->pruneWorkspaceMetadata($contentRepositoryId);
$this->getObject(\Neos\Neos\Domain\Repository\WorkspaceMetadataAndRoleRepository::class)->pruneRoleAssignments($contentRepositoryId);
}
}

/**
* @When the root workspace :workspaceName is created
* @When the root workspace :workspaceName with title :title and description :description is created
Expand Down

0 comments on commit 58db026

Please sign in to comment.