nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
27.21k stars 4.04k forks source link

UniqueConstraintViolationException overview ticket #12369

Open MorrisJobke opened 5 years ago

MorrisJobke commented 5 years ago
nextcloud-bot commented 5 years ago

GitMate.io thinks possibly related issues are https://github.com/nextcloud/server/issues/6773 (Migration overview issues), https://github.com/nextcloud/server/pull/10230 (Feature/shares overview), https://github.com/nextcloud/server/issues/2672 (Nextcloud 12 overview), https://github.com/nextcloud/server/issues/745 (Nextcloud 11 overview), and https://github.com/nextcloud/server/issues/135 (Trashbin throws UniqueConstraintViolationException when restoring files).

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity and it seems to be missing some essential informations. It will be closed if no further activity occurs. Thank you for your contributions.

J0WI commented 3 years ago

The insertIgnoreConflict function introduced in #13721 might be an even better fix. See also:

J0WI commented 2 years ago

The insertIgnoreConflictpattern does not work for all, some, including #19494, need a insertOrUpdate. The main blocker there is that Doctrine DBAL does not support the ON CONFLICT ... DO UPDATE SET syntax. Is there any other way to avoid writing fields and values in plain SQL?