mirror of
https://github.com/zylon-ai/private-gpt.git
synced 2025-12-22 20:12:55 +01:00
39 lines
1.2 KiB
Python
39 lines
1.2 KiB
Python
"""Changes content to json
|
|
|
|
Revision ID: 5f1c1d3934a1
|
|
Revises: eb18396f592a
|
|
Create Date: 2024-04-07 12:29:18.009919
|
|
|
|
"""
|
|
from typing import Sequence, Union
|
|
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision: str = '5f1c1d3934a1'
|
|
down_revision: Union[str, None] = 'eb18396f592a'
|
|
branch_labels: Union[str, Sequence[str], None] = None
|
|
depends_on: Union[str, Sequence[str], None] = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.alter_column('chat_items', 'content',
|
|
existing_type=sa.TEXT(),
|
|
type_=sa.JSON(),
|
|
existing_nullable=True,
|
|
)
|
|
# op.create_unique_constraint('unique_user_role', 'user_roles', ['user_id', 'role_id', 'company_id'])
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade() -> None:
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
# op.drop_constraint('unique_user_role', 'user_roles', type_='unique')
|
|
op.alter_column('chat_items', 'content',
|
|
existing_type=sa.JSON(),
|
|
type_=sa.TEXT(),
|
|
existing_nullable=True)
|
|
# ### end Alembic commands ###
|