fix migration artifacts

This commit is contained in:
Yusur 2025-07-07 13:46:26 +02:00
parent 0311586a1b
commit 299c29869c

View file

@ -21,7 +21,7 @@ depends_on: Union[str, Sequence[str], None] = None
def upgrade() -> None:
"""Upgrade schema."""
# ### commands auto generated by Alembic - please adjust! ###
op.drop_constraint('comment_parent_post_id_fkey', 'freak_comment', type_='foreignkey')
op.drop_constraint('comment_parent_post_id', 'freak_comment', type_='foreignkey')
op.create_foreign_key('comment_parent_post_id', 'freak_comment', 'freak_post', ['parent_post_id'], ['id'], ondelete='cascade')
# ### end Alembic commands ###
@ -30,5 +30,5 @@ def downgrade() -> None:
"""Downgrade schema."""
# ### commands auto generated by Alembic - please adjust! ###
op.drop_constraint('comment_parent_post_id', 'freak_comment', type_='foreignkey')
op.create_foreign_key('comment_parent_post_id_fkey', 'freak_comment', 'freak_post', ['parent_post_id'], ['id'])
op.create_foreign_key('comment_parent_post_id', 'freak_comment', 'freak_post', ['parent_post_id'], ['id'])
# ### end Alembic commands ###