fix: make migration 0020 idempotent (check column exists)

This commit is contained in:
Agent Zero
2026-07-17 00:59:41 +02:00
parent 4a461f4a72
commit 0774fc4407
@@ -15,6 +15,14 @@ depends_on = None
def upgrade() -> None:
conn = op.get_bind()
result = conn.execute(
sa.text(
"SELECT column_name FROM information_schema.columns "
"WHERE table_name = 'notifications' AND column_name = 'updated_at'"
)
)
if result.fetchone() is None:
op.add_column(
"notifications",
sa.Column(