Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update basetypes.go, fixed origin_setting column read error #1884

Merged
merged 1 commit into from
Sep 18, 2024

Conversation

juneyx
Copy link
Contributor

@juneyx juneyx commented Sep 18, 2024

新初始化数据库,修改前端配置后,把origin_setting当作[]byte去读取会报错:

{"error": "sql: Scan error on column index 13, name \"origin_setting\": Scan source was not []bytes"}

如果数据库不支持json的话一般是当作text来存的吧,所以应该可以直接改成当string去读取(我只在pgsql下进行了测试)

@pixelmaxQm pixelmaxQm merged commit 3d58213 into flipped-aurora:main Sep 18, 2024
8 checks passed
@pixelmaxQm
Copy link
Collaborator

经测试,在mysql环境下无法使用text获取byte属性参数,因此做了兼容断言,此PR已撤销,非常感谢您发现此问题。
0fd9e95

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants