fixed type comparison for Decimal with scale but without precision

Declined
#70 · Created  · Last updated

Declined pull request

Dear contributor - This pull request is being moved to Gerrit, at https://gerrit.sqlalchemy.org/488, where it may be tested and reviewed more closely. As such, the pull request itself is being marked "closed" or "declined", however your contribution is merely being moved to our central review system. Please register at https://gerrit.sqlalchemy.org#/register/ to send and receive comments regarding this item.

Closed by: ·2017-08-25

Description

If the user were to specify the Numeric(scale=N) without any precision, sqlalchemy would generate not specialised NUMERIC data type for a DDL (@see: https://bitbucket.org/zzzeek/sqlalchemy/src/63d47c051d92ffa78f1006d9c9f83f1508bc358e/lib/sqlalchemy/sql/compiler.py?at=master&fileviewer=file-view-default#compiler.py-2734)

However, this would always result in a type check detection on alembic, although this type change will not be applied.

It probably is a big mistake for the user to specify scale without the precision. However, for consistency reasons this fix should be applied. Alternatively, a warning in the above linked visit_NUMERIC function should be generated for such case.

0 attachments

0 comments

Loading commits...