Asterisk - The Open Source Telephony Project GIT-master-f36a736
Functions | Variables
5139253c0423_make_q_member_uniqueid_autoinc Namespace Reference

Functions

def downgrade ()
 
def upgrade ()
 

Variables

string down_revision = '1758e8bbf6b'
 
string revision = '5139253c0423'
 

Function Documentation

◆ downgrade()

def downgrade ( )

Definition at line 49 of file 5139253c0423_make_q_member_uniqueid_autoinc.py.

49def downgrade():
50 # Was unable to find a way to use op.alter_column() to remove the
51 # unique index property.
52 if op.get_context().bind.dialect.name == 'mssql':
53 op.drop_constraint('uq_queue_members_uniqueid', 'queue_members')
54 op.drop_column('queue_members', 'uniqueid')
55 op.add_column('queue_members', sa.Column(name='uniqueid', type_=sa.String(80), nullable=False))

◆ upgrade()

def upgrade ( )

Definition at line 35 of file 5139253c0423_make_q_member_uniqueid_autoinc.py.

35def upgrade():
36 # Was unable to find a way to use op.alter_column() to add the unique
37 # index property.
38 op.drop_column('queue_members', 'uniqueid')
39 op.add_column('queue_members', sa.Column(name='uniqueid', type_=sa.Integer,
40 nullable=False, unique=True))
41 # The postgres and mssql backends do not like the autoincrement needed for
42 # mysql here. It is just the backend that is giving a warning and
43 # not the database itself.
44 op.alter_column(table_name='queue_members', column_name='uniqueid',
45 existing_type=sa.Integer, existing_nullable=False,
46 autoincrement=True)
47
48

Variable Documentation

◆ down_revision

string down_revision = '1758e8bbf6b'

◆ revision

string revision = '5139253c0423'