Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ckan db upgrade fixes #7681

Merged
merged 5 commits into from Jul 25, 2023
Merged

ckan db upgrade fixes #7681

merged 5 commits into from Jul 25, 2023

Commits on Jun 29, 2023

  1. Allow ckan db upgrade to run against an old database

    User.last_active was introduced in CKAN 2.10. When trying to run `ckan
    db ugprade` against a database that was created before that you get the
    following error:
    
        sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedColumn) column user.last_active does not exist
        LINE 1: ...ey AS user_reset_key, "user".about AS user_about,
         "user".las..
    
    This is caused by the `get_site_user` action call that we do on
    `update_config()`. The changes detect this error and continue the
    execution, similarly to how we check about a potential race condition.
    amercader committed Jun 29, 2023
    Configuration menu
    Copy the full SHA
    8d0d3b3 View commit details
    Browse the repository at this point in the history
  2. Ensure activity plugin is loaded before migrating old revisions

    Otherwise you get an `package_activity_list` action not found error
    amercader committed Jun 29, 2023
    Configuration menu
    Copy the full SHA
    888ac27 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    854fb6b View commit details
    Browse the repository at this point in the history
  4. Remove no longer supported key in revision migrate script

    The ordering changes doesn't seem to affect the actual migration from
    revisions to activities, it was just copied verbatim from the old VDM
    code
    amercader committed Jun 29, 2023
    Configuration menu
    Copy the full SHA
    5f48dc8 View commit details
    Browse the repository at this point in the history
  5. lint and changelog

    amercader committed Jun 29, 2023
    Configuration menu
    Copy the full SHA
    6ed5aa1 View commit details
    Browse the repository at this point in the history