neon
neon

Reputation: 2821

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?

Upvotes: 6

Views: 4352

Answers (1)

YOU
YOU

Reputation: 123841

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

Upvotes: 9

Related Questions