fix(documentation): use bigint instead of integer#233
Open
davidalencar wants to merge 1 commit intoelixirmoney:masterfrom
Open
fix(documentation): use bigint instead of integer#233davidalencar wants to merge 1 commit intoelixirmoney:masterfrom
davidalencar wants to merge 1 commit intoelixirmoney:masterfrom
Conversation
Author
|
When we first implemented it, we simply followed the documentation and created our complex type using integer, which corresponds to an int32. However, when financial transactions in our application started to involve larger amounts, we exceeded the capacity of int32. By that point, the complex type money_with_currency was already in use across multiple tables in PostgreSQL and couldn’t be modified. We were forced to create a new type in the database using bigint (int64) and a new type in Elixir, which we named bigmoney. We had to migrate the data from the old fields that used the complex type with integer, and this migration took weeks and a lot of effort. This simple change I'm proposing will save a lot of work and headaches. =) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updating the documentation to guide users on creating their complex type using bigint instead of integer.