fix(alembic-migration)
All checks were successful
Deploy to Development / build-and-deploy (push) Successful in 6s
Deploy to Production / build-and-deploy (push) Successful in 4s

This commit is contained in:
EvanChal
2026-01-28 20:53:53 +01:00
parent d68af8d5a1
commit 0eea2f1a1d

View File

@@ -7,6 +7,7 @@ Create Date: 2025-01-27
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy import inspect
# revision identifiers, used by Alembic.
@@ -17,6 +18,12 @@ depends_on = None
def upgrade():
# Check if table already exists (idempotent migration)
conn = op.get_bind()
inspector = inspect(conn)
tables = inspector.get_table_names()
if 'push_subscriptions' not in tables:
op.create_table(
'push_subscriptions',
sa.Column('id', sa.Integer(), nullable=False),