Files
gogo-telefon/alembic/versions/9dce40d5c9ce_call_registrations.py

42 lines
1.4 KiB
Python
Raw Normal View History

"""call registrations
Revision ID: 9dce40d5c9ce
Revises: 62fcb10345fa
Create Date: 2026-07-11 10:58:21.464071
"""
from typing import Sequence, Union
from alembic import op
import sqlalchemy as sa
revision: str = '9dce40d5c9ce'
down_revision: Union[str, None] = '62fcb10345fa'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None
def upgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('call_registrations',
sa.Column('id', sa.Uuid(), nullable=False),
sa.Column('tenant_id', sa.Uuid(), nullable=False),
sa.Column('caller_msisdn', sa.String(length=30), nullable=False),
sa.Column('created_at', sa.DateTime(timezone=True), nullable=False),
sa.Column('answered_by_human', sa.Boolean(), nullable=False),
sa.Column('handled_by_agent', sa.Boolean(), nullable=False),
sa.Column('finalized', sa.Boolean(), nullable=False),
sa.ForeignKeyConstraint(['tenant_id'], ['tenants.id'], ),
sa.PrimaryKeyConstraint('id')
)
op.create_index(op.f('ix_call_registrations_tenant_id'), 'call_registrations', ['tenant_id'], unique=False)
# ### end Alembic commands ###
def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.drop_index(op.f('ix_call_registrations_tenant_id'), table_name='call_registrations')
op.drop_table('call_registrations')
# ### end Alembic commands ###