Skip to content

Integrity constraint violation for PRIMARY with migration Version3000Date20240417075404 #2570

@nickvergessen

Description

@nickvergessen

The Version3000Date20240417075404 migrations is a bit problematic.

  1. you used a wrong migration version pattern in the past, so just that you are aware, on a new install Version3000Date20240417075404 will run before your other migration files because we sort by the version and then the date and 3_000 < 20_000, ...
  2. it can SQL error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'kate-photos-photosSourceFolders' for key 'PRIMARY'

We had 2 people that had the old and new config in parallel:

+----------------------------+--------+---------------------+--------------------------------------------------------------+
| userid                     | appid  | configkey           | configvalue                                                  |
+----------------------------+--------+---------------------+--------------------------------------------------------------+
| kate                       | photos | photosSourceFolder  | /Talk                                                        |
| **REDACTED**               | photos | photosSourceFolder  | /**REDACTED**                                                |
| kate                       | photos | photosSourceFolders | ["/Photos","/Talk"]                                          |
| **REDACTED**               | photos | photosSourceFolders | ["/**REDACTED**"]                                            |
+----------------------------+--------+---------------------+--------------------------------------------------------------+

causing a primary key violation. I fear you have to check if a user has 2 of the configs and then drop the old one, before running the update query

Metadata

Metadata

Assignees

Labels

1. to developAccepted and waiting to be taken care ofbugSomething isn't workinghighHigh priority

Type

No type

Projects

Status

☑️ Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions