Heroku / Postgres error: integer out of range

I get the message PGError: ERROR: integer out of range from trying to insert the following integer: 100001389928198.

According to the Postgres docs on numerical data types, the limit is much higher (9223372036854775807). I feel like Heroku treats the column as a regular integer, not a BIGINT.

I defined migration as BIGINT as such:

 t.column :uid, :bigint 

Is this incorrect in terms of Heroku migrations?

+6
source share
1 answer

I'm not sure if t.column matches change_column or not, but here's how according to api

 change_column :table_name, :uid, :bigint 
+9
source

Source: https://habr.com/ru/post/895893/


All Articles