Relationships

Table relationships and foreign keys

Relationships

One-to-Many

  • Contact → ContactProgression (one contact has many progression entries)
  • StaffUser → News (via created_by, updated_by)

Many-to-Many

  • Action ↔ Tag (via ActionTag)
  • News ↔ Tag (via NewsTag)
  • Event ↔ Tag (via EventTag)
  • StaffUser ↔ Role (via UserRole)

Foreign Keys

Cascade Deletes:

  • UserRole → StaffUser (CASCADE)
  • UserRole → Role (CASCADE)
  • ContactProgression → Contact (CASCADE)

Set Null:

  • Content created_by → StaffUser (SET NULL)