HoaxKey
HoaxKey
DTDrizzle Team
Created by HoaxKey on 11/3/2024 in #help
Insert IF NOT EXISTS
Ok ive updated the schema, managed the migrations, I think its now triggering, but the returning() part doesnt seem to work for the already existing row.
6 replies
DTDrizzle Team
Created by HoaxKey on 11/3/2024 in #help
Insert IF NOT EXISTS
ah ok, so there is no violation to be caught because my table schema is this: export const resources = pgTable("resources", { id: varchar("id", { length: 191 }) .primaryKey() .$defaultFn(() => nanoid()), content: text("content").notNull(), createdAt: timestamp("created_at") .notNull() .default(sqlnow()), updatedAt: timestamp("updated_at") .notNull() .default(sqlnow()), });
6 replies