-
-
Notifications
You must be signed in to change notification settings - Fork 224
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: Case sensitive migration and migration of baseWorkspaceName #5205
Conversation
…ceName with a leading letter. Also applying to baseWorkspaceName.
d43826e
to
4ef9987
Compare
ohhhh dammm yes i feel we are just getting started with the can of worms. Senf or mayo? Just food for thought: Is it realistic that there will be one workspace |
…ceName with a leading letter. Also applying to baseWorkspaceName.
At first i thought it was really clever to do it via sql but maybe as its just a onetime thing we could go the manual php loop round? The thing is its getting more and more complex. I wouldnt mind this taking a little longer ^^ Though i will also approve this and i admire that you can write sql like that :D |
Should be fine now(TM) . We would also cover uppercase/lowercase by the md5 now. |
UPDATE {$eventTableName} | ||
SET | ||
payload = JSON_SET(payload, '$.workspaceName', SUBSTR(MD5(JSON_UNQUOTE(JSON_EXTRACT(payload, '$.workspaceName'))), 1, 30)) | ||
payload = JSON_SET(payload, '$.workspaceName', LEFT(CONCAT('w', MD5(JSON_UNQUOTE(JSON_EXTRACT(payload, '$.workspaceName')))), 30)) |
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.
something like this should work, if we change the WorkspaceName
regex to ^[a-z0-9\-]{0,36}
payload = JSON_SET(payload, '$.workspaceName', LEFT(CONCAT('w', MD5(JSON_UNQUOTE(JSON_EXTRACT(payload, '$.workspaceName')))), 30)) | |
payload = JSON_SET( | |
payload, | |
'$.workspaceName', | |
IF(JSON_UNQUOTE(JSON_EXTRACT(payload, '$.workspaceName')) REGEXP '^[a-z0-9\-]{0,36}$', | |
LOWER(JSON_UNQUOTE(JSON_EXTRACT(payload, '$.workspaceName'))), | |
MD5(JSON_UNQUOTE(JSON_EXTRACT(payload, '$.workspaceName'))) | |
) | |
) |
Neos.ContentRepository.Core/Classes/SharedModel/Workspace/WorkspaceName.php
Show resolved
Hide resolved
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. Thank you! <3
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.
This still does not seem to work.... after applying the event migration I still get "Invalid workspace name (user-Nezaniel) given." during cr:projectionreplayall
I found the issue; There are two more workspaceName proeprties (sourceWorkspaceName and targetWorkspaceName). I fixed it and it now works on my starship(tm) |
post merge +1 thanks (and also thanks for the note with having to replay the workspace module ^^) |
Follow up of #5202
Fixes #5201