Implement Alembic for database migrations and update FastAPI initialization
- Integrate Alembic for managing database schema migrations, replacing the previous SQL schema management. - Update the FastAPI application to synchronize interface definitions at startup. - Modify the Docker Compose command to run Alembic migrations before starting the API. - Enhance the Makefile with new commands for database migration and revision management. - Remove outdated SQL schema and seed files, transitioning to a more dynamic migration approach. - Add initial migration scripts and configuration for Alembic, ensuring a structured database evolution.
This commit is contained in:
@@ -73,6 +73,7 @@ class KnowledgeBase(Base):
|
||||
embedding_model_resource_id: Mapped[str | None] = mapped_column(
|
||||
String(40),
|
||||
ForeignKey("model_resources.id", ondelete="SET NULL"),
|
||||
index=True,
|
||||
nullable=True,
|
||||
)
|
||||
status: Mapped[str] = mapped_column(String(16), default="active") # active|archived
|
||||
|
||||
Reference in New Issue
Block a user