~singpolyma/asterisk

ref: upstream/16.2.1_dfsg asterisk/contrib/ast-db-manage/config/versions/c6d929b23a8_create_pjsip_subscription_persistence_.py -rw-r--r-- 974 bytes
fe6d69c0Stephen Paul Weber import-tar 1 year, 2 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
"""create pjsip subscription persistence table

Revision ID: c6d929b23a8
Revises: e96a0b8071c
Create Date: 2014-06-06 02:17:38.660447

"""

# revision identifiers, used by Alembic.
revision = 'c6d929b23a8'
down_revision = 'e96a0b8071c'

from alembic import op
import sqlalchemy as sa


def upgrade():
    op.create_table(
        'ps_subscription_persistence',
        sa.Column('id', sa.String(40), nullable=False, unique=True),
	sa.Column('packet', sa.String(2048)),
	sa.Column('src_name', sa.String(128)),
	sa.Column('src_port', sa.Integer),
	sa.Column('transport_key', sa.String(64)),
	sa.Column('local_name', sa.String(128)),
	sa.Column('local_port', sa.Integer),
	sa.Column('cseq', sa.Integer),
	sa.Column('tag', sa.String(128)),
	sa.Column('endpoint', sa.String(40)),
	sa.Column('expires', sa.Integer),
    )

    op.create_index('ps_subscription_persistence_id', 'ps_subscription_persistence', ['id'])

def downgrade():
	op.drop_table('ps_subscription_persistence')