Skip to content

Commit

Permalink
Fix event migration
Browse files Browse the repository at this point in the history
  • Loading branch information
bwaidelich committed May 17, 2024
1 parent 4f3dcc5 commit d4f40e3
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -336,12 +336,12 @@ public function migratePayloadToWorkspaceName(\Closure $outputFn): void

foreach ($this->eventStore->load(VirtualStreamName::all()) as $eventEnvelope) {
$eventType = $eventEnvelope->event->type->value;
if (in_array($eventType, ['RootWorkspaceWasCreated', 'WorkspaceBaseWorkspaceWasChanged', 'WorkspaceWasCreated', 'WorkspaceWasDiscarded', 'WorkspaceWasRebased'], true)) {
if (in_array($eventType, ['RootWorkspaceWasCreated', 'WorkspaceBaseWorkspaceWasChanged', 'WorkspaceWasCreated', 'WorkspaceWasDiscarded', 'WorkspaceWasPartiallyDiscarded', 'WorkspaceWasRebased'], true)) {
$eventData = self::decodeEventPayload($eventEnvelope);
$workspaceNamesByContentStreamId[$eventData['newContentStreamId']] = $eventData['workspaceName'];
continue;
}
if (in_array($eventType, ['WorkspaceWasPartiallyPublished', 'WorkspaceWasPartiallyPublished', 'WorkspaceWasPublished'], true)) {
if (in_array($eventType, ['WorkspaceWasPartiallyPublished', 'WorkspaceWasPublished'], true)) {
$eventData = self::decodeEventPayload($eventEnvelope);
$workspaceNamesByContentStreamId[$eventData['newSourceContentStreamId']] = $eventData['sourceWorkspaceName'];
continue;
Expand Down

0 comments on commit d4f40e3

Please sign in to comment.