From 03fe23866bd7b2a4741f820441652f059dc260ba Mon Sep 17 00:00:00 2001 From: Tanguy NICOLAS Date: Sun, 19 May 2024 17:43:29 +0200 Subject: [PATCH] fix: user stop's relationship --- ...dc0e2586f0_fix_user_stop_s_relationship.py | 30 +++++++++++++++++++ src/models.py | 1 + 2 files changed, 31 insertions(+) create mode 100644 alembic/versions/00dc0e2586f0_fix_user_stop_s_relationship.py diff --git a/alembic/versions/00dc0e2586f0_fix_user_stop_s_relationship.py b/alembic/versions/00dc0e2586f0_fix_user_stop_s_relationship.py new file mode 100644 index 0000000..9fdb2ad --- /dev/null +++ b/alembic/versions/00dc0e2586f0_fix_user_stop_s_relationship.py @@ -0,0 +1,30 @@ +"""Fix user stop's relationship + +Revision ID: 00dc0e2586f0 +Revises: c292109472f2 +Create Date: 2024-05-19 17:42:31.962504 + +""" +from typing import Sequence, Union + +from alembic import op +import sqlalchemy as sa + + +# revision identifiers, used by Alembic. +revision: str = '00dc0e2586f0' +down_revision: Union[str, None] = 'c292109472f2' +branch_labels: Union[str, Sequence[str], None] = None +depends_on: Union[str, Sequence[str], None] = None + + +def upgrade() -> None: + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### + + +def downgrade() -> None: + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### diff --git a/src/models.py b/src/models.py index f7c109f..27cbe02 100644 --- a/src/models.py +++ b/src/models.py @@ -69,3 +69,4 @@ class User(Base): city: Mapped[City] = relationship(back_populates="users") zone: Mapped[Zone] = relationship(back_populates="users") + stop: Mapped[Stop] = relationship(back_populates="users")