318a4793b360_add_branch_info_to_project_user.py 605 B

123456789101112131415161718192021222324252627282930
  1. """Add branch info to user_projects
  2. Revision ID: 318a4793b360
  3. Revises: 060b20d6d6e6
  4. Create Date: 2020-03-26 21:49:17.632967
  5. """
  6. from alembic import op
  7. import sqlalchemy as sa
  8. # revision identifiers, used by Alembic.
  9. revision = '318a4793b360'
  10. down_revision = '060b20d6d6e6'
  11. def upgrade():
  12. ''' Add the column branches to the table user_projects.
  13. '''
  14. op.add_column(
  15. 'user_projects',
  16. sa.Column('branches', sa.Text, nullable=True)
  17. )
  18. def downgrade():
  19. ''' Drop the column branches from the table user_projects.
  20. '''
  21. op.drop_column('user_projects', 'branches')