-
Notifications
You must be signed in to change notification settings - Fork 13
How to delete a Metadata version (in DB)
Franziska Zander edited this page Mar 21, 2021
·
2 revisions
- 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)
- 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
- 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