Blankman
Blankman

Reputation: 266988

sqlachemy, says 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?

I'm using mysql.

Upvotes: 1

Views: 1538

Answers (1)

GWW
GWW

Reputation: 44093

try

import sqlalchemy.types.DECIMAL as DECIMAL

Upvotes: 3

Related Questions