MySQL datatypes ranges (out of range)
nemlukai
PROOP

5 months 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

5 months ago

Is this error from the Railway UI?


nemlukai
PROOP

5 months ago

From deploy log.

{"message":"(fn) db_insert_router: 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

5 months ago

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


nemlukai
PROOP

5 months 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?


5 months 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.


5 months 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.


Welcome!

Sign in to your Railway account to join the conversation.

Loading...