Blame alembic/versions/36116bb7a69b_add_the_url_field_to_project.py

Pierre-Yves Chibon 55e94b
"""Add the url field to project
Pierre-Yves Chibon 55e94b
Pierre-Yves Chibon 55e94b
Revision ID: 36116bb7a69b
Pierre-Yves Chibon 55e94b
Revises: abc71fd60fa
Pierre-Yves Chibon 55e94b
Create Date: 2015-06-11 12:36:33.544046
Pierre-Yves Chibon 55e94b
Pierre-Yves Chibon 55e94b
"""
Pierre-Yves Chibon 55e94b
Pierre-Yves Chibon 55e94b
# revision identifiers, used by Alembic.
Pierre-Yves Chibon 55e94b
revision = '36116bb7a69b'
Pierre-Yves Chibon 55e94b
down_revision = 'abc71fd60fa'
Pierre-Yves Chibon 55e94b
Pierre-Yves Chibon 55e94b
from alembic import op
Pierre-Yves Chibon 55e94b
import sqlalchemy as sa
Pierre-Yves Chibon 55e94b
Pierre-Yves Chibon 55e94b
Pierre-Yves Chibon 55e94b
def upgrade():
Pierre-Yves Chibon 55e94b
    ''' Add the column url to the table projects.
Pierre-Yves Chibon 55e94b
    '''
Pierre-Yves Chibon 55e94b
    op.add_column(
Pierre-Yves Chibon 55e94b
        'projects',
Pierre-Yves Chibon 55e94b
        sa.Column('url', sa.Text, nullable=True)
Pierre-Yves Chibon 55e94b
    )
Pierre-Yves Chibon 55e94b
Pierre-Yves Chibon 55e94b
Pierre-Yves Chibon 55e94b
def downgrade():
Pierre-Yves Chibon 55e94b
    ''' Remove the column merge_status from the table projects.
Pierre-Yves Chibon 55e94b
    '''
Pierre-Yves Chibon 55e94b
    op.drop_column('projects', 'url')