alembic: Remove batch operations (and sqlite support)
[asterisk/asterisk.git] / contrib / ast-db-manage / config / versions / 3bcc0b5bc2c9_add_allow_reload_to_ps_transports.py
1 """Add allow_reload to ps_transports
2
3 Revision ID: 3bcc0b5bc2c9
4 Revises: dbc44d5a908
5 Create Date: 2016-02-05 17:43:39.183785
6
7 """
8
9 # revision identifiers, used by Alembic.
10 revision = '3bcc0b5bc2c9'
11 down_revision = 'dbc44d5a908'
12
13 from alembic import op
14 import sqlalchemy as sa
15 from sqlalchemy.dialects.postgresql import ENUM
16
17 YESNO_NAME = 'yesno_values'
18 YESNO_VALUES = ['yes', 'no']
19
20 def upgrade():
21     yesno_values = ENUM(*YESNO_VALUES, name=YESNO_NAME, create_type=False)
22     op.add_column('ps_transports', sa.Column('allow_reload', yesno_values))
23
24 def downgrade():
25     op.drop_column('ps_transports', 'allow_reload')