-
-
Notifications
You must be signed in to change notification settings - Fork 223
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BUGFIX: Fix Workspace Metadata upsert
adjusts `WorkspaceMetadataAndRoleRepository::updateWorkspaceMetadata()` so that it does not fail with > Failed to update metadata for workspace "workspace-name" (Content Repository "default"): An exception occurred while executing a query: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'default-workspace-name' for key 'PRIMARY' Background: Doctrine DBAL has no support for "upserts" built-in and the [suggested work around](doctrine/dbal#1320 (comment)) had a flaw that lead to the above exception when the incoming data wasn't actually changed (because `$affectedRows` is 0 in this case). This is fixed simply by issuing a `SELECT` first
- Loading branch information
1 parent
2d735b2
commit 72cefb1
Showing
2 changed files
with
36 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters