42df131326b1_add_date_to_state_region.py 638 B

1234567891011121314151617181920212223242526
  1. """add date to state region
  2. Revision ID: 42df131326b1
  3. Revises: 1547a089e232
  4. Create Date: 2019-09-03 12:13:45.719175
  5. """
  6. from alembic import op
  7. import sqlalchemy as sa
  8. # revision identifiers, used by Alembic.
  9. revision = '42df131326b1'
  10. down_revision = '1547a089e232'
  11. branch_labels = None
  12. depends_on = None
  13. def upgrade():
  14. op.add_column('state_region', sa.Column('from_date_time', sa.DateTime(), nullable=True))
  15. op.add_column('state_region', sa.Column('until_date_time', sa.DateTime(), nullable=True))
  16. def downgrade():
  17. op.drop_column('state_region', 'until_date_time')
  18. op.drop_column('state_region', 'from_date_time')