This is not a big deal and can be imposed at the database design level. I’ve tested it and it works with some pitfalls because RM does not trap the SQLite error message when a duplicate link is attempted:
RM does not crash and Add New Media in the main Media view now behaves the same as Drag’n’Drop did before the modification when the file was already linked - nothing amiss is reported but no new link is created. From the Edit Person window, Add New Media reports no error but the preview is empty as the link to the file was not added but a Tag has been created and the fact list shows the presence of media. The tag has to be deleted to clear the false indicator.
So developers could readily add the constraint to the MultimediaTable and should also trap the error message already coming from Drag’n’Drop new media along with the new error message resulting from the constraint so the user is informed and false tags are not created.
The change I made to the MultimediaTable was to add the UNIQUE constraint: