The type char has a fixed length and automatically blank pads the field. So if you create the field with char(5) and uses USD it'll be stored as USD, which will break Money's ability to load the value back. The correct type should be varchar instead. This isn't a big problem working with regular currencies since they all have three letters names, but when you enter crypto world there are currencies with 2, 3 and 4 letters.
The type
char
has a fixed length and automatically blank pads the field. So if you create the field withchar(5)
and usesUSD
it'll be stored asUSD
, which will break Money's ability to load the value back. The correct type should bevarchar
instead. This isn't a big problem working with regular currencies since they all have three letters names, but when you enter crypto world there are currencies with 2, 3 and 4 letters.