Blame alembic/versions/2fb229dac744_store_the_milestone_keys.py

Pierre-Yves Chibon f7a5ec
"""Store the milestone keys
Pierre-Yves Chibon f7a5ec
Pierre-Yves Chibon f7a5ec
Revision ID: 2fb229dac744
Pierre-Yves Chibon f7a5ec
Revises: e4dbfcd20f42
Pierre-Yves Chibon f7a5ec
Create Date: 2017-10-31 13:03:10.767348
Pierre-Yves Chibon f7a5ec
Pierre-Yves Chibon f7a5ec
"""
Pierre-Yves Chibon f7a5ec
Pierre-Yves Chibon f7a5ec
# revision identifiers, used by Alembic.
Pierre-Yves Chibon f7a5ec
revision = '2fb229dac744'
Pierre-Yves Chibon f7a5ec
down_revision = 'e4dbfcd20f42'
Pierre-Yves Chibon f7a5ec
Pierre-Yves Chibon f7a5ec
from alembic import op
Pierre-Yves Chibon f7a5ec
import sqlalchemy as sa
Pierre-Yves Chibon f7a5ec
Pierre-Yves Chibon f7a5ec
Pierre-Yves Chibon f7a5ec
def upgrade():
Pierre-Yves Chibon f7a5ec
    ''' Add the column _milestones_keys to the table projects.
Pierre-Yves Chibon f7a5ec
    '''
Pierre-Yves Chibon f7a5ec
    op.add_column(
Pierre-Yves Chibon f7a5ec
        'projects',
Pierre-Yves Chibon f7a5ec
        sa.Column('_milestones_keys', sa.Text, nullable=True)
Pierre-Yves Chibon f7a5ec
    )
Pierre-Yves Chibon f7a5ec
Pierre-Yves Chibon f7a5ec
Pierre-Yves Chibon f7a5ec
def downgrade():
Pierre-Yves Chibon f7a5ec
    ''' Drop the column _milestones_keys from the table projects.
Pierre-Yves Chibon f7a5ec
    '''
Pierre-Yves Chibon f7a5ec
    op.drop_column('projects', '_milestones_keys')