DO $$
BEGIN
  IF NOT EXISTS (
    SELECT 1
      FROM pg_enum e
      JOIN pg_type t ON t.oid = e.enumtypid
     WHERE t.typname = 'conf_level'
       AND e.enumlabel = 'oeffentlich'
  ) THEN
    ALTER TYPE conf_level ADD VALUE 'oeffentlich';
  END IF;
END $$;
