ksindi/flask-sqlacodegen

Option to db.Float(11, False) or db.Float(11, True)

kylozw opened this issue · 1 comments

Now the tools generate db.Column(db.Float(11, True)) for double type fields. In other words, the asdecimal is set to True, and the field type of python object is Decimal. Unfortunately, the default json model don't support Decimal.

I change the asdecimal to False manually to solve json parse. It's better there's an option when generating models.

thanks @kylozw. feel free to make a PR. unclear to me what the behavior should be.