e4dbfcd20f42_add_default_priority_to_projects.py 581 B

12345678910111213141516171819202122232425262728
  1. """Add default_priority to projects
  2. Revision ID: e4dbfcd20f42
  3. Revises: 21292448a775
  4. Create Date: 2017-10-20 13:34:01.323657
  5. """
  6. # revision identifiers, used by Alembic.
  7. revision = 'e4dbfcd20f42'
  8. down_revision = '21292448a775'
  9. from alembic import op
  10. import sqlalchemy as sa
  11. def upgrade():
  12. ''' Add default_priority column to projects table'''
  13. op.add_column(
  14. 'projects',
  15. sa.Column('default_priority', sa.Text, nullable=True)
  16. )
  17. def downgrade():
  18. ''' Revert the default_priority column added'''
  19. op.drop_column('projects', 'default_priority')