43df5e588a87_add_closed_at_attribute_in_issues.py 571 B

123456789101112131415161718192021222324252627
  1. """add_closed_at_attribute_in_issues
  2. Revision ID: 43df5e588a87
  3. Revises: 22db0a833d35
  4. Create Date: 2016-06-28 22:59:36.653905
  5. """
  6. # revision identifiers, used by Alembic.
  7. revision = '43df5e588a87'
  8. down_revision = '22db0a833d35'
  9. from alembic import op
  10. import sqlalchemy as sa
  11. def upgrade():
  12. ''' Add closed_at column in issues table '''
  13. op.add_column(
  14. 'issues',
  15. sa.Column('closed_at', sa.DateTime, nullable=True)
  16. )
  17. def downgrade():
  18. ''' Remove the closed_at column in issues table '''
  19. op.drop_column('issues', 'closed_at')