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.
精彩评论