DO $$
BEGIN
IF NOT EXISTS (SELECT 1 FROM pg_type WHERE typname = 'UserRole') THEN
CREATE TYPE "UserRole" AS ENUM ('USER', 'ADMIN', 'TEMP');
END IF;
END$$;
DO $$
BEGIN
IF NOT EXISTS (SELECT 1 FROM pg_type WHERE typname = 'UserRole') THEN
CREATE TYPE "UserRole" AS ENUM ('USER', 'ADMIN', 'TEMP');
END IF;
END$$;