Skip to content

Group v4 Target Design

The generated diagram for this codebase accurately reflects its current state: this module does not yet depend on the drupal/group contrib module and has not implemented any Group domain entities, so --scope=all only ever surfaces Drupal core scaffolding.

The diagram below shows the entity model this initiative is meant to converge toward — Group v4, generated for reference via drush do_ops:erd --scope=group against the separate groups-on-d11 reference project, which does have drupal/group installed. It is included here so readers can see the intended target model while the real implementation is pending.

Latest 4.0 release: 4.0.0-alpha2, published 2026-08-21. Group v4 is not yet stable — only two alpha releases exist (4.0.0-alpha1, 2026-04-24, and 4.0.0-alpha2) and alpha releases are not covered by Drupal security advisories. See Group 3.3 to 4 Migration for what adopting it would involve.

This section is hand-authored reference content, not generator output. Unlike All Entities, it is not reproduced by running drush groupsdrupalorg:erd against this codebase, and it will need to be preserved or migrated by hand if this page is ever regenerated wholesale.

erDiagram
  comment {
    string label "Comment"
  }
  comment_type {
    string label "Comment type"
  }
  file {
    string label "File"
  }
  flag {
    string label "Flag"
  }
  flagging {
    string label "Flagging"
  }
  group {
    string label "Group"
  }
  group_relationship {
    string label "Group relationship"
  }
  group_relationship_type {
    string label "Group relationship type"
  }
  group_role {
    string label "Group role"
  }
  group_type {
    string label "Group type"
  }
  message {
    string label "Message"
  }
  message_template {
    string label "Message template"
  }
  node {
    string label "Content"
  }
  node_type {
    string label "Content type"
  }
  taxonomy_term {
    string label "Taxonomy term"
  }
  taxonomy_vocabulary {
    string label "Taxonomy vocabulary"
  }
  user {
    string label "User"
  }
  comment }o--|| comment : "pid"
  comment }o--|| comment_type : "comment_type"
  comment }o--|| comment_type : "type"
  comment }o--|| node : "entity_id"
  comment }o--|| user : "uid"
  flagging }o--|| flag : "flag_id"
  flagging }o--|| flag : "type"
  flagging }o--|| group : "flagged_entity"
  flagging }o--|| node : "flagged_entity"
  flagging }o--|| taxonomy_term : "flagged_entity"
  flagging }o--|| user : "flagged_entity"
  flagging }o--|| user : "uid"
  group }o--|| file : "field_group_image"
  group }o--|| group_type : "type"
  group }o--|| taxonomy_term : "field_group_type"
  group }o--|| user : "revision_uid"
  group }o--|| user : "uid"
  group_relationship }o--|| group : "gid"
  group_relationship }o--|| group_relationship_type : "type"
  group_relationship }o--o{ group_role : "group_roles"
  group_relationship }o--|| group_type : "group_type"
  group_relationship }o--|| node : "entity_id"
  group_relationship }o--|| user : "entity_id"
  group_relationship }o--|| user : "uid"
  message }o--|| group : "field_group_id"
  message }o--|| message_template : "template"
  message }o--|| message_template : "type"
  message }o--|| user : "uid"
  node }o--|| node_type : "type"
  taxonomy_term }o--|| taxonomy_vocabulary : "type"

group is the container entity, typed by group_type. group_relationship is the central mechanism — a generic, polymorphic join between a group and any entity (a user for membership, or a node for group-owned content), typed by group_relationship_type and carrying one or more group_role assignments. group_role defines permission sets scoped per group_type. flag/flagging and message/message_template are supporting contrib modules (Flag, Message) wired in for starring/reporting and notifications.

See Production Group Schema for what drupal.org’s live Groups feature actually runs today — a different, earlier major version of the same module.