4

What is default integer limit in PostrgreSQL database for Rails 3?

That's the question.

B Seven
  • 44,484
  • 66
  • 240
  • 385

1 Answers1

7

By default, Rails will use PostgreSQL's integer type, which has a range of -2147483648 to +2147483647.

Community
  • 1
  • 1
Larsenal
  • 49,878
  • 43
  • 152
  • 220
  • Can you get it to use a bigint? That's 2^63-1 max. – Scott Marlowe Sep 29 '11 at 20:03
  • @ScottMarlowe This is an old question, but here's a link that shows how to change the column type for Rails: http://stackoverflow.com/questions/7061239/rails-migration-bigint-on-postgresql-seems-to-be-failing – Nick Feb 01 '16 at 14:06