Add a Exclusion Constraint for Postgres

I want to add an exclusion constraint to a table where I want to make sure there is only one row with flag set to true.

Regular SQL would look like this,
CREATE TABLE my_table
(
    id serial NOT NULL,
    name text,
    actual boolean DEFAULT false,
    CONSTRAINT my_table_pkey PRIMARY KEY (id),
    EXCLUDE (actual WITH =) WHERE (actual)
);


Is there any way I can do this with Drizzle?
Was this page helpful?