开发者

Store CSPC and UPC Codes in Rails

开发者 https://www.devze.com 2022-12-30 10:28 出处:网络
What the best way to store CSPC and UPC code开发者_如何学JAVAs are in Rails? I used integers with SQLite, but had overflow issues when moving to production. I\'ve since switch to strings, but am not s

What the best way to store CSPC and UPC code开发者_如何学JAVAs are in Rails? I used integers with SQLite, but had overflow issues when moving to production. I've since switch to strings, but am not sure if a better generic datatype (needs to support SQLite, MySQL and PostgreSQL).

Thanks.


Strings are a solid choice when you need generic like in your case. You should be fine.


In the project I am currently working on, we do not use rails, we use .NET and SQL server, we have it stored in two formats, nvarchar (or varchar in your case) and a bigint.

0

精彩评论

暂无评论...
验证码 换一张
取 消