Fix Log model registration - import models before init_db
The Log model was not being registered with SQLAlchemy's metadata, causing the logs table to not be created on startup.
This commit is contained in:
@@ -2,6 +2,7 @@ from contextlib import asynccontextmanager
|
||||
from fastapi import FastAPI
|
||||
from fastapi.middleware.cors import CORSMiddleware
|
||||
from app.database import init_db
|
||||
import app.models # noqa: F401 - 注册所有模型
|
||||
from app.routers import (
|
||||
auth_router,
|
||||
conversation_router,
|
||||
|
||||
Reference in New Issue
Block a user