d39508cb8d8_create_queue_rules.py 702 B

123456789101112131415161718192021222324252627282930
  1. """Create queue_rules
  2. Revision ID: d39508cb8d8
  3. Revises: 5139253c0423
  4. Create Date: 2014-08-10 17:27:32.973571
  5. """
  6. # revision identifiers, used by Alembic.
  7. revision = 'd39508cb8d8'
  8. down_revision = '5139253c0423'
  9. from alembic import op
  10. import sqlalchemy as sa
  11. def upgrade():
  12. op.create_table(
  13. 'queue_rules',
  14. sa.Column('rule_name', sa.String(80), nullable=False),
  15. sa.Column('time', sa.String(32), nullable=False),
  16. sa.Column('min_penalty', sa.String(32), nullable=False),
  17. sa.Column('max_penalty', sa.String(32), nullable=False)
  18. )
  19. def downgrade():
  20. ########################## drop tables ###########################
  21. op.drop_table('queue_rules')