System Tenants Schema
System tenants define the hard security boundary for nearly all Nexus objects.
Namespace
This table should move into the platform PostgreSQL schema.
platform.tenants
Tables
platform.tenants
Tenant root object.
- Primary key:
id - Required fields:
name,tenant_admin_group_id,tenant_users_group_id - Unique field:
name - Foreign keys:
id -> platform.user_groups.idtenant_admin_group_id -> platform.user_groups.idtenant_users_group_id -> platform.user_groups.id
The tenant object stays in platform because it is a System security boundary rather than a business-domain record.
Relationship Scope
The following core tables include a required tenant_id foreign key to platform.tenants.id:
platform.revoked_tokensplatform.user_groupsplatform.user_group_membershipsassets.asset_modelsassets.assetsassets.asset_assignmentsassets.asset_circulationsassets.asset_repairsassets.asset_manufacturersassets.asset_typescensus.personscensus.identitiescensus.schoolscensus.school_yearscensus.school_calendarscensus.school_enrollmentscensus.school_employmentscensus.school_employment_assignmentslocations.location_typeslocations.locationspublic.projectspublic.issues
This means platform.tenants becomes the primary cross-schema anchor for the rest of the database.
platform.users is deliberately excluded from this list because users are now platform-global accounts rather than tenant-owned rows.
Seeded Shared Tenant
Current migrations keep a shared tenant with fixed ID:
00000000000000000000000000
Recent migration history renames this from root/default naming to shared naming.