Skip to content

support "numeric" as a valid data type#154

Open
czue wants to merge 4 commits into
masterfrom
cz/numeric-types
Open

support "numeric" as a valid data type#154
czue wants to merge 4 commits into
masterfrom
cz/numeric-types

Conversation

@czue
Copy link
Copy Markdown
Member

@czue czue commented Jul 10, 2020

this allows you to use decimal values - one use case is for lat/lon from a GPS coordinate.

@czue czue requested review from millerdev and snopoke July 10, 2020 07:46
@czue
Copy link
Copy Markdown
Member Author

czue commented Jul 10, 2020

ugh looks like MS and MySQL both treat Numeric types as integers. wondering whether I should just change the test or figure out a way to make this smarter.

Comment thread commcare_export/data_types.py Outdated
DATA_TYPE_DATETIME: sqlalchemy.DateTime(),
DATA_TYPE_DATE: sqlalchemy.Date(),
DATA_TYPE_INTEGER: sqlalchemy.Integer(),
DATA_TYPE_NUMERIC: sqlalchemy.Numeric(),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if you use DECIMAL?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, good idea, I'll try that

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, still looks like it's getting rounded. Will do a little more digging when I get time to set up MS or MySQL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants