Asterisk - The Open Source Telephony Project GIT-master-abe0018
8fce8496f03e_add_tcp_keepalive_settings_to_ps_.py
Go to the documentation of this file.
1"""Add TCP keepalive settings to ps_transports
2
3Revision ID: 8fce8496f03e
4Revises: 74dc751dfe8e
5Create Date: 2024-03-18 17:00:17.148018
6
7"""
8
9# revision identifiers, used by Alembic.
10revision = '8fce8496f03e'
11down_revision = '74dc751dfe8e'
12
13from alembic import op
14import sqlalchemy as sa
15
16def upgrade():
17 with op.batch_alter_table('ps_transports') as batch_op:
18 batch_op.add_column(sa.Column('tcp_keepalive_enable', sa.Boolean(), nullable=True))
19 batch_op.add_column(sa.Column('tcp_keepalive_idle_time', sa.Integer(), nullable=True))
20 batch_op.add_column(sa.Column('tcp_keepalive_interval_time', sa.Integer(), nullable=True))
21 batch_op.add_column(sa.Column('tcp_keepalive_probe_count', sa.Integer(), nullable=True))
22
24 with op.batch_alter_table('ps_transports') as batch_op:
25 batch_op.drop_column('tcp_keepalive_enable')
26 batch_op.drop_column('tcp_keepalive_idle_time')
27 batch_op.drop_column('tcp_keepalive_interval_time')
28 batch_op.drop_column('tcp_keepalive_probe_count')