[ckan-changes] [ckan/ckan] 7257e0: Remove statefulness from package extras

David Read noreply at github.com
Fri Mar 15 17:40:43 UTC 2019


  Branch: refs/heads/integrate-vdm-stateful
  Home:   https://github.com/ckan/ckan
  Commit: 7257e0a6ef726c53faac63ff6cf9d72adf6cfd45
      https://github.com/ckan/ckan/commit/7257e0a6ef726c53faac63ff6cf9d72adf6cfd45
  Author: David Read <david.read at hackneyworkshop.com>
  Date:   2019-03-15 (Fri, 15 Mar 2019)

  Changed paths:
    M ckan/lib/dictization/model_save.py
    A ckan/migration/versions/088_delete_extras_which_are_deleted_state.py
    M ckan/model/package_extra.py
    M ckan/model/resource.py
    M ckan/tests/legacy/models/test_extras.py

  Log Message:
  -----------
  Remove statefulness from package extras

* This is part of getting rid of vdm.
* We don't need to store state in PackageExtra any more because you can view the history via activity stream, since it now stores the full package_dict #3972. (The package_extra_revision table will be used to migrate old versions of the package to activity_streams migrate_package_activity.py. But from this version of CKAN, we do not need to record PackageExtra.stateit any more.)
* The mapping between PackageExtra and Package is now a simply dict i.e. attribute_mapped_collection - not a vdm StatefulDict any more.
* vdm's OurAssociationProxy is replaced by the vanilla sqlalchemy association_proxy - I'm not clear why we had to prevent scalars being assigned in the first place since it is a dict mapping, not a scalar mapping. Seems ok.
* package_extras_save() now deletes PackageExtra objects, instead of changing state to 'deleted'.
* package_no_state/extras_list is no longer needed because it was only used by package_extras_save()
* migration deletes extras of state='deleted', otherwise they'd suddenly appear




More information about the ckan-changes mailing list