-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[PM-13446] Add 'IsMultiOrgEnterprise' column to 'Provider' table #4903
[PM-13446] Add 'IsMultiOrgEnterprise' column to 'Provider' table #4903
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4903 +/- ##
=======================================
Coverage 41.74% 41.74%
=======================================
Files 1362 1362
Lines 63908 63909 +1
Branches 5857 5857
=======================================
+ Hits 26678 26679 +1
Misses 36024 36024
Partials 1206 1206 ☔ View full report in Codecov by Sentry. |
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.
Just a few things with your migration files.
@@ -0,0 +1,175 @@ | |||
-- Table | |||
IF OBJECT_ID('[dbo].[ClientOrganizationMigrationRecord]') IS NULL |
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.
❌ It looks like you might have forgot to update the SQL Server migration script. This is just creating an unrelated table that already exists. Yours will look more like this, but just with the new IsMultiOrgEnterprise
column.
namespace Bit.PostgresMigrations.Migrations; | ||
|
||
/// <inheritdoc /> | ||
public partial class AddIsMultiOrgEnterpriseColumn : Migration |
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.
❌ Looks like something got messed up with your EF Migration here. It appears to be rebuilding the entire database in this file. Check out your MySql migration file. That's what we want.
namespace Bit.SqliteMigrations.Migrations; | ||
|
||
/// <inheritdoc /> | ||
public partial class AddIsMultiOrgEnterpriseColumn : Migration |
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.
❌ Same thing here as with Postgres.
New Issues
Fixed Issues
|
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.
This seems like a perfect case for adding a new ProviderType
enum. Is there a reason we can't use that, or a particular need for adding a new column instead?
Hey @eliykat, we primarily decided against this because Multi-Enterprise Organizations are a subset of MSPs. Their functionality will be almost exactly the same as MSPs, but they will have different plan options during setup in the Bitwarden Portal. As such, it was my estimation that they don't actually represent a new provider type functionality-wise, but just an MSP that needs an indicator for a marginal functionality difference. This also allows us to re-use all of the existing Consolidated Billing functionality without having to add a new Enum check throughout the platform. |
I think I have two main concerns about this:
I admit I am not familiar with the consolidated billing code, but being able to have a simple enum check seems better to me than |
…nterprise-column-to-Provider-table
Understood, that seems valid and reasonable. We'll adjust the approach here accordingly. @jonashendrickx hold off on additional work here as we'll close this ticket and re-work the next one as the starting point. |
🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-13446
📔 Objective
Add an IsMultiOrgEnterprise column to the Provider table that will be used to differentiate between standard MSP’s and those who are multi-organization enterprises.
📸 Screenshots
⏰ Reminders before review
🦮 Reviewer guidelines
:+1:
) or similar for great changes:memo:
) or ℹ️ (:information_source:
) for notes or general info:question:
) for questions:thinking:
) or 💭 (:thought_balloon:
) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion:art:
) for suggestions / improvements:x:
) or:warning:
) for more significant problems or concerns needing attention:seedling:
) or ♻️ (:recycle:
) for future improvements or indications of technical debt:pick:
) for minor or nitpick changes