From a3f554a34e7a2b47a7071ce399df163deab29aa8 Mon Sep 17 00:00:00 2001 From: Thomas Rittson <31796059+eliykat@users.noreply.github.com> Date: Wed, 27 Sep 2023 07:37:34 +1000 Subject: [PATCH] [AC-1646] Rename LimitCollectionCdOwnerAdmin column (#3300) * Rename LimitCollectionCdOwnerAdmin -> LimitCollectionCreationDeletion * Rename and bump migration script --- ...nCollectionManagementUpdateRequestModel.cs | 2 +- .../OrganizationResponseModel.cs | 4 +-- .../ProfileOrganizationResponseModel.cs | 4 +-- .../CollectionAuthorizationHandler.cs | 4 +-- src/Core/Context/CurrentContext.cs | 2 +- .../Context/CurrentContextOrganization.cs | 4 +-- src/Core/Entities/Organization.cs | 2 +- .../OrganizationUserOrganizationDetails.cs | 2 +- .../SelfHostedOrganizationDetails.cs | 2 +- .../Repositories/DatabaseContext.cs | 2 +- .../Stored Procedures/Organization_Create.sql | 8 ++--- .../Stored Procedures/Organization_Update.sql | 4 +-- src/Sql/dbo/Tables/Organization.sql | 2 +- ...rganizationUserOrganizationDetailsView.sql | 2 +- .../CollectionAuthorizationHandlerTests.cs | 4 +-- ...26_00_LimitCollectionCreationDeletion.sql} | 32 +++++++++---------- ...49_LimitCollectionCreateDelete.Designer.cs | 2 +- ...30807181649_LimitCollectionCreateDelete.cs | 4 +-- .../DatabaseContextModelSnapshot.cs | 2 +- ...53_LimitCollectionCreateDelete.Designer.cs | 2 +- ...30807181653_LimitCollectionCreateDelete.cs | 4 +-- .../DatabaseContextModelSnapshot.cs | 2 +- ...57_LimitCollectionCreateDelete.Designer.cs | 2 +- ...30807181657_LimitCollectionCreateDelete.cs | 4 +-- .../DatabaseContextModelSnapshot.cs | 2 +- 25 files changed, 52 insertions(+), 52 deletions(-) rename util/Migrator/DbScripts/{2023-07-31_00_LimitCollectionCreateDelete.sql => 2023-09-26_00_LimitCollectionCreationDeletion.sql} (93%) diff --git a/src/Api/Models/Request/Organizations/OrganizationCollectionManagementUpdateRequestModel.cs b/src/Api/Models/Request/Organizations/OrganizationCollectionManagementUpdateRequestModel.cs index bae01f907c..de370f714d 100644 --- a/src/Api/Models/Request/Organizations/OrganizationCollectionManagementUpdateRequestModel.cs +++ b/src/Api/Models/Request/Organizations/OrganizationCollectionManagementUpdateRequestModel.cs @@ -8,7 +8,7 @@ public class OrganizationCollectionManagementUpdateRequestModel public virtual Organization ToOrganization(Organization existingOrganization) { - existingOrganization.LimitCollectionCdOwnerAdmin = LimitCreateDeleteOwnerAdmin; + existingOrganization.LimitCollectionCreationDeletion = LimitCreateDeleteOwnerAdmin; return existingOrganization; } } diff --git a/src/Api/Models/Response/Organizations/OrganizationResponseModel.cs b/src/Api/Models/Response/Organizations/OrganizationResponseModel.cs index 7a09332f91..7c3993c587 100644 --- a/src/Api/Models/Response/Organizations/OrganizationResponseModel.cs +++ b/src/Api/Models/Response/Organizations/OrganizationResponseModel.cs @@ -58,7 +58,7 @@ public class OrganizationResponseModel : ResponseModel SmServiceAccounts = organization.SmServiceAccounts; MaxAutoscaleSmSeats = organization.MaxAutoscaleSmSeats; MaxAutoscaleSmServiceAccounts = organization.MaxAutoscaleSmServiceAccounts; - LimitCollectionCdOwnerAdmin = organization.LimitCollectionCdOwnerAdmin; + LimitCollectionCreationDeletion = organization.LimitCollectionCreationDeletion; } public Guid Id { get; set; } @@ -98,7 +98,7 @@ public class OrganizationResponseModel : ResponseModel public int? SmServiceAccounts { get; set; } public int? MaxAutoscaleSmSeats { get; set; } public int? MaxAutoscaleSmServiceAccounts { get; set; } - public bool LimitCollectionCdOwnerAdmin { get; set; } + public bool LimitCollectionCreationDeletion { get; set; } } public class OrganizationSubscriptionResponseModel : OrganizationResponseModel diff --git a/src/Api/Models/Response/ProfileOrganizationResponseModel.cs b/src/Api/Models/Response/ProfileOrganizationResponseModel.cs index 498b92e4cc..4a3c5bb032 100644 --- a/src/Api/Models/Response/ProfileOrganizationResponseModel.cs +++ b/src/Api/Models/Response/ProfileOrganizationResponseModel.cs @@ -60,7 +60,7 @@ public class ProfileOrganizationResponseModel : ResponseModel FamilySponsorshipToDelete = organization.FamilySponsorshipToDelete; FamilySponsorshipValidUntil = organization.FamilySponsorshipValidUntil; AccessSecretsManager = organization.AccessSecretsManager; - LimitCollectionCdOwnerAdmin = organization.LimitCollectionCdOwnerAdmin; + LimitCollectionCreationDeletion = organization.LimitCollectionCreationDeletion; if (organization.SsoConfig != null) { @@ -114,5 +114,5 @@ public class ProfileOrganizationResponseModel : ResponseModel public DateTime? FamilySponsorshipValidUntil { get; set; } public bool? FamilySponsorshipToDelete { get; set; } public bool AccessSecretsManager { get; set; } - public bool LimitCollectionCdOwnerAdmin { get; set; } + public bool LimitCollectionCreationDeletion { get; set; } } diff --git a/src/Api/Vault/AuthorizationHandlers/Collections/CollectionAuthorizationHandler.cs b/src/Api/Vault/AuthorizationHandlers/Collections/CollectionAuthorizationHandler.cs index 702f35bb52..17e02d4628 100644 --- a/src/Api/Vault/AuthorizationHandlers/Collections/CollectionAuthorizationHandler.cs +++ b/src/Api/Vault/AuthorizationHandlers/Collections/CollectionAuthorizationHandler.cs @@ -71,7 +71,7 @@ public class CollectionAuthorizationHandler : BulkAuthorizationHandler(orgUser.Permissions); AccessSecretsManager = orgUser.AccessSecretsManager && orgUser.UseSecretsManager; - LimitCollectionCdOwnerAdmin = orgUser.LimitCollectionCdOwnerAdmin; + LimitCollectionCreationDeletion = orgUser.LimitCollectionCreationDeletion; } public Guid Id { get; set; } public OrganizationUserType Type { get; set; } public Permissions Permissions { get; set; } = new(); public bool AccessSecretsManager { get; set; } - public bool LimitCollectionCdOwnerAdmin { get; set; } + public bool LimitCollectionCreationDeletion { get; set; } } diff --git a/src/Core/Entities/Organization.cs b/src/Core/Entities/Organization.cs index d26844c35b..32d404d2ae 100644 --- a/src/Core/Entities/Organization.cs +++ b/src/Core/Entities/Organization.cs @@ -81,7 +81,7 @@ public class Organization : ITableObject, ISubscriber, IStorable, IStorabl /// /// Refers to the ability for an organization to limit collection creation and deletion to owners and admins only /// - public bool LimitCollectionCdOwnerAdmin { get; set; } + public bool LimitCollectionCreationDeletion { get; set; } public void SetNewId() { diff --git a/src/Core/Models/Data/Organizations/OrganizationUsers/OrganizationUserOrganizationDetails.cs b/src/Core/Models/Data/Organizations/OrganizationUsers/OrganizationUserOrganizationDetails.cs index 8989dcca1b..428f79da01 100644 --- a/src/Core/Models/Data/Organizations/OrganizationUsers/OrganizationUserOrganizationDetails.cs +++ b/src/Core/Models/Data/Organizations/OrganizationUsers/OrganizationUserOrganizationDetails.cs @@ -48,5 +48,5 @@ public class OrganizationUserOrganizationDetails public bool UsePasswordManager { get; set; } public int? SmSeats { get; set; } public int? SmServiceAccounts { get; set; } - public bool LimitCollectionCdOwnerAdmin { get; set; } + public bool LimitCollectionCreationDeletion { get; set; } } diff --git a/src/Core/Models/Data/Organizations/SelfHostedOrganizationDetails.cs b/src/Core/Models/Data/Organizations/SelfHostedOrganizationDetails.cs index d645021495..d501263f4e 100644 --- a/src/Core/Models/Data/Organizations/SelfHostedOrganizationDetails.cs +++ b/src/Core/Models/Data/Organizations/SelfHostedOrganizationDetails.cs @@ -142,7 +142,7 @@ public class SelfHostedOrganizationDetails : Organization RevisionDate = RevisionDate, MaxAutoscaleSeats = MaxAutoscaleSeats, OwnersNotifiedOfAutoscaling = OwnersNotifiedOfAutoscaling, - LimitCollectionCdOwnerAdmin = LimitCollectionCdOwnerAdmin, + LimitCollectionCreationDeletion = LimitCollectionCreationDeletion, }; } } diff --git a/src/Infrastructure.EntityFramework/Repositories/DatabaseContext.cs b/src/Infrastructure.EntityFramework/Repositories/DatabaseContext.cs index d4079e7984..bf10d6d559 100644 --- a/src/Infrastructure.EntityFramework/Repositories/DatabaseContext.cs +++ b/src/Infrastructure.EntityFramework/Repositories/DatabaseContext.cs @@ -107,7 +107,7 @@ public class DatabaseContext : DbContext eGroup.Property(c => c.Id).ValueGeneratedNever(); eInstallation.Property(c => c.Id).ValueGeneratedNever(); eOrganization.Property(c => c.Id).ValueGeneratedNever(); - eOrganization.Property(c => c.LimitCollectionCdOwnerAdmin) + eOrganization.Property(c => c.LimitCollectionCreationDeletion) .ValueGeneratedNever() .HasDefaultValue(true); eOrganizationSponsorship.Property(c => c.Id).ValueGeneratedNever(); diff --git a/src/Sql/dbo/Stored Procedures/Organization_Create.sql b/src/Sql/dbo/Stored Procedures/Organization_Create.sql index 53dbd2b4b7..856a58d3e8 100644 --- a/src/Sql/dbo/Stored Procedures/Organization_Create.sql +++ b/src/Sql/dbo/Stored Procedures/Organization_Create.sql @@ -51,7 +51,7 @@ @MaxAutoscaleSmSeats INT= null, @MaxAutoscaleSmServiceAccounts INT = null, @SecretsManagerBeta BIT = 0, - @LimitCollectionCdOwnerAdmin BIT = 0 + @LimitCollectionCreationDeletion BIT = 0 AS BEGIN SET NOCOUNT ON @@ -110,7 +110,7 @@ BEGIN [MaxAutoscaleSmSeats], [MaxAutoscaleSmServiceAccounts], [SecretsManagerBeta], - [LimitCollectionCdOwnerAdmin] + [LimitCollectionCreationDeletion] ) VALUES ( @@ -166,6 +166,6 @@ BEGIN @MaxAutoscaleSmSeats, @MaxAutoscaleSmServiceAccounts, @SecretsManagerBeta, - @LimitCollectionCdOwnerAdmin + @LimitCollectionCreationDeletion ) -END \ No newline at end of file +END diff --git a/src/Sql/dbo/Stored Procedures/Organization_Update.sql b/src/Sql/dbo/Stored Procedures/Organization_Update.sql index 7df325228f..35412c02cf 100644 --- a/src/Sql/dbo/Stored Procedures/Organization_Update.sql +++ b/src/Sql/dbo/Stored Procedures/Organization_Update.sql @@ -51,7 +51,7 @@ @MaxAutoscaleSmSeats INT = null, @MaxAutoscaleSmServiceAccounts INT = null, @SecretsManagerBeta BIT = 0, - @LimitCollectionCdOwnerAdmin BIT = 1 + @LimitCollectionCreationDeletion BIT = 1 AS BEGIN SET NOCOUNT ON @@ -110,7 +110,7 @@ BEGIN [MaxAutoscaleSmSeats] = @MaxAutoscaleSmSeats, [MaxAutoscaleSmServiceAccounts] = @MaxAutoscaleSmServiceAccounts, [SecretsManagerBeta] = @SecretsManagerBeta, - [LimitCollectionCdOwnerAdmin] = @LimitCollectionCdOwnerAdmin + [LimitCollectionCreationDeletion] = @LimitCollectionCreationDeletion WHERE [Id] = @Id END diff --git a/src/Sql/dbo/Tables/Organization.sql b/src/Sql/dbo/Tables/Organization.sql index 8ac47754be..b3907f6a61 100644 --- a/src/Sql/dbo/Tables/Organization.sql +++ b/src/Sql/dbo/Tables/Organization.sql @@ -51,7 +51,7 @@ [MaxAutoscaleSmSeats] INT NULL, [MaxAutoscaleSmServiceAccounts] INT NULL, [SecretsManagerBeta] BIT NOT NULL CONSTRAINT [DF_Organization_SecretsManagerBeta] DEFAULT (0), - [LimitCollectionCdOwnerAdmin] BIT NOT NULL CONSTRAINT [DF_Organization_LimitCollectionCdOwnerAdmin] DEFAULT (1), + [LimitCollectionCreationDeletion] BIT NOT NULL CONSTRAINT [DF_Organization_LimitCollectionCreationDeletion] DEFAULT (1), CONSTRAINT [PK_Organization] PRIMARY KEY CLUSTERED ([Id] ASC) ); diff --git a/src/Sql/dbo/Views/OrganizationUserOrganizationDetailsView.sql b/src/Sql/dbo/Views/OrganizationUserOrganizationDetailsView.sql index 5ed7da7ace..fdddc0cdb5 100644 --- a/src/Sql/dbo/Views/OrganizationUserOrganizationDetailsView.sql +++ b/src/Sql/dbo/Views/OrganizationUserOrganizationDetailsView.sql @@ -45,7 +45,7 @@ SELECT O.[UsePasswordManager], O.[SmSeats], O.[SmServiceAccounts], - O.[LimitCollectionCdOwnerAdmin] + O.[LimitCollectionCreationDeletion] FROM [dbo].[OrganizationUser] OU LEFT JOIN diff --git a/test/Api.Test/Vault/AuthorizationHandlers/CollectionAuthorizationHandlerTests.cs b/test/Api.Test/Vault/AuthorizationHandlers/CollectionAuthorizationHandlerTests.cs index 16e542d539..1f29421718 100644 --- a/test/Api.Test/Vault/AuthorizationHandlers/CollectionAuthorizationHandlerTests.cs +++ b/test/Api.Test/Vault/AuthorizationHandlers/CollectionAuthorizationHandlerTests.cs @@ -69,7 +69,7 @@ public class CollectionAuthorizationHandlerTests organization.Type = userType; organization.Permissions.CreateNewCollections = createNewCollection; - organization.LimitCollectionCdOwnerAdmin = limitCollectionCreateDelete; + organization.LimitCollectionCreationDeletion = limitCollectionCreateDelete; var context = new AuthorizationHandlerContext( new[] { CollectionOperations.Create }, @@ -104,7 +104,7 @@ public class CollectionAuthorizationHandlerTests organization.Type = userType; organization.Permissions.DeleteAnyCollection = deleteAnyCollection; - organization.LimitCollectionCdOwnerAdmin = limitCollectionCreateDelete; + organization.LimitCollectionCreationDeletion = limitCollectionCreateDelete; var context = new AuthorizationHandlerContext( new[] { CollectionOperations.Delete }, diff --git a/util/Migrator/DbScripts/2023-07-31_00_LimitCollectionCreateDelete.sql b/util/Migrator/DbScripts/2023-09-26_00_LimitCollectionCreationDeletion.sql similarity index 93% rename from util/Migrator/DbScripts/2023-07-31_00_LimitCollectionCreateDelete.sql rename to util/Migrator/DbScripts/2023-09-26_00_LimitCollectionCreationDeletion.sql index b8d71f868e..6e15f9c36e 100644 --- a/util/Migrator/DbScripts/2023-07-31_00_LimitCollectionCreateDelete.sql +++ b/util/Migrator/DbScripts/2023-09-26_00_LimitCollectionCreationDeletion.sql @@ -1,10 +1,10 @@ ---Add column 'LimitCollectionCdOwnerAdmin' to 'Organization' table -IF COL_LENGTH('[dbo].[Organization]', 'LimitCollectionCdOwnerAdmin') IS NULL +--Add column 'LimitCollectionCreationDeletion' to 'Organization' table +IF COL_LENGTH('[dbo].[Organization]', 'LimitCollectionCreationDeletion') IS NULL BEGIN ALTER TABLE [dbo].[Organization] ADD - [LimitCollectionCdOwnerAdmin] BIT NOT NULL CONSTRAINT [DF_Organization_LimitCollectionCdOwnerAdmin] DEFAULT (1) + [LimitCollectionCreationDeletion] BIT NOT NULL CONSTRAINT [DF_Organization_LimitCollectionCreationDeletion] DEFAULT (1) END GO @@ -12,8 +12,8 @@ GO /** ORGANIZATION STORED PROCEDURES */ - ---Alter `Organization_Create` sproc to include `LimitCollectionCdOwnerAdmin` column and default value + +--Alter `Organization_Create` sproc to include `LimitCollectionCreationDeletion` column and default value CREATE OR ALTER PROCEDURE [dbo].[Organization_Create] @Id UNIQUEIDENTIFIER OUTPUT, @Identifier NVARCHAR(50), @@ -67,7 +67,7 @@ CREATE OR ALTER PROCEDURE [dbo].[Organization_Create] @MaxAutoscaleSmSeats INT= null, @MaxAutoscaleSmServiceAccounts INT = null, @SecretsManagerBeta BIT = 0, - @LimitCollectionCdOwnerAdmin BIT = 0 + @LimitCollectionCreationDeletion BIT = 0 AS BEGIN SET NOCOUNT ON @@ -126,7 +126,7 @@ BEGIN [MaxAutoscaleSmSeats], [MaxAutoscaleSmServiceAccounts], [SecretsManagerBeta], - [LimitCollectionCdOwnerAdmin] + [LimitCollectionCreationDeletion] ) VALUES ( @@ -182,12 +182,12 @@ BEGIN @MaxAutoscaleSmSeats, @MaxAutoscaleSmServiceAccounts, @SecretsManagerBeta, - @LimitCollectionCdOwnerAdmin + @LimitCollectionCreationDeletion ) END GO ---Alter `Organization_Update` sproc to include `LimitCollectionCdOwnerAdmin` column +--Alter `Organization_Update` sproc to include `LimitCollectionCreationDeletion` column CREATE OR ALTER PROCEDURE [dbo].[Organization_Update] @Id UNIQUEIDENTIFIER, @Identifier NVARCHAR(50), @@ -241,7 +241,7 @@ CREATE OR ALTER PROCEDURE [dbo].[Organization_Update] @MaxAutoscaleSmSeats INT = null, @MaxAutoscaleSmServiceAccounts INT = null, @SecretsManagerBeta BIT = 0, - @LimitCollectionCdOwnerAdmin BIT = 1 + @LimitCollectionCreationDeletion BIT = 1 AS BEGIN SET NOCOUNT ON @@ -300,7 +300,7 @@ BEGIN [MaxAutoscaleSmSeats] = @MaxAutoscaleSmSeats, [MaxAutoscaleSmServiceAccounts] = @MaxAutoscaleSmServiceAccounts, [SecretsManagerBeta] = @SecretsManagerBeta, - [LimitCollectionCdOwnerAdmin] = @LimitCollectionCdOwnerAdmin + [LimitCollectionCreationDeletion] = @LimitCollectionCreationDeletion WHERE [Id] = @Id END @@ -310,8 +310,8 @@ GO /** ORGANIZATION VIEWS */ - ---Add 'LimitCollectionCdOwnerAdmin` to OrganizationUserOrganizationDetailsView + +--Add 'LimitCollectionCreationDeletion` to OrganizationUserOrganizationDetailsView CREATE OR ALTER VIEW [dbo].[OrganizationUserOrganizationDetailsView] AS SELECT @@ -359,7 +359,7 @@ SELECT O.[UsePasswordManager], O.[SmSeats], O.[SmServiceAccounts], - O.[LimitCollectionCdOwnerAdmin] + O.[LimitCollectionCreationDeletion] FROM [dbo].[OrganizationUser] OU LEFT JOIN @@ -386,7 +386,7 @@ GO /** PROVIDER VIEWS - not directly modified, but access Organization table */ - + --Manually refresh ProviderOrganizationOrganizationDetailsView IF OBJECT_ID('[dbo].[ProviderOrganizationOrganizationDetailsView]') IS NOT NULL BEGIN @@ -399,4 +399,4 @@ IF OBJECT_ID('[dbo].[ProviderUserProviderOrganizationDetailsView]') IS NOT NULL BEGIN EXECUTE sp_refreshsqlmodule N'[dbo].[ProviderUserProviderOrganizationDetailsView]'; END -GO \ No newline at end of file +GO diff --git a/util/MySqlMigrations/Migrations/20230807181649_LimitCollectionCreateDelete.Designer.cs b/util/MySqlMigrations/Migrations/20230807181649_LimitCollectionCreateDelete.Designer.cs index f53d63c912..afbab67829 100644 --- a/util/MySqlMigrations/Migrations/20230807181649_LimitCollectionCreateDelete.Designer.cs +++ b/util/MySqlMigrations/Migrations/20230807181649_LimitCollectionCreateDelete.Designer.cs @@ -567,7 +567,7 @@ namespace Bit.MySqlMigrations.Migrations .HasMaxLength(100) .HasColumnType("varchar(100)"); - b.Property("LimitCollectionCdOwnerAdmin") + b.Property("LimitCollectionCreationDeletion") .HasColumnType("tinyint(1)") .HasDefaultValue(true); diff --git a/util/MySqlMigrations/Migrations/20230807181649_LimitCollectionCreateDelete.cs b/util/MySqlMigrations/Migrations/20230807181649_LimitCollectionCreateDelete.cs index 872c0acc0a..d8a6cca104 100644 --- a/util/MySqlMigrations/Migrations/20230807181649_LimitCollectionCreateDelete.cs +++ b/util/MySqlMigrations/Migrations/20230807181649_LimitCollectionCreateDelete.cs @@ -11,7 +11,7 @@ public partial class LimitCollectionCreateDelete : Migration protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AddColumn( - name: "LimitCollectionCdOwnerAdmin", + name: "LimitCollectionCreationDeletion", table: "Organization", type: "tinyint(1)", nullable: false, @@ -22,7 +22,7 @@ public partial class LimitCollectionCreateDelete : Migration protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropColumn( - name: "LimitCollectionCdOwnerAdmin", + name: "LimitCollectionCreationDeletion", table: "Organization"); } } diff --git a/util/MySqlMigrations/Migrations/DatabaseContextModelSnapshot.cs b/util/MySqlMigrations/Migrations/DatabaseContextModelSnapshot.cs index 56c87b1155..6edd1ca618 100644 --- a/util/MySqlMigrations/Migrations/DatabaseContextModelSnapshot.cs +++ b/util/MySqlMigrations/Migrations/DatabaseContextModelSnapshot.cs @@ -570,7 +570,7 @@ namespace Bit.MySqlMigrations.Migrations .HasMaxLength(100) .HasColumnType("varchar(100)"); - b.Property("LimitCollectionCdOwnerAdmin") + b.Property("LimitCollectionCreationDeletion") .HasColumnType("tinyint(1)") .HasDefaultValue(true); diff --git a/util/PostgresMigrations/Migrations/20230807181653_LimitCollectionCreateDelete.Designer.cs b/util/PostgresMigrations/Migrations/20230807181653_LimitCollectionCreateDelete.Designer.cs index 1b6cb8413e..9c529ac8b8 100644 --- a/util/PostgresMigrations/Migrations/20230807181653_LimitCollectionCreateDelete.Designer.cs +++ b/util/PostgresMigrations/Migrations/20230807181653_LimitCollectionCreateDelete.Designer.cs @@ -577,7 +577,7 @@ namespace Bit.PostgresMigrations.Migrations .HasMaxLength(100) .HasColumnType("character varying(100)"); - b.Property("LimitCollectionCdOwnerAdmin") + b.Property("LimitCollectionCreationDeletion") .HasColumnType("boolean") .HasDefaultValue(true); diff --git a/util/PostgresMigrations/Migrations/20230807181653_LimitCollectionCreateDelete.cs b/util/PostgresMigrations/Migrations/20230807181653_LimitCollectionCreateDelete.cs index 2f64a47d9c..ad58e18a21 100644 --- a/util/PostgresMigrations/Migrations/20230807181653_LimitCollectionCreateDelete.cs +++ b/util/PostgresMigrations/Migrations/20230807181653_LimitCollectionCreateDelete.cs @@ -11,7 +11,7 @@ public partial class LimitCollectionCreateDelete : Migration protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AddColumn( - name: "LimitCollectionCdOwnerAdmin", + name: "LimitCollectionCreationDeletion", table: "Organization", type: "boolean", nullable: false, @@ -22,7 +22,7 @@ public partial class LimitCollectionCreateDelete : Migration protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropColumn( - name: "LimitCollectionCdOwnerAdmin", + name: "LimitCollectionCreationDeletion", table: "Organization"); } } diff --git a/util/PostgresMigrations/Migrations/DatabaseContextModelSnapshot.cs b/util/PostgresMigrations/Migrations/DatabaseContextModelSnapshot.cs index 1cb7988682..80d588ed2f 100644 --- a/util/PostgresMigrations/Migrations/DatabaseContextModelSnapshot.cs +++ b/util/PostgresMigrations/Migrations/DatabaseContextModelSnapshot.cs @@ -580,7 +580,7 @@ namespace Bit.PostgresMigrations.Migrations .HasMaxLength(100) .HasColumnType("character varying(100)"); - b.Property("LimitCollectionCdOwnerAdmin") + b.Property("LimitCollectionCreationDeletion") .HasColumnType("boolean") .HasDefaultValue(true); diff --git a/util/SqliteMigrations/Migrations/20230807181657_LimitCollectionCreateDelete.Designer.cs b/util/SqliteMigrations/Migrations/20230807181657_LimitCollectionCreateDelete.Designer.cs index 39c3ae9b42..f69ab6bdd7 100644 --- a/util/SqliteMigrations/Migrations/20230807181657_LimitCollectionCreateDelete.Designer.cs +++ b/util/SqliteMigrations/Migrations/20230807181657_LimitCollectionCreateDelete.Designer.cs @@ -565,7 +565,7 @@ namespace Bit.SqliteMigrations.Migrations .HasMaxLength(100) .HasColumnType("TEXT"); - b.Property("LimitCollectionCdOwnerAdmin") + b.Property("LimitCollectionCreationDeletion") .HasColumnType("INTEGER") .HasDefaultValue(true); diff --git a/util/SqliteMigrations/Migrations/20230807181657_LimitCollectionCreateDelete.cs b/util/SqliteMigrations/Migrations/20230807181657_LimitCollectionCreateDelete.cs index e2bf5e0c64..c1e5834398 100644 --- a/util/SqliteMigrations/Migrations/20230807181657_LimitCollectionCreateDelete.cs +++ b/util/SqliteMigrations/Migrations/20230807181657_LimitCollectionCreateDelete.cs @@ -11,7 +11,7 @@ public partial class LimitCollectionCreateDelete : Migration protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AddColumn( - name: "LimitCollectionCdOwnerAdmin", + name: "LimitCollectionCreationDeletion", table: "Organization", type: "INTEGER", nullable: false, @@ -22,7 +22,7 @@ public partial class LimitCollectionCreateDelete : Migration protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropColumn( - name: "LimitCollectionCdOwnerAdmin", + name: "LimitCollectionCreationDeletion", table: "Organization"); } } diff --git a/util/SqliteMigrations/Migrations/DatabaseContextModelSnapshot.cs b/util/SqliteMigrations/Migrations/DatabaseContextModelSnapshot.cs index 544d2be5cf..5fe683477d 100644 --- a/util/SqliteMigrations/Migrations/DatabaseContextModelSnapshot.cs +++ b/util/SqliteMigrations/Migrations/DatabaseContextModelSnapshot.cs @@ -568,7 +568,7 @@ namespace Bit.SqliteMigrations.Migrations .HasMaxLength(100) .HasColumnType("TEXT"); - b.Property("LimitCollectionCdOwnerAdmin") + b.Property("LimitCollectionCreationDeletion") .HasColumnType("INTEGER") .HasDefaultValue(true);