1 """correct nullability of pjsip id columns
3 Revision ID: 6c475a93f48a
5 Create Date: 2024-04-06 09:48:33.116410
10 revision =
'6c475a93f48a'
11 down_revision =
'd5122576cca8'
13 from alembic
import op
14 import sqlalchemy
as sa
16 PJSIP_TABLES = [
'ps_aors',
21 'ps_inbound_publications',
22 'ps_outbound_publishes',
26 for table_name
in PJSIP_TABLES:
27 with op.batch_alter_table(table_name)
as batch_op:
28 batch_op.alter_column(
'id', nullable=
False,
29 existing_type=sa.String(255), existing_server_default=
None,
30 existing_nullable=
True)
34 for table_name
in reversed(PJSIP_TABLES):
35 with op.batch_alter_table(table_name)
as batch_op:
36 batch_op.alter_column(
'id', nullable=
True,
37 existing_type=sa.String(255), existing_server_default=
None,
38 existing_nullable=
True)