Ruby-on-rails – rails – how to store large numbers, such as 100000076685963

I need to store a lot of numbers: 100000076685963

For the integer of the db field type, which is the larger one. In my database migration, I use :

t.integer :fb_uid

What field type should I use for such large numbers?

Thank you

You can use fixed-point data types with large precision, such as Decimal. According to the number you give, a precision of 15 will work, but you should know exactly what range you expect.

t.decimal :fb_fluid, :precision => 15

I need to store a lot of numbers: 100000076685963

For the integer of the db field type, which is the larger one. In my database migration, I use:

t.integer :fb_uid

What field type should I use for such large numbers?

Thank you

You can use fixed-point data types with large precision, such as decimal. According to the number you give, the precision is 15 Will work, but you should know exactly the range you expect.

t.decimal :fb_fluid, :precision => 15

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 3300 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.