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

Remove patron.last_loan_activity_sync #1897

Merged
merged 1 commit into from
Jun 18, 2024
Merged
Show file tree
Hide file tree
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,32 @@
"""Remove Patron.last_loan_activity_sync

Revision ID: 7ba553f3f80d
Revises: 50746a3bd243
Create Date: 2024-06-12 00:53:37.497861+00:00

"""
import sqlalchemy as sa
from alembic import op
from sqlalchemy.dialects import postgresql

# revision identifiers, used by Alembic.
revision = "7ba553f3f80d"
down_revision = "50746a3bd243"
branch_labels = None
depends_on = None


def upgrade() -> None:
op.drop_column("patrons", "last_loan_activity_sync")


def downgrade() -> None:
op.add_column(
"patrons",
sa.Column(
"last_loan_activity_sync",
postgresql.TIMESTAMP(timezone=True),
autoincrement=False,
nullable=True,
),
)
6 changes: 0 additions & 6 deletions src/palace/manager/sqlalchemy/model/patron.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,6 @@ class Patron(Base, RedisKeyMixin):
# system such as an ILS.
last_external_sync = Column(DateTime(timezone=True))

# TODO: This field is no longer used. Its left here for backwards compatibility until
# the release with this change is deployed. It should be removed after that.
_REMOVED_last_loan_activity_sync = Column(
"last_loan_activity_sync", DateTime(timezone=True), default=None
)

# The time, if any, at which the user's authorization to borrow
# books expires.
authorization_expires = Column(Date, index=True)
Expand Down