Generate column from another column postgresql

CREATE TABLE IF NOT EXISTS "Organizations" (
"id" SERIAL,
"name" VARCHAR(255),
"lowercaseName" VARCHAR(255) GENERATED ALWAYS AS (LOWER("name")) STORED,

PRIMARY KEY("id"),
UNIQUE("lowercaseName")
);
CREATE TABLE IF NOT EXISTS "Organizations" (
"id" SERIAL,
"name" VARCHAR(255),
"lowercaseName" VARCHAR(255) GENERATED ALWAYS AS (LOWER("name")) STORED,

PRIMARY KEY("id"),
UNIQUE("lowercaseName")
);
Hi guys, I've been watching the docs and the discord server for quite some time and I haven't been able to find instructions about this use case using drizzle. Thank you
1 Reply
Angelelz
Angelelz14mo ago
I have a generated column in my codebase. You can use this as example: https://discord.com/channels/1043890932593987624/1156712008893354084/1156716755125796934
Want results from more Discord servers?
Add your server