Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch sequelize-auto@0.8.6 for a project I'm working on.
The TypeScript types generated for the Postgres BIGINT DataType are incorrect. Since Postgres BIGINT values are too large to fit into JavaScript integers, Sequelize maps them to JavaScript strings to avoid loss of resolution. With the incorrect TypeScript types, this resulted in some tricky errors for us, where TypeScript missed incorrect math operations on the BIGINT string ('10' + 10 = '1010'), or incorrect comparisons ('5' === 5 -> false).
In Postgres, BIGINT values are often used for numbers that could grow larger than JavaScript integers, and in particular, for auto-incrementing primary keys.
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch
sequelize-auto@0.8.6
for a project I'm working on.The TypeScript types generated for the Postgres BIGINT DataType are incorrect. Since Postgres BIGINT values are too large to fit into JavaScript integers, Sequelize maps them to JavaScript strings to avoid loss of resolution. With the incorrect TypeScript types, this resulted in some tricky errors for us, where TypeScript missed incorrect math operations on the BIGINT string ('10' + 10 = '1010'), or incorrect comparisons ('5' === 5 -> false).
In Postgres, BIGINT values are often used for numbers that could grow larger than JavaScript integers, and in particular, for auto-incrementing primary keys.
Here is the diff that solved my problem:
This issue body was partially generated by patch-package.