2 # Asterisk -- An open source telephony toolkit.
4 # Copyright (C) 2014, Richard Mudgett
6 # Richard Mudgett <rmudgett@digium.com>
8 # See http://www.asterisk.org for more information about
9 # the Asterisk project. Please do not directly contact
10 # any of the maintainers of this project for assistance;
11 # the project provides a web site, mailing lists and IRC
12 # channels for your use.
14 # This program is free software, distributed under the terms of
15 # the GNU General Public License Version 2. See the LICENSE file
16 # at the top of the source tree.
19 """make q member uniqueid autoinc
21 Revision ID: 5139253c0423
23 Create Date: 2014-07-29 16:26:51.184981
27 # revision identifiers, used by Alembic.
28 revision = '5139253c0423'
29 down_revision = '1758e8bbf6b'
31 from alembic import op
32 import sqlalchemy as sa
36 # Was unable to find a way to use op.alter_column() to add the unique
38 op.drop_column('queue_members', 'uniqueid')
42 name='uniqueid', type_=sa.Integer, nullable=False,
44 # The postgres backend does not like the autoincrement needed for
45 # mysql here. It is just the backend that is giving a warning and
46 # not the database itself.
48 table_name='queue_members', column_name='uniqueid',
49 existing_type=sa.Integer, existing_nullable=False,
54 # Was unable to find a way to use op.alter_column() to remove the
55 # unique index property.
56 op.drop_column('queue_members', 'uniqueid')
59 sa.Column(name='uniqueid', type_=sa.String(80), nullable=False))