forked from danswer-ai/danswer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Alex Co <alex.tuan@mindvalley.com>
- Loading branch information
Showing
72 changed files
with
1,843 additions
and
655 deletions.
There are no files selected for viewing
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
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
38 changes: 38 additions & 0 deletions
38
backend/alembic/versions/35e6853a51d5_server_default_chosen_assistants.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,38 @@ | ||
"""server default chosen assistants | ||
Revision ID: 35e6853a51d5 | ||
Revises: c99d76fcd298 | ||
Create Date: 2024-09-13 13:20:32.885317 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
from sqlalchemy.dialects import postgresql | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "35e6853a51d5" | ||
down_revision = "c99d76fcd298" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
DEFAULT_ASSISTANTS = [-2, -1, 0] | ||
|
||
|
||
def upgrade() -> None: | ||
op.alter_column( | ||
"user", | ||
"chosen_assistants", | ||
type_=postgresql.JSONB(astext_type=sa.Text()), | ||
nullable=False, | ||
server_default=sa.text(f"'{DEFAULT_ASSISTANTS}'::jsonb"), | ||
) | ||
|
||
|
||
def downgrade() -> None: | ||
op.alter_column( | ||
"user", | ||
"chosen_assistants", | ||
type_=postgresql.JSONB(astext_type=sa.Text()), | ||
nullable=True, | ||
server_default=None, | ||
) |
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
35 changes: 35 additions & 0 deletions
35
backend/alembic/versions/5c7fdadae813_match_any_keywords_flag_for_standard_.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,35 @@ | ||
"""match_any_keywords flag for standard answers | ||
Revision ID: 5c7fdadae813 | ||
Revises: efb35676026c | ||
Create Date: 2024-09-13 18:52:59.256478 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "5c7fdadae813" | ||
down_revision = "efb35676026c" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.add_column( | ||
"standard_answer", | ||
sa.Column( | ||
"match_any_keywords", | ||
sa.Boolean(), | ||
nullable=False, | ||
server_default=sa.false(), | ||
), | ||
) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_column("standard_answer", "match_any_keywords") | ||
# ### end Alembic commands ### |
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
31 changes: 31 additions & 0 deletions
31
backend/alembic/versions/c99d76fcd298_add_nullable_to_persona_id_in_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,31 @@ | ||
"""add nullable to persona id in Chat Session | ||
Revision ID: c99d76fcd298 | ||
Revises: 5c7fdadae813 | ||
Create Date: 2024-07-09 19:27:01.579697 | ||
""" | ||
|
||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "c99d76fcd298" | ||
down_revision = "5c7fdadae813" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade() -> None: | ||
op.alter_column( | ||
"chat_session", "persona_id", existing_type=sa.INTEGER(), nullable=True | ||
) | ||
|
||
|
||
def downgrade() -> None: | ||
op.alter_column( | ||
"chat_session", | ||
"persona_id", | ||
existing_type=sa.INTEGER(), | ||
nullable=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
32 changes: 32 additions & 0 deletions
32
backend/alembic/versions/efb35676026c_standard_answer_match_regex_flag.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,32 @@ | ||
"""standard answer match_regex flag | ||
Revision ID: efb35676026c | ||
Revises: 52a219fb5233 | ||
Create Date: 2024-09-11 13:55:46.101149 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "efb35676026c" | ||
down_revision = "0ebb1d516877" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.add_column( | ||
"standard_answer", | ||
sa.Column( | ||
"match_regex", sa.Boolean(), nullable=False, server_default=sa.false() | ||
), | ||
) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_column("standard_answer", "match_regex") | ||
# ### end Alembic commands ### |
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.