How to delete a Metadata version (in DB) - BEXIS2/Core GitHub Wiki
Delete Metadata version
- Important: Only delete versions, if they are not yet used (e.g. DOI) or linked (e.g. externally distributed link)!!!
- Important: Do not change or delete directly in the database without a current backup!
- Important: Keep in mind deleting a version changes the current version number.
- Important: Dueto some cached values in NHibernate session it can be necessary to restart the Server (Application pool)
Latest version
- check, if the version is linked.
- Yes: Change existing links to the previous version.
- No: no action required
Table datasetversions
- Filter by dataset ID:
SELECT * FROM public.datasetversions WHERE datasetref = '2349' ORDER BY id - Delete newest version
- Set status of the new newest version to 2
- Check result in dataset view
Older Version
- check, if the version is linked.
- Yes: Change existing links to another version
- No: no action required
- check, if the version number is automatically set in the metadata
- Yes: Kep in mind the change the number in all newer versions
- No: no action required
Table datasetversions
- Filter by dataset ID:
SELECT * FROM public.datasetversions WHERE datasetref = '2349' ORDER BY id - Delete version
- Error can not be deleted: check where it is linked and if it can be deleted (.e.g linked in contentdescriptors)
- Check result in dataset view