WIP checkpoint: Friends/follow/block models + Alembic migration
This commit is contained in:
@@ -13,7 +13,7 @@ class Follow(Base):
|
||||
UniqueConstraint(
|
||||
"follower_id",
|
||||
"followed_id",
|
||||
name="uq_follows_follower_followed",
|
||||
name="uq_follows_pair",
|
||||
),
|
||||
CheckConstraint(
|
||||
"follower_id <> followed_id",
|
||||
@@ -39,7 +39,7 @@ class Follow(Base):
|
||||
follower = relationship(
|
||||
"User",
|
||||
foreign_keys=[follower_id],
|
||||
back_populates="follows_given",
|
||||
back_populates="following",
|
||||
)
|
||||
followed = relationship(
|
||||
"User",
|
||||
|
||||
Reference in New Issue
Block a user