5993f9240bcf_allow_mirroring_project_in.py 771 B

1234567891011121314151617181920212223242526272829303132333435
  1. """Allow mirroring project in
  2. Revision ID: 5993f9240bcf
  3. Revises: 1f24c9c8efa5
  4. Create Date: 2018-12-14 10:00:05.281979
  5. """
  6. from alembic import op
  7. import sqlalchemy as sa
  8. # revision identifiers, used by Alembic.
  9. revision = '5993f9240bcf'
  10. down_revision = '1f24c9c8efa5'
  11. def upgrade():
  12. ''' Add the column mirrored_from to the table projects.
  13. '''
  14. op.add_column(
  15. 'projects',
  16. sa.Column('mirrored_from', sa.Text, nullable=True)
  17. )
  18. op.add_column(
  19. 'projects',
  20. sa.Column('mirrored_from_last_log', sa.Text, nullable=True)
  21. )
  22. def downgrade():
  23. ''' Remove the column mirrored_from from the table projects.
  24. '''
  25. op.drop_column('projects', 'mirrored_from')
  26. op.drop_column('projects', 'mirrored_from_last_log')