Open
Description
I use "uliweb reflectdb" on a oracle db, the file generate have this line:
from sqlalchemy.dialects.oracle import VARCHAR2
which is inserted by this source code: https://github.com/limodou/uliweb/blob/master/uliweb/contrib/orm/commands.py#L1237
But when I run "uliweb sql", it output error:
File "/home/zhangclb/oss/uliweb/uliweb/orm/__init__.py", line 4456, in bind
c = f.create(cls)
File "/home/zhangclb/oss/uliweb/uliweb/orm/__init__.py", line 1659, in create
f_type = self._create_type()
File "/home/zhangclb/oss/uliweb/uliweb/orm/__init__.py", line 1878, in _create_type
f_type = self.type_class(self.max_length, convert_unicode=True, **self.type_attrs)
TypeError: 'str' object is not callable
And I try to print self.type_class, it is "VARCHAR2"
at last I found the source code generated by reflectdb is like that:
job_name = Field(str, max_length=250, nullable=False, index=True, type_class='VARCHAR2')
After modify to type_class=VARCHAR2 , it became OK
Metadata
Metadata
Assignees
Labels
No labels