Skip to content

upgrade: docs for UTCDateTime migration #909

@palkerecsenyi

Description

@palkerecsenyi

Add docs to the v14 upgrade guide / release notes to document any actions that instances need to take for the change from DateTime to UTCDateTime across many Invenio modules.

We should include:

  • The performance / table size limitations of the Alembic migration. This shouldn't be a problem for most instances, but we should clarify that this may require taking the instance offline for a couple of minutes.

  • If/how this can be done without running an actual database migration. UTCDateTime technically supports the timestamp without timezone format as long as the database is set to the correct time zone (e.g. in postgresql.conf).

  • Config changes: in fix(db): use UTC for Postgres invenio-app-rdm#3335 and fix(config): use UTC for PostgreSQL invenio-db#196 we override the SQLAlchemy connection config so that PostgreSQL databases that otherwise would be using a non-UTC zone instead use UTC specifically for the Invenio(RDM) connection. In case the database has been configured with a non-UTC zone, this is required regardless of whether the Alembic migrations were run or not.

    Therefore, we should mention that if the instance has its own override of SQLALCHEMY_ENGINE_OPTIONS, they may need to modify it to include the time zone override. A higher-level override of this config var is a complete override, the keys of the dictionary are not merged.

    It's important this change is already made before the Alembic migrations are run. E.g. if the DB is configured in Europe/Helsinki then all the timestamp without timezone columns will be interpreted as UTC+2 (or UTC+3 in the summer) during the migration, and they will be shifted by 2 hours when being reinterpreted as UTC, which will cause all timestamps to be incorrect by 2 hours.

  • Any other relevant details

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    Ready

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions