fix/db models
This commit is contained in:
parent
997149b529
commit
89394d50c6
2 changed files with 4 additions and 4 deletions
|
@ -107,10 +107,10 @@ def upgrade() -> None:
|
|||
sa.Column('created_at', sa.DateTime(timezone=True), nullable=False),
|
||||
sa.Column('updated_at', sa.DateTime(timezone=True), nullable=False),
|
||||
sa.Column('actor_id', sa.Integer(), nullable=False),
|
||||
sa.Column('out_object_id', sa.Integer(), nullable=False),
|
||||
sa.Column('outbox_object_id', sa.Integer(), nullable=False),
|
||||
sa.Column('ap_actor_id', sa.String(), nullable=False),
|
||||
sa.ForeignKeyConstraint(['actor_id'], ['actor.id'], ),
|
||||
sa.ForeignKeyConstraint(['out_object_id'], ['outbox.id'], ),
|
||||
sa.ForeignKeyConstraint(['outbox_object_id'], ['outbox.id'], ),
|
||||
sa.PrimaryKeyConstraint('id'),
|
||||
sa.UniqueConstraint('actor_id'),
|
||||
sa.UniqueConstraint('ap_actor_id')
|
||||
|
|
|
@ -191,7 +191,7 @@ class Following(Base):
|
|||
actor_id = Column(Integer, ForeignKey("actor.id"), nullable=False, unique=True)
|
||||
actor: Mapped[Actor] = relationship(Actor, uselist=False)
|
||||
|
||||
out_object_id = Column(Integer, ForeignKey("outbox.id"), nullable=False)
|
||||
out_object = relationship(OutboxObject, uselist=False)
|
||||
outbox_object_id = Column(Integer, ForeignKey("outbox.id"), nullable=False)
|
||||
outbox_object = relationship(OutboxObject, uselist=False)
|
||||
|
||||
ap_actor_id = Column(String, nullable=False, unique=True)
|
||||
|
|
Loading…
Reference in a new issue