I am getting a value "1574799549227" is out of range for type integer error when trying to insert into a brand new table on a brand new database. I am using node with the pg module.
db
.query(`INSERT INTO users (uuid, email, password, created_at, updated_at) VALUES ($1, $2, $3, to_timestamp($4 / 1000), to_timestamp($4 / 1000))`,
[uuid, email, password, Date.now()])
.catch((err) => {
console.log(err);
});
This is the table
CREATE TABLE public.users
(
id serial,
uuid uuid,
email character varying,
password character varying,
created_at timestamp with time zone,
updated_at timestamp with time zone,
CONSTRAINT user_id_pk PRIMARY KEY (id)
)
I have also tried reseting the sequence number for the id field