-
-
Notifications
You must be signed in to change notification settings - Fork 103
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
Enhancement: Inspectdb adds data types and exception handling. Models can also be generated if there are types that cannot be handled. #187
base: dev
Are you sure you want to change the base?
Conversation
increase: 1. Inspectdb adds DECIMAL, DOUBLE, CHAR, TIME data type matching; 2. Add exception handling, avoid the need to manually create the entire table because a certain data type is not supported.
可以加个单元测试 |
另外,更新一下changlog,感谢贡献! |
这块的测试之前的部分是写在哪里? |
之前好像没有,你可以加个,然后在本地执行 |
我一写业务的后端,让我写个测试,一时间不知道该从何下手,先下班了,明天再琢磨。🚀 |
你可以参考其他的 |
我用show create table {table} 出来的结果 模型创建出来的结果: 这个模型是改完之后的效果,但是不影响代码的理解,这个 |
是解析错误吗 |
我刚才查出来来,是一个bug |
这是传进去的建表语句 |
这是ddlparse.py716行 ret = self._DDL_PARSE_EXPR.parseString(self._ddl) 解析出来的结果 |
那是第三库的问题了,有点尴尬 |
简单的办法是在inspectdb里头做判断,跳过名字为collate且数据类型为UTF8MB4_UNICOID_CI的,但是不知道会不会误伤。 |
大佬想办法吧,我去干活了 |
暂时要么解决该问题,要么重构,有一些想法,但是暂时没动力去弄 |
Please fix conflict. |
Inspectdb adds
DECIMAL
,DOUBLE
,CHAR
,TIME
data type matching;inspectdb增加
DECIMAL
、DOUBLE
、CHAR
、TIME
数据类型匹配;Add exception handling to avoid manually creating the entire model because specific data types are not supported.
添加异常处理,避免因为不支持特定的数据类型,手动创建整个模型。