Spaces:
Running
Running
axeronis commited on
Commit ·
6db5d1b
1
Parent(s): e4d1303
fix(db): add voice_first_required migration to fix webhook crash
Browse files
backend/alembic/versions/2025_01_14_voice_first.py
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""add voice_first_required to tenants
|
| 2 |
+
|
| 3 |
+
Revision ID: 2025_01_14_vfirst
|
| 4 |
+
Revises: 174972d4acec
|
| 5 |
+
Create Date: 2025-01-14
|
| 6 |
+
|
| 7 |
+
"""
|
| 8 |
+
from typing import Sequence, Union
|
| 9 |
+
|
| 10 |
+
from alembic import op
|
| 11 |
+
import sqlalchemy as sa
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
# revision identifiers, used by Alembic.
|
| 15 |
+
revision: str = '2025_01_14_vfirst'
|
| 16 |
+
down_revision: Union[str, None] = '174972d4acec'
|
| 17 |
+
branch_labels: Union[str, Sequence[str], None] = None
|
| 18 |
+
depends_on: Union[str, Sequence[str], None] = None
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
def upgrade() -> None:
|
| 22 |
+
# Add voice_first_required column with default False
|
| 23 |
+
op.add_column('tenants', sa.Column('voice_first_required', sa.Boolean(), server_default=sa.text('false'), nullable=True))
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
def downgrade() -> None:
|
| 27 |
+
op.drop_column('tenants', 'voice_first_required')
|