7976912082a6_add_deep_exploration_orders.py 880 B

1234567891011121314151617181920212223242526272829303132
  1. """add deep exploration orders
  2. Revision ID: 7976912082a6
  3. Revises: 9524fe8e91f0
  4. Create Date: 2020-02-11 13:13:53.215765
  5. """
  6. from alembic import op
  7. import sqlalchemy as sa
  8. # revision identifiers, used by Alembic.
  9. revision = '7976912082a6'
  10. down_revision = '9524fe8e91f0'
  11. branch_labels = None
  12. depends_on = None
  13. def upgrade():
  14. op.create_table('deep_exploration_order',
  15. sa.Column('id', sa.Integer(), nullable=False),
  16. sa.Column('resource_type', sa.SmallInteger(), nullable=False),
  17. sa.Column('order_type', sa.SmallInteger(), nullable=False),
  18. sa.Column('amount', sa.Integer(), nullable=True),
  19. sa.Column('from_date_time', sa.DateTime(), nullable=True),
  20. sa.Column('until_date_time', sa.DateTime(), nullable=True),
  21. sa.PrimaryKeyConstraint('id', name=op.f('pk_deep_exploration_order'))
  22. )
  23. def downgrade():
  24. op.drop_table('deep_exploration_order')