mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-03-27 18:22:55 +01:00
* k * update enum imports * add functional types + model swaps * remove a log * remove kv * fully functional + robustified for kv swap * validated with hosted + cloud * ensure not updating current search settings when reindexing * add instance check * revert back to updating search settings (will need a slight refactor for endpoint) * protect advanced config override1 * run pretty * fix typing * update typing * remove unnecessary function * update model name * clearer interface names * validated foreign key constaint * proper migration * squash --------- Co-authored-by: Yuhong Sun <yuhongsun96@gmail.com>
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