3d9ba6086a23_improvin_voting_models.py 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. """improvin_voting_models
  2. Revision ID: 3d9ba6086a23
  3. Revises: c98e920c06ae
  4. Create Date: 2019-03-30 13:52:32.070847
  5. """
  6. from alembic import op
  7. import sqlalchemy as sa
  8. # revision identifiers, used by Alembic.
  9. revision = '3d9ba6086a23'
  10. down_revision = 'c98e920c06ae'
  11. branch_labels = None
  12. depends_on = None
  13. def upgrade():
  14. # ### commands auto generated by Alembic - please adjust! ###
  15. op.add_column('option', sa.Column('description', sa.String(), nullable=True))
  16. op.add_column('option', sa.Column('name', sa.String(), nullable=True))
  17. op.drop_column('option', 'motivation')
  18. op.add_column('question', sa.Column('combined_approval_voting', sa.Boolean(), server_default='f', nullable=True))
  19. # ### end Alembic commands ###
  20. def downgrade():
  21. # ### commands auto generated by Alembic - please adjust! ###
  22. op.drop_column('question', 'combined_approval_voting')
  23. op.add_column('option', sa.Column('motivation', sa.VARCHAR(), autoincrement=False, nullable=True))
  24. op.drop_column('option', 'name')
  25. op.drop_column('option', 'description')
  26. # ### end Alembic commands ###