Blame alembic/versions/368fd931cf7f_add_the_notifications_column_to_projects.py

Pierre-Yves Chibon c2e7b0
"""Add the notifications column to projects
Pierre-Yves Chibon c2e7b0
Pierre-Yves Chibon c2e7b0
Revision ID: 368fd931cf7f
Pierre-Yves Chibon c2e7b0
Revises: 36386a60b3fd
Pierre-Yves Chibon c2e7b0
Create Date: 2016-09-18 18:51:09.625322
Pierre-Yves Chibon c2e7b0
Pierre-Yves Chibon c2e7b0
"""
Pierre-Yves Chibon c2e7b0
Pierre-Yves Chibon c2e7b0
# revision identifiers, used by Alembic.
Pierre-Yves Chibon c2e7b0
revision = '368fd931cf7f'
Pierre-Yves Chibon c2e7b0
down_revision = '36386a60b3fd'
Pierre-Yves Chibon c2e7b0
Pierre-Yves Chibon c2e7b0
from alembic import op
Pierre-Yves Chibon c2e7b0
import sqlalchemy as sa
Pierre-Yves Chibon c2e7b0
Pierre-Yves Chibon c2e7b0
Pierre-Yves Chibon c2e7b0
def upgrade():
Pierre-Yves Chibon c2e7b0
    ''' Add the column notifications to the table projects.
Pierre-Yves Chibon c2e7b0
    '''
Pierre-Yves Chibon c2e7b0
    op.add_column(
Pierre-Yves Chibon c2e7b0
        'projects',
Pierre-Yves Chibon c2e7b0
        sa.Column('_notifications', sa.String(255), nullable=True)
Pierre-Yves Chibon c2e7b0
    )
Pierre-Yves Chibon c2e7b0
Pierre-Yves Chibon c2e7b0
Pierre-Yves Chibon c2e7b0
def downgrade():
Pierre-Yves Chibon c2e7b0
    ''' Add the column notifications to the table projects.
Pierre-Yves Chibon c2e7b0
    '''
Pierre-Yves Chibon c2e7b0
    op.drop_column('projects', '_notifications')