Blame alembic/versions/36386a60b3fd_add_milestone_to_issues.py

Pierre-Yves Chibon f52c45
"""Add milestone to issues
Pierre-Yves Chibon f52c45
Pierre-Yves Chibon f52c45
Revision ID: 36386a60b3fd
Pierre-Yves Chibon f52c45
Revises: 350efb3f6baf
Pierre-Yves Chibon f52c45
Create Date: 2016-09-14 11:03:45.673932
Pierre-Yves Chibon f52c45
Pierre-Yves Chibon f52c45
"""
Pierre-Yves Chibon f52c45
Pierre-Yves Chibon f52c45
# revision identifiers, used by Alembic.
Pierre-Yves Chibon f52c45
revision = '36386a60b3fd'
Pierre-Yves Chibon f52c45
down_revision = '350efb3f6baf'
Pierre-Yves Chibon f52c45
Pierre-Yves Chibon f52c45
from alembic import op
Pierre-Yves Chibon f52c45
import sqlalchemy as sa
Pierre-Yves Chibon f52c45
Pierre-Yves Chibon f52c45
Pierre-Yves Chibon f52c45
def upgrade():
Pierre-Yves Chibon f52c45
    ''' Add the column milestone to the table issues.
Pierre-Yves Chibon f52c45
    '''
Pierre-Yves Chibon f52c45
    op.add_column(
Pierre-Yves Chibon f52c45
        'issues',
Pierre-Yves Chibon f52c45
        sa.Column('milestone', sa.String(255), nullable=True)
Pierre-Yves Chibon f52c45
    )
Pierre-Yves Chibon f52c45
Pierre-Yves Chibon f52c45
Pierre-Yves Chibon f52c45
def downgrade():
Pierre-Yves Chibon f52c45
    ''' Add the column milestone to the table issues.
Pierre-Yves Chibon f52c45
    '''
Pierre-Yves Chibon 40e843
    op.drop_column('issues', 'milestone')