-
-
Notifications
You must be signed in to change notification settings - Fork 117
Support decimal.Decimal type #110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
It definitely makes sense to me that this library should support Here are the current supported types: sqlite-utils/sqlite_utils/db.py Lines 35 to 55 in 396bee9
Should |
https://www.sqlite.org/datatype3.html#affinity_name_examples suggests that |
|
sqlite-utils/tests/test_column_affinity.py Lines 28 to 30 in daf2a24
|
I'm going to set it up so that Python |
In order to upstream the fix in the sqlite-utils repo (simonw/sqlite-utils#110) the version dependency needs to be bumped.
Decimal types in Postgres cause a failure in db.py data type selection
I have a Django app using a MoneyField, which uses a
numeric(14,0)
data type in Postgres (https://www.postgresql.org/docs/9.3/datatype-numeric.html). When attempting to export that table I get the following error:Looking at
sql_utils.db.py
at 292-ish it's clear that there is no matching type for what I assume SQLAlchemy interprets as Python decimal.Decimal.From the SQLite docs it looks like DECIMAL in other DBs are considered numeric.
I'm not quite sure if it's as simple as adding a data type to that list or if there are repercussions beyond it.
Thanks for a great tool!
The text was updated successfully, but these errors were encountered: