[ckan-changes] [ckan/ckan] 7aa0f0: Remove requirement to do migrate_package_activity ...

David Read noreply at github.com
Fri Mar 29 21:01:28 UTC 2019

  Branch: refs/heads/remove-vdm
  Home:   https://github.com/ckan/ckan
  Commit: 7aa0f04a2de99f1e460669a5c2da64fdb5bf00b6
  Author: David Read <david.read at hackneyworkshop.com>
  Date:   2019-03-22 (Fri, 22 Mar 2019)

  Changed paths:
    R ckan/migration/versions/089_package_activity_migration_check.py
    M ckan/model/__init__.py

  Log Message:
  Remove requirement to do migrate_package_activity before upgrade

  Commit: 02d323f358d9b7191d2b7ac2e5ff4abef0d49cec
  Author: David Read <david.read at hackneyworkshop.com>
  Date:   2019-03-22 (Fri, 22 Mar 2019)

  Changed paths:
    M ckan/migration/versions/012_add_resources.py
    M ckan/migration/versions/022_add_group_extras.py
    M ckan/migration/versions/025_add_authorization_groups.py
    M ckan/migration/versions/026_authorization_group_user_pk.py
    M ckan/model/group.py
    M ckan/model/group_extra.py
    M ckan/model/package_extra.py
    M ckan/model/package_relationship.py
    M ckan/model/resource.py
    M ckan/model/system_info.py
    M ckan/model/tag.py

  Log Message:
  Remove unnecessary vdm imports

  Commit: 88d0e9f749b8ad0acab59592134c584f4916b931
  Author: David Read <david.read at hackneyworkshop.com>
  Date:   2019-03-29 (Fri, 29 Mar 2019)

  Changed paths:
    M ckan/lib/dictization/__init__.py
    M ckan/migration/migrate_package_activity.py
    M ckan/migration/revision_legacy_code.py
    M ckan/model/domain_object.py
    M ckan/model/package.py
    M ckan/tests/migration/test_migrate_package_activity.py

  Log Message:
  Get migration_package_activity and tests working, by putting revision model in revision_legacy_code.py

* Having removed the revision model (Revision, PackageRevision etc) from the core ckan code, now we add it back into ckan/migration/revision_legacy_code.py (RevisionTableMappings) so it can be used by the migration_package_activity.py and its tests. Also includes associated vdm functions:
    * make_revisioned_table
    * make_revision_table
    * make_Revision
* Fix up some tests in test_migration_package_activity associated with revision_id now being missing from domain objects.
    * migration tests have to make revisions manually now (make_revision()), because previously the revisioned tables (e.g. Package) had a mapper extension vdm.sqlalchemy.Revisioner(package_revision_table) that triggered on table changes and records a copy in the corresponding revision table (e.g. PackageRevision). HOWEVER we can't add this to the mapping for the migration test and then remove it for the rest of the CKAN tests.
* Fix up some tests following test_migration_package_activity - PackageDictizeMonkeyPatch is introduced to monkeypatch package_dictize. Previously it was being patched in test_migration_package_activity but not being put back for the following tests.
* vdm is now only required by migration_package_activity.py and its tests.

Compare: https://github.com/ckan/ckan/compare/797a18f6ac6f...88d0e9f749b8

More information about the ckan-changes mailing list