-
-
Notifications
You must be signed in to change notification settings - Fork 223
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
TASK: Check against LiveWorkspaceName Instead Of Comparing CS Ids #5149
Conversation
With neos#5002 `\Neos\Neos\FrontendRouting\Projection\DocumentUriPathFinder::isLiveContentStream` is obsolete.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one little thing, rest looks nice
@@ -22,8 +22,7 @@ public function __construct( | |||
public function buildSchema(AbstractSchemaManager $schemaManager): Schema | |||
{ | |||
$schema = DbalSchemaFactory::createSchemaWithTables($schemaManager, [ | |||
$this->createUriTable(), | |||
$this->createLiveContentStreamsTable() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also a more general question:
Wouldn't this be also responsible for now removing the deprecated table?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question in general. Have the same issue with another table. But does it make sence to check for removal on each setup? How long? When will we remove the removal code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Create" is a bit misleading here – it creates the schema for the table. There is no way to remove a schema here.
That's currently done in the projection itself (see https://github.com/neos/neos-development-collection/pull/5149/files#diff-2e3df51a3340b51e08cf9d2ba5aade329a8c0e073354c1d5a72e42c3aaf5a127R112)
But I'm with @kitsunet on this one: Let's leave those dangling for now. For 9.0 -> 9.1 ect we'll have to think of a way to migrate those things once
…tentStreamToUseWorkspaceNameOfEvent
Updated branch and added migration to drop the tables |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me by reading.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added comment, deleted comment, seems fine... Thanks!
$statements = DbalSchemaDiff::determineRequiredSqlStatements($this->dbal, $schema); | ||
// MIGRATIONS | ||
if ($this->dbal->getSchemaManager()->tablesExist([$this->tableNamePrefix . '_livecontentstreams'])) { | ||
$statements[] = sprintf('DROP table %s_livecontentstreams;', $this->tableNamePrefix); |
There was a problem hiding this comment.
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...
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 by reading, thanks!
Re dropping the table I'm OK either way.
@nezaniel could you remove your -1 if you agree?
Stupidly this introduced a regression: #5293 |
With #5002
\Neos\Neos\FrontendRouting\Projection\DocumentUriPathFinder::isLiveContentStream
is obsolete.See #4996
Adjustments: