So I have the following PostgreSQL query:
INSERT INTO "Teams" ("name","createdAt","updatedAt")
VALUES ('SOMETHING','2021-01-19 12:33:20.323 +00:00','2021-01-19 12:33:20.323 +00:00')
ON CONFLICT DO NOTHING RETURNING *;
The table is as following:
CREATE TABLE "Teams" (
id integer NOT NULL,
name character varying(255),
"createdAt" timestamp with time zone NOT NULL,
"updatedAt" timestamp with time zone NOT NULL,
abbreviation character varying(255)
);
But If I run this +2 times every time a new record is inserted.
Any idea on why it is doing this, and mostly how to prevent it from creating new records?