Repository navigation
feat: 新增跨方言 JSON 类型 JSONType(rebase 版,替代 #543 的冲突) - #545
Merged
Merged
Conversation
原 PR #543 的实现,因其与 #541 同改 base_model.py 的 import 行产生冲突,此处为基于最新 dev 的 rebase 版本,改动内容与原提交一致(提交作者保留为 Echo-Note)。 - PostgreSQL:JSONB;SQLite / MySQL:通用 JSON(TypeEngine.with_variant) - 验证:三方言 DDL(JSONB / JSON / JSON)、sqlite create_all 建表 + JSON 读写、 ruff / basedpyright 0 errors / pytest 97 passed 关联 issue #542:本 PR 提供统一入口;生成器 jsonb 映射与方言类型 import 的修复留作后续。
This was referenced Oct 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
原 PR #543 的内容,基于最新
dev重新应用(保留原作者 Echo-Note)。为什么需要 rebase:#543 与 #541 都修改了
backend/app/core/base_model.py第 1 行的from sqlalchemy import ...,#541 先合并(
45a8ade9)后 #543 变为 CONFLICTING。本 PR 把JSON加入 import 列表并新增from sqlalchemy.dialects.postgresql import JSONB+JSONType常量,内容与 #543 完全一致。验证(本地实跑)
JSONB;SQLite / MySQL →JSONcreate_all建表 + JSON 写入读回:{'a': [1, 2, {'b': 3}]}ruffAll checks passed /basedpyright0 errors /pytest97 passed关联 #542(本 PR 只提供统一入口,生成器路径的修复见 issue 上的后续说明)。