Blame alembic/versions/38581a8fbae2_add_custom_field_data.py
|
Mark Reynolds |
e18f6c |
"""Add custom field data
|
|
Mark Reynolds |
e18f6c |
|
|
Mark Reynolds |
e18f6c |
Revision ID: 38581a8fbae2
|
|
Pierre-Yves Chibon |
aafbc2 |
Revises: 6addaed6008e
|
|
Mark Reynolds |
e18f6c |
Create Date: 2017-01-16 13:03:36.683188
|
|
Mark Reynolds |
e18f6c |
|
|
Mark Reynolds |
e18f6c |
"""
|
|
Mark Reynolds |
e18f6c |
|
|
Mark Reynolds |
e18f6c |
# revision identifiers, used by Alembic.
|
|
Mark Reynolds |
e18f6c |
revision = '38581a8fbae2'
|
|
Pierre-Yves Chibon |
aafbc2 |
down_revision = '6addaed6008e'
|
|
Mark Reynolds |
e18f6c |
|
|
Mark Reynolds |
e18f6c |
from alembic import op
|
|
Mark Reynolds |
e18f6c |
import sqlalchemy as sa
|
|
Mark Reynolds |
e18f6c |
|
|
Mark Reynolds |
e18f6c |
|
|
Mark Reynolds |
e18f6c |
def upgrade():
|
|
Mark Reynolds |
cb289d |
''' Add a new drop-down list type to the custom fields. The list options
|
|
Mark Reynolds |
cb289d |
need to be stored in the issue_keys table. '''
|
|
Mark Reynolds |
e18f6c |
op.add_column('issue_keys', sa.Column('key_data', sa.Text()))
|
|
Mark Reynolds |
e18f6c |
|
|
Mark Reynolds |
e18f6c |
|
|
Mark Reynolds |
e18f6c |
def downgrade():
|
|
Mark Reynolds |
4f181e |
''' Remove the key_data column '''
|
|
Mark Reynolds |
e18f6c |
op.drop_column('issue_keys', 'key_data')
|