23530d604b96_add_rpid_immediate.py

Go to the documentation of this file.
00001 #
00002 # Asterisk -- An open source telephony toolkit.
00003 #
00004 # Copyright (C) 2015, Richard Mudgett
00005 #
00006 # Richard Mudgett <rmudgett@digium.com>
00007 #
00008 # See http://www.asterisk.org for more information about
00009 # the Asterisk project. Please do not directly contact
00010 # any of the maintainers of this project for assistance;
00011 # the project provides a web site, mailing lists and IRC
00012 # channels for your use.
00013 #
00014 # This program is free software, distributed under the terms of
00015 # the GNU General Public License Version 2. See the LICENSE file
00016 # at the top of the source tree.
00017 #
00018 
00019 """add rpid_immediate
00020 
00021 Revision ID: 23530d604b96
00022 Revises: 45e3f47c6c44
00023 Create Date: 2015-03-18 17:41:58.055412
00024 
00025 """
00026 
00027 # revision identifiers, used by Alembic.
00028 revision = '23530d604b96'
00029 down_revision = '45e3f47c6c44'
00030 
00031 from alembic import op
00032 import sqlalchemy as sa
00033 from sqlalchemy.dialects.postgresql import ENUM
00034 
00035 YESNO_NAME = 'yesno_values'
00036 YESNO_VALUES = ['yes', 'no']
00037 
00038 def upgrade():
00039     ############################# Enums ##############################
00040 
00041     # yesno_values have already been created, so use postgres enum object
00042     # type to get around "already created" issue - works okay with mysql
00043     yesno_values = ENUM(*YESNO_VALUES, name=YESNO_NAME, create_type=False)
00044 
00045     op.add_column('ps_endpoints', sa.Column('rpid_immediate', yesno_values))
00046 
00047 def downgrade():
00048     op.drop_column('ps_endpoints', 'rpid_immediate')

Generated on Thu Apr 16 06:27:05 2015 for Asterisk - The Open Source Telephony Project by  doxygen 1.5.6