开发者

sqlachemy, says decimal is not defined?

开发者 https://www.devze.com 2023-01-10 03:51 出处:网络
Trying to make a column of type decimal: Column(\'cost\', DECIMAL) Erorr, name \'DECIMAL\' is not defined.

Trying to make a column of type decimal:

Column('cost', DECIMAL)

Erorr, name 'DECIMAL' is not defined.

SqlAlch seems to support decimal, am I missing an import?

BTW, how do I also create a longtext column?

开发者_JS百科

I'm using mysql.


try

import sqlalchemy.types.DECIMAL as DECIMAL
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号