How to reference the same table in the table's definition?

I am defining this table menuItem and I want this table to support multi-levels, so I am adding a parentId column that should reference this own column
id
. How should I do it with Drizzle ORM?

My attempt failed with a TypeScript error, as you can see in the printscreen. I am using postgres, if that matters.

Thank you!
image.png
Was this page helpful?