Task #53354
Make workspace name its identifier
Status: | Resolved | Start date: | 2013-11-05 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | Christian Müller | % Done: | 100% |
|
Category: | - | |||
Target version: | Base Distribution - 1.0 beta 2 | |||
Sprint: |
Description
The name property of the Workspace domain model is marked Flow\Identity forcing it to be unique.
column.
But the corresponding db table still contains a @persistence_object_identifier
Instead I'd suggest to add the @ORM\Id annotation turning the name to the workspace identifier.
This would require us to create a custom migration which is probably not so trivial as usual doctrine migrations.. But I think it would be worth it as this would bring some nice benefits:
- Better readability in the database (instead of "d4564fa1-6e7e-ac9b-2f38-95dff812566e" the workspace column of a nodedata record would contain "live" or "user-admin" etc)
- automatic property mapping: Even with https://review.typo3.org/#/c/25141/ we still use the "workspace name" in our javascript code. With this change "workspaceName" could be replaced with "workspace" there because a name would transparently be mapped to the corresponding instance in actions
Associated revisions
[!!!][TASK] Use workspace name as identifier
This patch changes the Workspace to use the name as technical
identifier and removes the ``persistence_object_identifier``.
Additionally it introduces a database index on
``workspace`` and ``path``.
This is only breaking if you have a relation to the Workspace
model in your own models. In this case you must add a database
migration to change your relation to use the name instead.
Resolves: #53354
Change-Id: I61c1e27fa5b82a505ca1e99db4677b4745cd73ea
Reviewed-on: https://review.typo3.org/25896
Reviewed-by: Karsten Dambekalns
Tested-by: Karsten Dambekalns
Reviewed-by: Christian Mueller
Tested-by: Christian Mueller
Reviewed-by: Bastian Waidelich
Tested-by: Bastian Waidelich
Reviewed-by: Aske Ertmann
Tested-by: Aske Ertmann
History
#1 Updated by Gerrit Code Review over 1 year ago
- Status changed from New to Under Review
Patch set 4 for branch master of project Packages/TYPO3.TYPO3CR has been pushed to the review server.
It is available at https://review.typo3.org/25896
#2 Updated by Gerrit Code Review over 1 year ago
Patch set 5 for branch master of project Packages/TYPO3.TYPO3CR has been pushed to the review server.
It is available at https://review.typo3.org/25896
#3 Updated by Gerrit Code Review over 1 year ago
Patch set 6 for branch master of project Packages/TYPO3.TYPO3CR has been pushed to the review server.
It is available at https://review.typo3.org/25896
#4 Updated by Gerrit Code Review over 1 year ago
Patch set 7 for branch master of project Packages/TYPO3.TYPO3CR has been pushed to the review server.
It is available at https://review.typo3.org/25896
#5 Updated by Gerrit Code Review over 1 year ago
Patch set 8 for branch master of project Packages/TYPO3.TYPO3CR has been pushed to the review server.
It is available at https://review.typo3.org/25896
#6 Updated by Christian Müller over 1 year ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 9ece6b53c52bab6a47370302df27127b8645095a.
#7 Updated by Bastian Waidelich over 1 year ago
- Assigned To set to Christian Müller
- Target version set to 1.0 beta 2