As the developers of Open Journal Systems, Open Conference Systems, Open Harvester Systems, and Open Monograph Press, the PKP team are experts in helping journal managers and conference organizers make the most of their online publishing projects. PKP Publishing Services offers support for:

As a customer of PKP Publishing Services, you will not only receive direct, personalized support from the PKP Development Team, but will be contributing to the ongoing development of the PKP applications. All funds raised by PKP Publishing Services go directly toward enhancing our free, open source software. For more information, please contact us.

I just noticed that through the course of the submission/review/copyedit process, OJS sometimes creates multiple article_files database records with the same file_id. Since file_id is the primary key for the table, this means there is no enforced unique identifier for these records. For example, we have 5 records with file_id = 49 in our ojs database:

I searched the forum to see if this issue has been raised before, but I can't find any info on it (it only seems to have come up when people try to migrate their database and postgresql/mysql throws an error since the primary key rule is violated by the data). Have other people run into this problem? It seems like this could be a big issue, for example when the code tries to find a record based on its file_id. How does OJS know which record to use? We've noticed some problems with uploading files before, and are wondering if this could be part of the problem?

I also see that in the articles table, the revised_file_id, review_file_id and editor_file_id fields are links to the article_files table on file_id. But this link is broken/made ambiguous since there can be more than 1 article_files records with a given file_id.

Each row in the article_files table is identified by a (file_id, revision) tuple. In the case of other tables referring to files in the article_files table, the code will always get the latest revision of that file.