Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

published_record should identify the catalog(s) to which a record was published #5

Open
marksparkza opened this issue May 16, 2023 · 0 comments

Comments

@marksparkza
Copy link
Member

The published_record table preserves ids and DOIs of all records that have ever been published, to prevent such records from being deleted or having their DOIs changed or removed.

A secondary use of this table is to enable retracted record stubs (containing only record id and published: false) to be included in the output of the catalog record list API endpoint. This works correctly for catalogs where the retracted record stubs would be expected. However, such stubs also end up being included in record listings for catalogs to which they have never been published. For example, a non-MIMS record that is retracted would appear as such a stub for both the SAEON and the MIMS catalogs.

Although this is not a major issue (an extraneous stub can and should simply be ignored by a MIMS catalog client, for example), the solution will in fact provide an additional benefit in terms of data integrity. In the same way that the foreign key constraints on published_record prevent deletion of ever-published records, a foreign key constraint on a published_record_catalog child table can prevent deletion of any catalog instance which has ever contained any published records.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant