Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#
# This file is part of Invenio.
# Copyright (C) 2025 CERN.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: 2026

# Copyright (C) 2026 Graz University of Technology.
#
# Invenio is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.

"""Alter datetime columns to utc aware datetime columns."""

from invenio_db.utils import (
update_table_columns_column_type_to_datetime,
update_table_columns_column_type_to_utc_datetime,
)

# revision identifiers, used by Alembic.
revision = "3ca07f2ee12b"
down_revision = "74b23178bfbe"
branch_labels = ()
depends_on = None


def upgrade():
"""Upgrade database."""
for table_name in ["request_files"]:
update_table_columns_column_type_to_utc_datetime(table_name, "created")
update_table_columns_column_type_to_utc_datetime(table_name, "updated")


def downgrade():
"""Downgrade database."""
for table_name in ["request_files"]:
update_table_columns_column_type_to_datetime(table_name, "created")
update_table_columns_column_type_to_datetime(table_name, "updated")
Loading