You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
In reference to issue #838. The GraphQL part is fixed in v2.0. But default Postgres migration is still using 4 byte int for money columns which leads to error when adding items to cart which will set the new total > 21,474,836.47.
To Reproduce
Steps to reproduce the behavior:
Add items to cart until total would be set to something > 21,474,836.47
Get error message something went wrong
Expected behavior
Should be able to add more than 21,474,836.47 total into cart
Environment (please complete the following information):
Ah yes I went in and tested with BigInt strategy but since there are products already, the migration fails due to price column for existing data being null. This is because the migration generator does a simple drop column and add new column.
I guess this should be a rare case since people should set their money strategy upfront before adding any products.
It's a minor issue when adding the populateProducts option during @vendure/create having populated products assuming the DefaultStrategy. Probably documentation note will suffice.
For those who encounter the same problem:
When generating your vendure project do not choose to populate products
Set BigIntMoneyStrategy for your entityOptions.moneyStrategy in vendure config, see doc
run yarn migration:generate <some_name_for_migration>
Run the app normally and it should automatically migrate the database
Describe the bug
In reference to issue #838. The GraphQL part is fixed in v2.0. But default Postgres migration is still using 4 byte int for money columns which leads to error when adding items to cart which will set the new total > 21,474,836.47.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Should be able to add more than 21,474,836.47 total into cart
Environment (please complete the following information):
Additional context
Discord help: https://discord.com/channels/1100672177260478564/1116266274452942918
The text was updated successfully, but these errors were encountered: