From 6667f60b0a5543f0a9fd9a3300b3e621fe271a4c Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: May 09 2016 08:04:57 +0000 Subject: Add an alembic revision adding the milestones field to the projects --- diff --git a/alembic/versions/2aa7b3958bc5_add_the_milestones_column.py b/alembic/versions/2aa7b3958bc5_add_the_milestones_column.py new file mode 100644 index 0000000..5a00dbb --- /dev/null +++ b/alembic/versions/2aa7b3958bc5_add_the_milestones_column.py @@ -0,0 +1,31 @@ +"""Add the milestones column + +Revision ID: 2aa7b3958bc5 +Revises: 443e090da188 +Create Date: 2016-05-03 15:59:04.992414 + +""" + +# revision identifiers, used by Alembic. +revision = '2aa7b3958bc5' +down_revision = '443e090da188' + +from alembic import op +import sqlalchemy as sa + + +def upgrade(): + ''' Add the column _milestones to the table projects + and the column milestone to the table issues. + ''' + op.add_column( + 'projects', + sa.Column('_milestones', sa.Text, nullable=True) + ) + + +def downgrade(): + ''' Drop the column _milestones from the table projects + and the column milestone from the table issues. + ''' + op.drop_column('projects', '_milestones')