Backporting sql based social feature to app manager repo.