2aa7b3958bc5_add_the_milestones_column.py 689 B

12345678910111213141516171819202122232425262728293031
  1. """Add the milestones column
  2. Revision ID: 2aa7b3958bc5
  3. Revises: 443e090da188
  4. Create Date: 2016-05-03 15:59:04.992414
  5. """
  6. # revision identifiers, used by Alembic.
  7. revision = '2aa7b3958bc5'
  8. down_revision = '443e090da188'
  9. from alembic import op
  10. import sqlalchemy as sa
  11. def upgrade():
  12. ''' Add the column _milestones to the table projects
  13. and the column milestone to the table issues.
  14. '''
  15. op.add_column(
  16. 'projects',
  17. sa.Column('_milestones', sa.Text, nullable=True)
  18. )
  19. def downgrade():
  20. ''' Drop the column _milestones from the table projects
  21. and the column milestone from the table issues.
  22. '''
  23. op.drop_column('projects', '_milestones')