DROP TABLE IF EXISTS public.foo;

CREATE TABLE public.foo (
    a integer NOT NULL
);

CREATE UNIQUE INDEX foo_a_idx ON public.foo USING btree (a);

ALTER TABLE ONLY public.foo
    ADD CONSTRAINT foo_a_idx PRIMARY KEY USING INDEX foo_a_idx;
