Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
ai
/
ai-workflow
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 5776c43c
authored
May 26, 2026
by
imwangxiaozhou
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
冲突处理
1 parent
8a0ac5e8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
4 deletions
workspace/agent-admin/backend/app/main.py
workspace/agent-admin/backend/app/model/session.py
workspace/agent-admin/backend/tests/test_mysql_model_ddl.py
workspace/agent-admin/backend/app/main.py
View file @
5776c43
...
@@ -8,7 +8,7 @@ from fastapi.responses import JSONResponse, Response
...
@@ -8,7 +8,7 @@ from fastapi.responses import JSONResponse, Response
from
app.api.v1.router
import
api_router
from
app.api.v1.router
import
api_router
from
app.config.loader
import
ConfigLoader
from
app.config.loader
import
ConfigLoader
from
app.infrastructure.database
import
engine
from
app.infrastructure.database
import
engine
,
SessionLocal
from
app.infrastructure.logging
import
configure_logging
from
app.infrastructure.logging
import
configure_logging
from
app.infrastructure.response_format
import
format_response_datetimes
from
app.infrastructure.response_format
import
format_response_datetimes
from
app.infrastructure.schema_patch
import
ensure_runtime_schema
from
app.infrastructure.schema_patch
import
ensure_runtime_schema
...
...
workspace/agent-admin/backend/app/model/session.py
View file @
5776c43
...
@@ -6,9 +6,9 @@ from app.infrastructure.database import Base
...
@@ -6,9 +6,9 @@ from app.infrastructure.database import Base
class
Session
(
Base
):
class
Session
(
Base
):
__tablename__
=
"ai_sessions"
__tablename__
=
"ai_sessions"
session_id
=
Column
(
String
,
primary_key
=
True
,
index
=
True
)
session_id
=
Column
(
String
(
191
)
,
primary_key
=
True
,
index
=
True
)
room_id
=
Column
(
String
,
nullable
=
False
,
default
=
""
,
index
=
True
)
room_id
=
Column
(
String
(
191
)
,
nullable
=
False
,
default
=
""
,
index
=
True
)
channel
=
Column
(
String
,
nullable
=
False
,
default
=
"wechat_group"
)
channel
=
Column
(
String
(
64
)
,
nullable
=
False
,
default
=
"wechat_group"
)
conversation_history
=
Column
(
Text
,
nullable
=
False
,
default
=
"[]"
)
conversation_history
=
Column
(
Text
,
nullable
=
False
,
default
=
"[]"
)
created_at
=
Column
(
DateTime
,
server_default
=
func
.
now
(),
nullable
=
False
)
created_at
=
Column
(
DateTime
,
server_default
=
func
.
now
(),
nullable
=
False
)
updated_at
=
Column
(
DateTime
,
server_default
=
func
.
now
(),
onupdate
=
func
.
now
(),
nullable
=
False
,
index
=
True
)
updated_at
=
Column
(
DateTime
,
server_default
=
func
.
now
(),
onupdate
=
func
.
now
(),
nullable
=
False
,
index
=
True
)
workspace/agent-admin/backend/tests/test_mysql_model_ddl.py
0 → 100644
View file @
5776c43
from
sqlalchemy.schema
import
CreateTable
from
sqlalchemy.dialects
import
mysql
from
app.model.session
import
Session
def
test_session_table_compiles_for_mysql
():
ddl
=
str
(
CreateTable
(
Session
.
__table__
)
.
compile
(
dialect
=
mysql
.
dialect
()))
assert
"CREATE TABLE ai_sessions"
in
ddl
assert
"session_id VARCHAR(191)"
in
ddl
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment