Using Supabase and Prisma getting cannot use column reference in DEFAULT expression

Hi all, as mentioned in another channel (https://discord.com/channels/839993398554656828/839993398554656831/1047382246073581578) Prisma has released 4.7.0 which means it supports schemas now. I am trying to use the auth schema. At first this looks relatively good, when running prisma db pull my schema.prisma file is populated. However then generating the SQL migration there seems to be an issue with:
"confirmed_at" TIMESTAMPTZ(6) DEFAULT LEAST(email_confirmed_at, phone_confirmed_at),

getting a cannot use column reference in DEFAULT expression
I've tried adding single or double quotes around the column names.
Would I have to add a trigger here or am I missing something? Recognise this is possibly more of a Prisma/SQL question but asking here because I think there might be others going to hit this as well.
Screenshot_2022-12-01_at_21.58.42.png
Was this page helpful?