[ckan-dev] versioning of packages

von Waldow, Harald Harald.vonWaldow at eawag.ch
Mon Sep 16 22:14:49 UTC 2019

Hi Everybody

I have written some code for creating new versions of datasets. It
works by initially creating a copy of an existing package from which
a user can start and modify it to arrive at the new version. The
'resources' part of pkg is copied as well. Before creating the new
(copy) package, the "id" and "revision_id" of the resources are
removed (so they get new ones), the "url" is kept, and "url_type" ist
set to "None".

This should have (and seems to have) the effect that unchanged
resources are unchanged in the new pkg and don't require more space
on disk. If a user updates or deletes a resource in the new pkg it
doesn't have an effect on the original pkg. The original pkg is made
immutable, so that changes of resources in the old pkg can't happen.

I would like get your opinion whether that is a sane strategy or
whether you see possibilities for breakage ahead.

Thanks for your input,

Harald von Waldow
ICT Services
Research Data Management
Ueberlandstrasse 133
8600 Duebendorf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20190916/3d4108de/attachment.sig>

More information about the ckan-dev mailing list