mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-03-27 18:22:55 +01:00
* Support regex in standard answers
* fix mypy
* Add match_regex boolean column to StandardAnswer
* Add match_regex flag and validation to Pydantic models
* GET /manage/admin/standard-answer: add match_regex to create_standard_answer
* PATCH /manage/admin/standard-answer/🆔 add match_regex to update_standard_answer
* Add "Match Regex" toggle to standard answer form
* Decode error pattern in case it's bytes
* Refactor regex support to use match_regex flag instead of supplemental tuple
* Better error handling for invalid regexes
* Show "match regex" in table and style keywords appropriately
* Fix stale UI copy for non-"match_regex" branch
* Fix stale docstring in find_matching_standard_answers
* Update down_revision to reflect most recent migration
* Update UI copy
* Initial implementation of match group display
* Fix pydantic StandardAnswer vs SQLAlchemy StandardAnswer model usage
* Update docstring return type
* Fix missing key prop
---------
Co-authored-by: Hyeong Joon Suh <hyeongjoonsuh@Hyeongs-MacBook-Pro.local>
Co-authored-by: danswer-trial <danswer-trial@danswer-trials-MacBook-Pro.local>
Alembic DB Migrations
These files are for creating/updating the tables in the Relational DB (Postgres). Danswer migrations use a generic single-database configuration with an async dbapi.
To generate new migrations:
run from danswer/backend:
alembic revision --autogenerate -m <DESCRIPTION_OF_MIGRATION>
More info can be found here: https://alembic.sqlalchemy.org/en/latest/autogenerate.html
Running migrations
To run all un-applied migrations:
alembic upgrade head
To undo migrations:
alembic downgrade -X
where X is the number of migrations you want to undo from the current state