SQL schema: Added missing entity_id field that links with users or groups tables (depending upon value of entity_type)