[6.5.3] Users are unable to upload an existing file
Hello
we recently migrate our users from linshare 5.1.2 to new linshare server 6.5.3. Since this, users are unable to upload a file that might have been already upload. I was able to reproduce this issue :
[2026-09-22 12:15:38] [info] 12:15:38.991 [taskExecutor-10] ERROR org.hibernate.engine.jdbc.spi.SqlExceptionHelper - ERROR: duplicate key value violates unique constraint "uk_8arje7420oimfbc6jutaxdq49"
[2026-09-22 12:15:38] [info] Detail: Key (document_id)=(35814) already exists.
[2026-09-22 12:15:38] [info] 12:15:38.992 [taskExecutor-10] ERROR org.linagora.linshare.webservice.userv1.task.DocumentUploadAsyncTask - could not execute statement; SQL [n/a]; constraint [uk_8arje7420oimfbc6jutaxdq49]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement
I understand it could be to lower storage usage but it's causing a lot of misunderstanding. Actually, when a user got this error it is not mentioning that it is a duplicate file and whom uploaded it (which is good for privacy).
Nonetheless, is there a way to disable this unique constraint ?
Regards
Can be closed, we figured out that the unique constraint on document_entry was not created correctly on the new server (i dont know why...) we fixed it by recreating it (as intended in createSchema.sql) :
CONSTRAINT "unique document entry" UNIQUE (entry_id, document_id));