Hi,
I’m facing an issue with Orthanc when using MySQL as the database backend.
In a MySQL cluster, there is a strict requirement that every table must have a primary key (sql_require_primary_key).
I’ve found a couple of issues in Orthanc and its MySQL plugin:
- The DeletedFiles table is created without a primary key.
- The temporary table DeletedResources (used when deleting studies or patients) is also created without a primary key.
The first issue prevents Orthanc from initializing the database correctly, but it can be bypassed by manually creating the table in one single SQL statement that includes a primary key.
The second issue prevents Orthanc from deleting studies or patients entirely.
There is a possible workaround in MySQL by enabling the sql_generate_invisible_primary_key setting, but this is not always possible — for example, when the database is managed by another team or provided as a managed/shared service.
I have a small patch that fixes both issues, and I would like to contribute it, but I’m not sure what the correct procedure is to open a pull request for the MySQL plugin.
Could you point me in the right direction?
Thank you.
Marco