The barcode should be treated as a string in the database to allow more general IDs to be used. One important point is that barcodes such as "0" and "0000" would be distinct as strings but not as integers.
In addition, unit tests need to be updated to account for this potentially. At present ,"00000000" is commonly used as a test barcode, but it would be preferable to use one which is unique as both an integer and as a string.
The barcode should be treated as a string in the database to allow more general IDs to be used. One important point is that barcodes such as "0" and "0000" would be distinct as strings but not as integers.
In addition, unit tests need to be updated to account for this potentially. At present ,"00000000" is commonly used as a test barcode, but it would be preferable to use one which is unique as both an integer and as a string.