2 # Asterisk -- An open source telephony toolkit.
4 # Copyright (C) 2015, 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.
21 Revision ID: 23530d604b96
23 Create Date: 2015-03-18 17:41:58.055412
27 # revision identifiers, used by Alembic.
28 revision = '23530d604b96'
29 down_revision = '45e3f47c6c44'
31 from alembic import op
32 import sqlalchemy as sa
33 from sqlalchemy.dialects.postgresql import ENUM
35 YESNO_NAME = 'yesno_values'
36 YESNO_VALUES = ['yes', 'no']
39 ############################# Enums ##############################
41 # yesno_values have already been created, so use postgres enum object
42 # type to get around "already created" issue - works okay with mysql
43 yesno_values = ENUM(*YESNO_VALUES, name=YESNO_NAME, create_type=False)
45 op.add_column('ps_endpoints', sa.Column('rpid_immediate', yesno_values))
48 op.drop_column('ps_endpoints', 'rpid_immediate')