I\'m trying to save a number representing the length of a file (4825733517). The column is set to type integer. I don\'t have any validations or restrictions set.
According to the PostgreSQL documentation an integer have a range from -2147483648 to +2147483647. So your number is to big for this type.
Update your column and use the parameter limit to indicate that you want to have a bigint.
bigint
change_column :table, :column, :integer, limit: 8