-
Notifications
You must be signed in to change notification settings - Fork 0
fix: allow multiple registries per organization #57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…registry support - Updated `apps/web/package.json` version to `0.11.6`. - Modified Prisma schema to enable support for multiple registries per organization. - Added migration to drop `registryId` column, create a join table, and update relationships.
WalkthroughThis PR converts the Organization-Registry relationship from one-to-one optional to many-to-many by introducing a join table in the database migration and updating the Prisma schema. The web package version is also bumped to 0.11.6. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
apps/web/package.json(1 hunks)packages/db/prisma/migrations/20251211125015_allow_multiple_registries_on_organization/migration.sql(1 hunks)packages/db/prisma/schema.prisma(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Agent
🔇 Additional comments (2)
apps/web/package.json (1)
3-3: Version bump is appropriate for this database migration.A patch version increment signals to operators that a database migration is required when deploying this version. This is the correct versioning practice.
packages/db/prisma/schema.prisma (1)
132-132: Schema relationship change is correctly defined.The conversion to a many-to-many implicit relation is properly implemented. The columns in the join table follow Prisma's requirement where A points to Organization (alphabetically first) and B points to Registry, and the inverse
organizationsrelation on the Registry model completes the bidirectional relationship.
.../db/prisma/migrations/20251211125015_allow_multiple_registries_on_organization/migration.sql
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR enables organizations to associate with multiple registries instead of being limited to a single registry. The change modifies the database schema from a one-to-one relationship to a many-to-many relationship between Organization and Registry models, using Prisma's implicit join table pattern.
Key Changes:
- Updated Organization-Registry relationship from one-to-one to many-to-many in the Prisma schema
- Added database migration to drop the
registryIdcolumn and create the_OrganizationToRegistryjoin table - Bumped web application version to 0.11.6
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/db/prisma/schema.prisma | Changed Organization model's registries field from optional singular Registry reference to plural Registry array, enabling many-to-many relationship |
| packages/db/prisma/migrations/20251211125015_allow_multiple_registries_on_organization/migration.sql | Added migration to drop foreign key constraint, remove registryId column, and create implicit join table with proper indexes and constraints |
| apps/web/package.json | Bumped version from 0.11.5 to 0.11.6 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
apps/web/package.jsonversion to0.11.6.registryIdcolumn, create a join table, and update relationships.Summary by CodeRabbit
New Features
Chores
✏️ Tip: You can customize this high-level summary in your review settings.