5081ca31d1c3_rename_deep_exploration_date_column.py 735 B

1234567891011121314151617181920212223242526
  1. """rename deep exploration date column
  2. Revision ID: 5081ca31d1c3
  3. Revises: 7976912082a6
  4. Create Date: 2020-02-11 22:51:56.652667
  5. """
  6. from alembic import op
  7. import sqlalchemy as sa
  8. from sqlalchemy.dialects import postgresql
  9. # revision identifiers, used by Alembic.
  10. revision = '5081ca31d1c3'
  11. down_revision = '7976912082a6'
  12. branch_labels = None
  13. depends_on = None
  14. def upgrade():
  15. op.add_column('deep_exploration', sa.Column('until_date_time', sa.DateTime(), nullable=True))
  16. op.drop_column('deep_exploration', 'date_time_end')
  17. def downgrade():
  18. op.add_column('deep_exploration', sa.Column('date_time_end', postgresql.TIMESTAMP(), autoincrement=False, nullable=True))
  19. op.drop_column('deep_exploration', 'until_date_time')