2023081625_increase_slot_datamodel_5fcd397aae72.py 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. """increase_slot_datamodel
  2. Revision ID: 5fcd397aae72
  3. Revises: 4f1ef609b19a
  4. Create Date: 2023-08-16 22:25:30.650590
  5. """
  6. from alembic import op
  7. import sqlalchemy as sa
  8. # revision identifiers, used by Alembic.
  9. revision = "5fcd397aae72"
  10. down_revision = "4f1ef609b19a"
  11. branch_labels = None
  12. depends_on = None
  13. def upgrade():
  14. # ### commands auto generated by Alembic - please adjust! ###
  15. op.add_column(
  16. "slots", sa.Column("place", sa.String(), nullable=False, server_default="")
  17. )
  18. op.add_column(
  19. "slots",
  20. sa.Column("responsibleContact", sa.String(), nullable=False, server_default=""),
  21. )
  22. op.alter_column(
  23. "volunteers", "surname", existing_type=sa.VARCHAR(length=128), nullable=False
  24. )
  25. # ### end Alembic commands ###
  26. def downgrade():
  27. # ### commands auto generated by Alembic - please adjust! ###
  28. op.alter_column(
  29. "volunteers", "surname", existing_type=sa.VARCHAR(length=128), nullable=True
  30. )
  31. op.drop_column("slots", "responsibleContact")
  32. op.drop_column("slots", "place")
  33. # ### end Alembic commands ###