2024-05-28-11-35_1c667e62f698.py 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. """empty message
  2. Revision ID: 1c667e62f698
  3. Revises: aa4bda3363e3
  4. Create Date: 2024-05-28 11:35:33.961196
  5. """
  6. from typing import Sequence, Union
  7. from alembic import op
  8. import sqlalchemy as sa
  9. import sqlmodel
  10. from sqlalchemy.dialects import mysql
  11. # revision identifiers, used by Alembic.
  12. revision: str = '1c667e62f698'
  13. down_revision: Union[str, None] = 'aa4bda3363e3'
  14. branch_labels: Union[str, Sequence[str], None] = None
  15. depends_on: Union[str, Sequence[str], None] = None
  16. def upgrade() -> None:
  17. # ### commands auto generated by Alembic - please adjust! ###
  18. op.alter_column('assistant', 'response_format',
  19. existing_type=mysql.VARCHAR(collation='utf8mb4_unicode_ci', length=255),
  20. type_=sa.JSON(),
  21. existing_nullable=True)
  22. op.alter_column('run', 'response_format',
  23. existing_type=mysql.VARCHAR(collation='utf8mb4_unicode_ci', length=255),
  24. type_=sa.JSON(),
  25. existing_nullable=True)
  26. # ### end Alembic commands ###
  27. def downgrade() -> None:
  28. # ### commands auto generated by Alembic - please adjust! ###
  29. op.alter_column('run', 'response_format',
  30. existing_type=sa.JSON(),
  31. type_=mysql.VARCHAR(collation='utf8mb4_unicode_ci', length=255),
  32. existing_nullable=True)
  33. op.alter_column('assistant', 'response_format',
  34. existing_type=sa.JSON(),
  35. type_=mysql.VARCHAR(collation='utf8mb4_unicode_ci', length=255),
  36. existing_nullable=True)
  37. # ### end Alembic commands ###