Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Heroku / Postgres Error: integer out of range

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

According to the Postgres docs on numeric datatypes the limit is much higher (9223372036854775807). I have a feeling Heroku is treating the column as a regular integer rather than a BIGINT.

I defined the migration as a BIGINT as such:

t.column :uid, :bigint

is this not correct in terms of Heroku migrations?

like image 532
neon Avatar asked Aug 25 '11 16:08

neon


1 Answers

I am not sure t.column is same as change_column or not, but here is how according to api

change_column :table_name, :uid, :bigint
like image 76
YOU Avatar answered Oct 25 '22 03:10

YOU