diff --git a/alembic/versions/2023_03_19_1509-caf39c6e55fc_in_out_models.py b/alembic/versions/2023_03_19_1509-caf39c6e55fc_in_out_models.py index 3bb6786..9e4e91b 100644 --- a/alembic/versions/2023_03_19_1509-caf39c6e55fc_in_out_models.py +++ b/alembic/versions/2023_03_19_1509-caf39c6e55fc_in_out_models.py @@ -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') diff --git a/app/models.py b/app/models.py index 53748de..9b4a856 100644 --- a/app/models.py +++ b/app/models.py @@ -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)