fix:修复升级达梦数据库的表结构时由于select中字符串精读问题,而导致字符串截取的问题 #1922
Merged
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.
在达梦数据库中,表结构上的字符串长度以字符为单位,而在cast函数转换数据类型时,是以字节为单位。
我们在使用FreeSql对达梦数据库进行表结构升级时,就会出现重新insert到原表时,一些较长的字符串就会被截断,导致数据不一致。
我跟达梦官方的论坛上提了问题,看这个情况应该就是达梦的特性。。。。
https://eco.dameng.com/community/question/ee053ae1bafba93b665c74a3b3f71b53
同时,我在单元测试中增加了升级测试的代码,原始的代码是不通过的