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

TASK: Check against LiveWorkspaceName Instead Of Comparing CS Ids #5149

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

use Doctrine\DBAL\Connection;
use Doctrine\DBAL\Exception as DBALException;
use Doctrine\DBAL\Schema\AbstractSchemaManager;
use Doctrine\DBAL\Types\Types;
use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePoint;
use Neos\ContentRepository\Core\EventStore\EventInterface;
Expand Down Expand Up @@ -108,7 +107,12 @@ private function determineRequiredSqlStatements(): array
{
$schemaManager = $this->dbal->createSchemaManager();
$schema = (new DocumentUriPathSchemaBuilder($this->tableNamePrefix))->buildSchema($schemaManager);
return DbalSchemaDiff::determineRequiredSqlStatements($this->dbal, $schema);
$statements = DbalSchemaDiff::determineRequiredSqlStatements($this->dbal, $schema);
// MIGRATIONS
if ($this->dbal->getSchemaManager()->tablesExist([$this->tableNamePrefix . '_livecontentstreams'])) {
$statements[] = sprintf('DROP table %s_livecontentstreams;', $this->tableNamePrefix);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not a huge fan.... I would just leave this dangling, we can consider something for these cases after release...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

im not a huge fan either from these hardcoded migrations, but Sebastian started introducing them and we can delete them at some point if we want. So thats why ill merge it.

}
return $statements;
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,12 @@ private function determineRequiredSqlStatements(): array
]);

$schema = DbalSchemaFactory::createSchemaWithTables($schemaManager, [$changeTable]);
return DbalSchemaDiff::determineRequiredSqlStatements($connection, $schema);
$statements = DbalSchemaDiff::determineRequiredSqlStatements($connection, $schema);
// MIGRATIONS
if ($this->dbal->getSchemaManager()->tablesExist([$this->tableNamePrefix . '_livecontentstreams'])) {
$statements[] = sprintf('DROP table %s_livecontentstreams;', $this->tableNamePrefix);
}
return $statements;
}

public function reset(): void
Expand Down
Loading