-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0553062
commit fd2d607
Showing
37 changed files
with
698 additions
and
1,111 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
backend/alembic/versions/9f696734098f_combine_search_and_chat.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
"""Combine Search and Chat | ||
Revision ID: 9f696734098f | ||
Revises: 6d562f86c78b | ||
Create Date: 2024-11-27 15:32:19.694972 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "9f696734098f" | ||
down_revision = "6d562f86c78b" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade() -> None: | ||
op.alter_column("chat_session", "description", nullable=True) | ||
op.drop_column("chat_session", "one_shot") | ||
|
||
|
||
def downgrade() -> None: | ||
op.execute("UPDATE chat_session SET description = '' WHERE description IS NULL") | ||
op.alter_column("chat_session", "description", nullable=False) | ||
op.add_column( | ||
"chat_session", | ||
sa.Column("one_shot", sa.Boolean(), nullable=False, server_default=sa.false()), | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.