Skip to content

Commit

Permalink
fix db upgrade in case of presence of contents
Browse files Browse the repository at this point in the history
  • Loading branch information
alex75 committed Oct 14, 2024
1 parent 69c4812 commit 1106f93
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions alembic/versions/694fde86c48c_id_manage_of_contents.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@


def upgrade() -> None:
sql = "DELETE * FROM contents"
conn = op.get_bind()
conn.execute(sa.text(sql))
op.create_index("ix_contents_type", "contents", ["type"])
op.drop_column("contents", "content_uid")
op.add_column("contents", sa.Column("slug", sa.String, index=True, nullable=False))
Expand Down

0 comments on commit 1106f93

Please sign in to comment.