Commit 65d1e33e authored by Pierre-Yves Chibon's avatar Pierre-Yves Chibon

Add an alembic migration script to add the notification field to issue_comments

parent 2fba8943
"""Add notifications to tickets
Revision ID: 22db0a833d35
Revises: 317a285e04a8
Create Date: 2016-06-27 16:10:33.395495
# revision identifiers, used by Alembic.
revision = '22db0a833d35'
down_revision = '317a285e04a8'
from alembic import op
import sqlalchemy as sa
def upgrade():
''' Add the column notification to the table issue_comments.
sa.Column('notification', sa.Boolean, default=False, nullable=True)
op.execute('''UPDATE "issue_comments" SET notification=False;''')
'issue_comments', 'notification',
nullable=False, existing_nullable=True)
def downgrade():
''' Remove the column notification from the table issue_comments.
op.drop_column('issue_comments', 'notification')
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment