MySQL datatypes ranges (out of range)
nemlukai
PROOP

a month ago

Hi, I am getting an error for database when trying insert time unix value to field (INTEGER).

(pymysql.err.DataError) (1264, \"Out of range value for column 'ts' at row 1\")

i.e. 1770672600000, log shows out-of range. I was not able to find any docs for datatypes within Railway DB…I am not well informed what ranges are allowed for available datatypes. Can anyone tell me and reccomend how to store this unix time value in miliseconds?

$10 Bounty

6 Replies

a month ago

Is this error from the Railway UI?


nemlukai
PROOP

a month ago

From deploy log.

{"message":"(fn) dbinsertrouter: Data routing to database failed - (pymysql.err.DataError) (1264, \"Out of range value for column 'ts' at row 1\")","attributes":{"level":"info"},"timestamp":"2026-02-09T22:00:05.207770277Z"}


nemlukai
PROOP

a month ago

I cannot insert this value…there is not option to select bigint in datatypes options.


nemlukai
PROOP

a month ago

I am currently saving unix in seconds as it is equal to int capacity. I would still appreciate some source docs for applicable mysql datatype ranges for listed options when setting DB in Railway. Does exist any source?


a month ago

It's just standard MySQL, nothing at all Railway-specific, so I will open this thread up to the community so they can assist.


a month ago

the value 1770672600000 is far greater than the maximum value for INT type, as you can see here https://dev.mysql.com/doc/refman/8.0/en/integer-types.html

you probably want modify the ts column to be something else, like a VARCHAR.


Loading...