I need to store large numbers, for example: 100000076685963
What are the large values for the db integer field type. In my db migration, I use:
t.integer :fb_uid
what type of field should be used for large numbers?
thank
You can use a fixed point data type such as decimal with great precision. Based on the quantity you specified, accuracy of 15 will work, but you must determine exactly what range you expect.
t.decimal :fb_fluid, :precision => 15
Try a bobber
t.float :fb_uid
, - Facebook (, facebooker), , ,
t.string :fb_uid
You need to set the field limitfor the column to get Postgresql precision bigint:
limit
bigint
t.integer :fb_uid, limit: 8