2024-08-23-15-24_b217fafdb5f0.py 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. """empty message
  2. Revision ID: b217fafdb5f0
  3. Revises: 1c667e62f698
  4. Create Date: 2024-08-23 15:24:41.917447
  5. """
  6. from typing import Sequence, Union
  7. from alembic import op
  8. import sqlalchemy as sa
  9. import sqlmodel
  10. # revision identifiers, used by Alembic.
  11. revision: str = 'b217fafdb5f0'
  12. down_revision: Union[str, None] = '1c667e62f698'
  13. branch_labels: Union[str, Sequence[str], None] = None
  14. depends_on: Union[str, Sequence[str], None] = None
  15. def upgrade() -> None:
  16. # ### commands auto generated by Alembic - please adjust! ###
  17. op.add_column('message', sa.Column('attachments', sa.JSON(), nullable=True))
  18. op.add_column('thread', sa.Column('tool_resources', sa.JSON(), nullable=True))
  19. op.create_index('token_assistant_token_idx', 'token', ['assistant_token'], unique=True)
  20. # ### end Alembic commands ###
  21. def downgrade() -> None:
  22. # ### commands auto generated by Alembic - please adjust! ###
  23. op.drop_index('token_assistant_token_idx', table_name='token')
  24. op.drop_column('thread', 'tool_resources')
  25. op.drop_column('message', 'attachments')
  26. # ### end Alembic commands ###