From 2800a8402293fe0988ff179c67e985fd9ecbff1d Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Mar 08 2016 10:36:23 +0000 Subject: Add an alembic migration field to add the initial_comment field in the PR table --- diff --git a/alembic/versions/4cae55a80a42_add_the_initial_comment_on_the_pr_table.py b/alembic/versions/4cae55a80a42_add_the_initial_comment_on_the_pr_table.py new file mode 100644 index 0000000..c329944 --- /dev/null +++ b/alembic/versions/4cae55a80a42_add_the_initial_comment_on_the_pr_table.py @@ -0,0 +1,29 @@ +"""Add the initial_comment on the PR table + +Revision ID: 4cae55a80a42 +Revises: 1f3de3853a1a +Create Date: 2016-03-01 12:00:34.823097 + +""" + +# revision identifiers, used by Alembic. +revision = '4cae55a80a42' +down_revision = '1f3de3853a1a' + +from alembic import op +import sqlalchemy as sa + + +def upgrade(): + ''' Add the column initial_comment to the table pull_requests. + ''' + op.add_column( + 'pull_requests', + sa.Column('initial_comment', sa.Text, nullable=True) + ) + + +def downgrade(): + ''' Remove the column initial_comment from the table pull_requests. + ''' + op.drop_column('pull_requests', 'initial_comment')