Remove Organizations
Remove multi-tenant team management and RBAC.
Steps
-
Delete directories and files:
app/api/organizations/(CRUD, members, invitations endpoints)hooks/core/use-organizations.ts(client-side org hooks)components/core/dashboard/organization/(org UI components)lib/rbac.ts(role-based access control helpers)
-
Update Prisma schema (
prisma/schema.prisma):- Remove the
OrgRoleenum - Remove the
InviteStatusenum - Remove the
Organizationmodel - Remove the
OrganizationMembermodel - Remove the
OrgInvitationmodel - Remove
activeOrgIdfrom theUsermodel - Remove the
membersrelation from theUsermodel
- Remove the
-
Disable the feature flag: Set
NEXT_PUBLIC_ENABLE_ORGANIZATIONS=falsein.env, or delete the line fromlib/config/features.ts. -
Run
pnpm db:pushto sync the schema.