diff --git a/util/Migrator/DbScripts/2025-10-15_00_AddDisableSMAdsForUsersToOrganization.sql b/util/Migrator/DbScripts/2025-11-26_00_AddDisableSMAdsForUsersToOrganization.sql similarity index 100% rename from util/Migrator/DbScripts/2025-10-15_00_AddDisableSMAdsForUsersToOrganization.sql rename to util/Migrator/DbScripts/2025-11-26_00_AddDisableSMAdsForUsersToOrganization.sql diff --git a/util/MySqlMigrations/Migrations/20251015172830_AddingNewFlagToLicenseForDisableSMAdsForUser.Designer.cs b/util/MySqlMigrations/Migrations/20251126165404_AddingdisableSMAdsForUsersToLicense.Designer.cs similarity index 95% rename from util/MySqlMigrations/Migrations/20251015172830_AddingNewFlagToLicenseForDisableSMAdsForUser.Designer.cs rename to util/MySqlMigrations/Migrations/20251126165404_AddingdisableSMAdsForUsersToLicense.Designer.cs index eef454b35e..64bafb7651 100644 --- a/util/MySqlMigrations/Migrations/20251015172830_AddingNewFlagToLicenseForDisableSMAdsForUser.Designer.cs +++ b/util/MySqlMigrations/Migrations/20251126165404_AddingdisableSMAdsForUsersToLicense.Designer.cs @@ -12,8 +12,8 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion; namespace Bit.MySqlMigrations.Migrations { [DbContext(typeof(DatabaseContext))] - [Migration("20251015172830_AddingNewFlagToLicenseForDisableSMAdsForUser")] - partial class AddingNewFlagToLicenseForDisableSMAdsForUser + [Migration("20251126165404_AddingdisableSMAdsForUsersToLicense")] + partial class AddingdisableSMAdsForUsersToLicense { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) @@ -113,9 +113,6 @@ namespace Bit.MySqlMigrations.Migrations b.Property("CreationDate") .HasColumnType("datetime(6)"); - b.Property("UseDisableSmAdsForUsers") - .HasColumnType("tinyint(1)"); - b.Property("Enabled") .HasColumnType("tinyint(1)"); @@ -226,12 +223,18 @@ namespace Bit.MySqlMigrations.Migrations b.Property("UseApi") .HasColumnType("tinyint(1)"); + b.Property("UseAutomaticUserConfirmation") + .HasColumnType("tinyint(1)"); + b.Property("UseCustomPermissions") .HasColumnType("tinyint(1)"); b.Property("UseDirectory") .HasColumnType("tinyint(1)"); + b.Property("UseDisableSmAdsForUsers") + .HasColumnType("tinyint(1)"); + b.Property("UseEvents") .HasColumnType("tinyint(1)"); @@ -1017,6 +1020,12 @@ namespace Bit.MySqlMigrations.Migrations b.Property("Id") .HasColumnType("char(36)"); + b.Property("ApplicationAtRiskCount") + .HasColumnType("int"); + + b.Property("ApplicationCount") + .HasColumnType("int"); + b.Property("ApplicationData") .HasColumnType("longtext"); @@ -1027,9 +1036,39 @@ namespace Bit.MySqlMigrations.Migrations b.Property("CreationDate") .HasColumnType("datetime(6)"); + b.Property("CriticalApplicationAtRiskCount") + .HasColumnType("int"); + + b.Property("CriticalApplicationCount") + .HasColumnType("int"); + + b.Property("CriticalMemberAtRiskCount") + .HasColumnType("int"); + + b.Property("CriticalMemberCount") + .HasColumnType("int"); + + b.Property("CriticalPasswordAtRiskCount") + .HasColumnType("int"); + + b.Property("CriticalPasswordCount") + .HasColumnType("int"); + + b.Property("MemberAtRiskCount") + .HasColumnType("int"); + + b.Property("MemberCount") + .HasColumnType("int"); + b.Property("OrganizationId") .HasColumnType("char(36)"); + b.Property("PasswordAtRiskCount") + .HasColumnType("int"); + + b.Property("PasswordCount") + .HasColumnType("int"); + b.Property("ReportData") .IsRequired() .HasColumnType("longtext"); @@ -1879,6 +1918,15 @@ namespace Bit.MySqlMigrations.Migrations .HasMaxLength(50) .HasColumnType("varchar(50)"); + b.Property("SecurityState") + .HasColumnType("longtext"); + + b.Property("SecurityVersion") + .HasColumnType("int"); + + b.Property("SignedPublicKey") + .HasColumnType("longtext"); + b.Property("Storage") .HasColumnType("bigint"); @@ -1907,6 +1955,40 @@ namespace Bit.MySqlMigrations.Migrations b.ToTable("User", (string)null); }); + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.UserSignatureKeyPair", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("CreationDate") + .HasColumnType("datetime(6)"); + + b.Property("RevisionDate") + .HasColumnType("datetime(6)"); + + b.Property("SignatureAlgorithm") + .HasColumnType("tinyint unsigned"); + + b.Property("SigningKey") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("VerifyingKey") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("Id"); + + b.HasIndex("UserId") + .IsUnique() + .HasAnnotation("SqlServer:Clustered", false); + + b.ToTable("UserSignatureKeyPair", (string)null); + }); + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.NotificationCenter.Models.Notification", b => { b.Property("Id") @@ -2165,6 +2247,42 @@ namespace Bit.MySqlMigrations.Migrations b.ToTable("Secret", (string)null); }); + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.SecretVersion", b => + { + b.Property("Id") + .HasColumnType("char(36)"); + + b.Property("EditorOrganizationUserId") + .HasColumnType("char(36)"); + + b.Property("EditorServiceAccountId") + .HasColumnType("char(36)"); + + b.Property("SecretId") + .HasColumnType("char(36)"); + + b.Property("Value") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("VersionDate") + .HasColumnType("datetime(6)"); + + b.HasKey("Id") + .HasAnnotation("SqlServer:Clustered", true); + + b.HasIndex("EditorOrganizationUserId") + .HasDatabaseName("IX_SecretVersion_EditorOrganizationUserId"); + + b.HasIndex("EditorServiceAccountId") + .HasDatabaseName("IX_SecretVersion_EditorServiceAccountId"); + + b.HasIndex("SecretId") + .HasDatabaseName("IX_SecretVersion_SecretId"); + + b.ToTable("SecretVersion"); + }); + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.ServiceAccount", b => { b.Property("Id") @@ -2918,6 +3036,17 @@ namespace Bit.MySqlMigrations.Migrations b.Navigation("User"); }); + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.UserSignatureKeyPair", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.Models.User", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("User"); + }); + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.NotificationCenter.Models.Notification", b => { b.HasOne("Bit.Infrastructure.EntityFramework.AdminConsole.Models.Organization", "Organization") @@ -2990,6 +3119,31 @@ namespace Bit.MySqlMigrations.Migrations b.Navigation("Organization"); }); + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.SecretVersion", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.Models.OrganizationUser", "EditorOrganizationUser") + .WithMany() + .HasForeignKey("EditorOrganizationUserId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Bit.Infrastructure.EntityFramework.SecretsManager.Models.ServiceAccount", "EditorServiceAccount") + .WithMany() + .HasForeignKey("EditorServiceAccountId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Bit.Infrastructure.EntityFramework.SecretsManager.Models.Secret", "Secret") + .WithMany("SecretVersions") + .HasForeignKey("SecretId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("EditorOrganizationUser"); + + b.Navigation("EditorServiceAccount"); + + b.Navigation("Secret"); + }); + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.ServiceAccount", b => { b.HasOne("Bit.Infrastructure.EntityFramework.AdminConsole.Models.Organization", "Organization") @@ -3261,6 +3415,8 @@ namespace Bit.MySqlMigrations.Migrations { b.Navigation("GroupAccessPolicies"); + b.Navigation("SecretVersions"); + b.Navigation("ServiceAccountAccessPolicies"); b.Navigation("UserAccessPolicies"); diff --git a/util/MySqlMigrations/Migrations/20251015172830_AddingNewFlagToLicenseForDisableSMAdsForUser.cs b/util/MySqlMigrations/Migrations/20251126165404_AddingdisableSMAdsForUsersToLicense.cs similarity index 89% rename from util/MySqlMigrations/Migrations/20251015172830_AddingNewFlagToLicenseForDisableSMAdsForUser.cs rename to util/MySqlMigrations/Migrations/20251126165404_AddingdisableSMAdsForUsersToLicense.cs index 04790797ac..923f46e47d 100644 --- a/util/MySqlMigrations/Migrations/20251015172830_AddingNewFlagToLicenseForDisableSMAdsForUser.cs +++ b/util/MySqlMigrations/Migrations/20251126165404_AddingdisableSMAdsForUsersToLicense.cs @@ -5,7 +5,7 @@ namespace Bit.MySqlMigrations.Migrations; /// -public partial class AddingNewFlagToLicenseForDisableSMAdsForUser : Migration +public partial class AddingdisableSMAdsForUsersToLicense : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) diff --git a/util/MySqlMigrations/Migrations/DatabaseContextModelSnapshot.cs b/util/MySqlMigrations/Migrations/DatabaseContextModelSnapshot.cs index 2c1e520901..aec086ddcf 100644 --- a/util/MySqlMigrations/Migrations/DatabaseContextModelSnapshot.cs +++ b/util/MySqlMigrations/Migrations/DatabaseContextModelSnapshot.cs @@ -110,9 +110,6 @@ namespace Bit.MySqlMigrations.Migrations b.Property("CreationDate") .HasColumnType("datetime(6)"); - b.Property("UseDisableSmAdsForUsers") - .HasColumnType("tinyint(1)"); - b.Property("Enabled") .HasColumnType("tinyint(1)"); @@ -232,6 +229,9 @@ namespace Bit.MySqlMigrations.Migrations b.Property("UseDirectory") .HasColumnType("tinyint(1)"); + b.Property("UseDisableSmAdsForUsers") + .HasColumnType("tinyint(1)"); + b.Property("UseEvents") .HasColumnType("tinyint(1)"); diff --git a/util/PostgresMigrations/Migrations/20251015172813_AddingNewFlagToLicenseForDisableSMAdsForUser.Designer.cs b/util/PostgresMigrations/Migrations/20251126165420_AddingdisableSMAdsForUsersToLicense.Designer.cs similarity index 95% rename from util/PostgresMigrations/Migrations/20251015172813_AddingNewFlagToLicenseForDisableSMAdsForUser.Designer.cs rename to util/PostgresMigrations/Migrations/20251126165420_AddingdisableSMAdsForUsersToLicense.Designer.cs index 0f3634aba3..c8f185d447 100644 --- a/util/PostgresMigrations/Migrations/20251015172813_AddingNewFlagToLicenseForDisableSMAdsForUser.Designer.cs +++ b/util/PostgresMigrations/Migrations/20251126165420_AddingdisableSMAdsForUsersToLicense.Designer.cs @@ -12,8 +12,8 @@ using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; namespace Bit.PostgresMigrations.Migrations { [DbContext(typeof(DatabaseContext))] - [Migration("20251015172813_AddingNewFlagToLicenseForDisableSMAdsForUser")] - partial class AddingNewFlagToLicenseForDisableSMAdsForUser + [Migration("20251126165420_AddingdisableSMAdsForUsersToLicense")] + partial class AddingdisableSMAdsForUsersToLicense { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) @@ -114,9 +114,6 @@ namespace Bit.PostgresMigrations.Migrations b.Property("CreationDate") .HasColumnType("timestamp with time zone"); - b.Property("UseDisableSmAdsForUsers") - .HasColumnType("boolean"); - b.Property("Enabled") .HasColumnType("boolean"); @@ -228,12 +225,18 @@ namespace Bit.PostgresMigrations.Migrations b.Property("UseApi") .HasColumnType("boolean"); + b.Property("UseAutomaticUserConfirmation") + .HasColumnType("boolean"); + b.Property("UseCustomPermissions") .HasColumnType("boolean"); b.Property("UseDirectory") .HasColumnType("boolean"); + b.Property("UseDisableSmAdsForUsers") + .HasColumnType("boolean"); + b.Property("UseEvents") .HasColumnType("boolean"); @@ -1022,6 +1025,12 @@ namespace Bit.PostgresMigrations.Migrations b.Property("Id") .HasColumnType("uuid"); + b.Property("ApplicationAtRiskCount") + .HasColumnType("integer"); + + b.Property("ApplicationCount") + .HasColumnType("integer"); + b.Property("ApplicationData") .HasColumnType("text"); @@ -1032,9 +1041,39 @@ namespace Bit.PostgresMigrations.Migrations b.Property("CreationDate") .HasColumnType("timestamp with time zone"); + b.Property("CriticalApplicationAtRiskCount") + .HasColumnType("integer"); + + b.Property("CriticalApplicationCount") + .HasColumnType("integer"); + + b.Property("CriticalMemberAtRiskCount") + .HasColumnType("integer"); + + b.Property("CriticalMemberCount") + .HasColumnType("integer"); + + b.Property("CriticalPasswordAtRiskCount") + .HasColumnType("integer"); + + b.Property("CriticalPasswordCount") + .HasColumnType("integer"); + + b.Property("MemberAtRiskCount") + .HasColumnType("integer"); + + b.Property("MemberCount") + .HasColumnType("integer"); + b.Property("OrganizationId") .HasColumnType("uuid"); + b.Property("PasswordAtRiskCount") + .HasColumnType("integer"); + + b.Property("PasswordCount") + .HasColumnType("integer"); + b.Property("ReportData") .IsRequired() .HasColumnType("text"); @@ -1885,6 +1924,15 @@ namespace Bit.PostgresMigrations.Migrations .HasMaxLength(50) .HasColumnType("character varying(50)"); + b.Property("SecurityState") + .HasColumnType("text"); + + b.Property("SecurityVersion") + .HasColumnType("integer"); + + b.Property("SignedPublicKey") + .HasColumnType("text"); + b.Property("Storage") .HasColumnType("bigint"); @@ -1913,6 +1961,40 @@ namespace Bit.PostgresMigrations.Migrations b.ToTable("User", (string)null); }); + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.UserSignatureKeyPair", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("CreationDate") + .HasColumnType("timestamp with time zone"); + + b.Property("RevisionDate") + .HasColumnType("timestamp with time zone"); + + b.Property("SignatureAlgorithm") + .HasColumnType("smallint"); + + b.Property("SigningKey") + .IsRequired() + .HasColumnType("text"); + + b.Property("UserId") + .HasColumnType("uuid"); + + b.Property("VerifyingKey") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("Id"); + + b.HasIndex("UserId") + .IsUnique() + .HasAnnotation("SqlServer:Clustered", false); + + b.ToTable("UserSignatureKeyPair", (string)null); + }); + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.NotificationCenter.Models.Notification", b => { b.Property("Id") @@ -2171,6 +2253,42 @@ namespace Bit.PostgresMigrations.Migrations b.ToTable("Secret", (string)null); }); + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.SecretVersion", b => + { + b.Property("Id") + .HasColumnType("uuid"); + + b.Property("EditorOrganizationUserId") + .HasColumnType("uuid"); + + b.Property("EditorServiceAccountId") + .HasColumnType("uuid"); + + b.Property("SecretId") + .HasColumnType("uuid"); + + b.Property("Value") + .IsRequired() + .HasColumnType("text"); + + b.Property("VersionDate") + .HasColumnType("timestamp with time zone"); + + b.HasKey("Id") + .HasAnnotation("SqlServer:Clustered", true); + + b.HasIndex("EditorOrganizationUserId") + .HasDatabaseName("IX_SecretVersion_EditorOrganizationUserId"); + + b.HasIndex("EditorServiceAccountId") + .HasDatabaseName("IX_SecretVersion_EditorServiceAccountId"); + + b.HasIndex("SecretId") + .HasDatabaseName("IX_SecretVersion_SecretId"); + + b.ToTable("SecretVersion"); + }); + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.ServiceAccount", b => { b.Property("Id") @@ -2924,6 +3042,17 @@ namespace Bit.PostgresMigrations.Migrations b.Navigation("User"); }); + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.UserSignatureKeyPair", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.Models.User", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("User"); + }); + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.NotificationCenter.Models.Notification", b => { b.HasOne("Bit.Infrastructure.EntityFramework.AdminConsole.Models.Organization", "Organization") @@ -2996,6 +3125,31 @@ namespace Bit.PostgresMigrations.Migrations b.Navigation("Organization"); }); + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.SecretVersion", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.Models.OrganizationUser", "EditorOrganizationUser") + .WithMany() + .HasForeignKey("EditorOrganizationUserId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Bit.Infrastructure.EntityFramework.SecretsManager.Models.ServiceAccount", "EditorServiceAccount") + .WithMany() + .HasForeignKey("EditorServiceAccountId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Bit.Infrastructure.EntityFramework.SecretsManager.Models.Secret", "Secret") + .WithMany("SecretVersions") + .HasForeignKey("SecretId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("EditorOrganizationUser"); + + b.Navigation("EditorServiceAccount"); + + b.Navigation("Secret"); + }); + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.ServiceAccount", b => { b.HasOne("Bit.Infrastructure.EntityFramework.AdminConsole.Models.Organization", "Organization") @@ -3267,6 +3421,8 @@ namespace Bit.PostgresMigrations.Migrations { b.Navigation("GroupAccessPolicies"); + b.Navigation("SecretVersions"); + b.Navigation("ServiceAccountAccessPolicies"); b.Navigation("UserAccessPolicies"); diff --git a/util/PostgresMigrations/Migrations/20251015172813_AddingNewFlagToLicenseForDisableSMAdsForUser.cs b/util/PostgresMigrations/Migrations/20251126165420_AddingdisableSMAdsForUsersToLicense.cs similarity index 89% rename from util/PostgresMigrations/Migrations/20251015172813_AddingNewFlagToLicenseForDisableSMAdsForUser.cs rename to util/PostgresMigrations/Migrations/20251126165420_AddingdisableSMAdsForUsersToLicense.cs index d0f2763b1c..f74e0bc2ee 100644 --- a/util/PostgresMigrations/Migrations/20251015172813_AddingNewFlagToLicenseForDisableSMAdsForUser.cs +++ b/util/PostgresMigrations/Migrations/20251126165420_AddingdisableSMAdsForUsersToLicense.cs @@ -5,7 +5,7 @@ namespace Bit.PostgresMigrations.Migrations; /// -public partial class AddingNewFlagToLicenseForDisableSMAdsForUser : Migration +public partial class AddingdisableSMAdsForUsersToLicense : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) diff --git a/util/PostgresMigrations/Migrations/DatabaseContextModelSnapshot.cs b/util/PostgresMigrations/Migrations/DatabaseContextModelSnapshot.cs index 0604c46bf6..38f3933147 100644 --- a/util/PostgresMigrations/Migrations/DatabaseContextModelSnapshot.cs +++ b/util/PostgresMigrations/Migrations/DatabaseContextModelSnapshot.cs @@ -111,9 +111,6 @@ namespace Bit.PostgresMigrations.Migrations b.Property("CreationDate") .HasColumnType("timestamp with time zone"); - b.Property("UseDisableSmAdsForUsers") - .HasColumnType("boolean"); - b.Property("Enabled") .HasColumnType("boolean"); @@ -234,6 +231,9 @@ namespace Bit.PostgresMigrations.Migrations b.Property("UseDirectory") .HasColumnType("boolean"); + b.Property("UseDisableSmAdsForUsers") + .HasColumnType("boolean"); + b.Property("UseEvents") .HasColumnType("boolean"); diff --git a/util/SqliteMigrations/Migrations/20251015172754_AddingNewFlagToLicenseForDisableSMAdsForUser.Designer.cs b/util/SqliteMigrations/Migrations/20251126165445_AddingdisableSMAdsForUsersToLicense.Designer.cs similarity index 95% rename from util/SqliteMigrations/Migrations/20251015172754_AddingNewFlagToLicenseForDisableSMAdsForUser.Designer.cs rename to util/SqliteMigrations/Migrations/20251126165445_AddingdisableSMAdsForUsersToLicense.Designer.cs index dfbb568289..9e0ba531e4 100644 --- a/util/SqliteMigrations/Migrations/20251015172754_AddingNewFlagToLicenseForDisableSMAdsForUser.Designer.cs +++ b/util/SqliteMigrations/Migrations/20251126165445_AddingdisableSMAdsForUsersToLicense.Designer.cs @@ -11,8 +11,8 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion; namespace Bit.SqliteMigrations.Migrations { [DbContext(typeof(DatabaseContext))] - [Migration("20251015172754_AddingNewFlagToLicenseForDisableSMAdsForUser")] - partial class AddingNewFlagToLicenseForDisableSMAdsForUser + [Migration("20251126165445_AddingdisableSMAdsForUsersToLicense")] + partial class AddingdisableSMAdsForUsersToLicense { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) @@ -108,9 +108,6 @@ namespace Bit.SqliteMigrations.Migrations b.Property("CreationDate") .HasColumnType("TEXT"); - b.Property("UseDisableSmAdsForUsers") - .HasColumnType("INTEGER"); - b.Property("Enabled") .HasColumnType("INTEGER"); @@ -221,12 +218,18 @@ namespace Bit.SqliteMigrations.Migrations b.Property("UseApi") .HasColumnType("INTEGER"); + b.Property("UseAutomaticUserConfirmation") + .HasColumnType("INTEGER"); + b.Property("UseCustomPermissions") .HasColumnType("INTEGER"); b.Property("UseDirectory") .HasColumnType("INTEGER"); + b.Property("UseDisableSmAdsForUsers") + .HasColumnType("INTEGER"); + b.Property("UseEvents") .HasColumnType("INTEGER"); @@ -1006,6 +1009,12 @@ namespace Bit.SqliteMigrations.Migrations b.Property("Id") .HasColumnType("TEXT"); + b.Property("ApplicationAtRiskCount") + .HasColumnType("INTEGER"); + + b.Property("ApplicationCount") + .HasColumnType("INTEGER"); + b.Property("ApplicationData") .HasColumnType("TEXT"); @@ -1016,9 +1025,39 @@ namespace Bit.SqliteMigrations.Migrations b.Property("CreationDate") .HasColumnType("TEXT"); + b.Property("CriticalApplicationAtRiskCount") + .HasColumnType("INTEGER"); + + b.Property("CriticalApplicationCount") + .HasColumnType("INTEGER"); + + b.Property("CriticalMemberAtRiskCount") + .HasColumnType("INTEGER"); + + b.Property("CriticalMemberCount") + .HasColumnType("INTEGER"); + + b.Property("CriticalPasswordAtRiskCount") + .HasColumnType("INTEGER"); + + b.Property("CriticalPasswordCount") + .HasColumnType("INTEGER"); + + b.Property("MemberAtRiskCount") + .HasColumnType("INTEGER"); + + b.Property("MemberCount") + .HasColumnType("INTEGER"); + b.Property("OrganizationId") .HasColumnType("TEXT"); + b.Property("PasswordAtRiskCount") + .HasColumnType("INTEGER"); + + b.Property("PasswordCount") + .HasColumnType("INTEGER"); + b.Property("ReportData") .IsRequired() .HasColumnType("TEXT"); @@ -1868,6 +1907,15 @@ namespace Bit.SqliteMigrations.Migrations .HasMaxLength(50) .HasColumnType("TEXT"); + b.Property("SecurityState") + .HasColumnType("TEXT"); + + b.Property("SecurityVersion") + .HasColumnType("INTEGER"); + + b.Property("SignedPublicKey") + .HasColumnType("TEXT"); + b.Property("Storage") .HasColumnType("INTEGER"); @@ -1896,6 +1944,40 @@ namespace Bit.SqliteMigrations.Migrations b.ToTable("User", (string)null); }); + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.UserSignatureKeyPair", b => + { + b.Property("Id") + .HasColumnType("TEXT"); + + b.Property("CreationDate") + .HasColumnType("TEXT"); + + b.Property("RevisionDate") + .HasColumnType("TEXT"); + + b.Property("SignatureAlgorithm") + .HasColumnType("INTEGER"); + + b.Property("SigningKey") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("UserId") + .HasColumnType("TEXT"); + + b.Property("VerifyingKey") + .IsRequired() + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("UserId") + .IsUnique() + .HasAnnotation("SqlServer:Clustered", false); + + b.ToTable("UserSignatureKeyPair", (string)null); + }); + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.NotificationCenter.Models.Notification", b => { b.Property("Id") @@ -2154,6 +2236,42 @@ namespace Bit.SqliteMigrations.Migrations b.ToTable("Secret", (string)null); }); + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.SecretVersion", b => + { + b.Property("Id") + .HasColumnType("TEXT"); + + b.Property("EditorOrganizationUserId") + .HasColumnType("TEXT"); + + b.Property("EditorServiceAccountId") + .HasColumnType("TEXT"); + + b.Property("SecretId") + .HasColumnType("TEXT"); + + b.Property("Value") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("VersionDate") + .HasColumnType("TEXT"); + + b.HasKey("Id") + .HasAnnotation("SqlServer:Clustered", true); + + b.HasIndex("EditorOrganizationUserId") + .HasDatabaseName("IX_SecretVersion_EditorOrganizationUserId"); + + b.HasIndex("EditorServiceAccountId") + .HasDatabaseName("IX_SecretVersion_EditorServiceAccountId"); + + b.HasIndex("SecretId") + .HasDatabaseName("IX_SecretVersion_SecretId"); + + b.ToTable("SecretVersion"); + }); + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.ServiceAccount", b => { b.Property("Id") @@ -2907,6 +3025,17 @@ namespace Bit.SqliteMigrations.Migrations b.Navigation("User"); }); + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.UserSignatureKeyPair", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.Models.User", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("User"); + }); + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.NotificationCenter.Models.Notification", b => { b.HasOne("Bit.Infrastructure.EntityFramework.AdminConsole.Models.Organization", "Organization") @@ -2979,6 +3108,31 @@ namespace Bit.SqliteMigrations.Migrations b.Navigation("Organization"); }); + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.SecretVersion", b => + { + b.HasOne("Bit.Infrastructure.EntityFramework.Models.OrganizationUser", "EditorOrganizationUser") + .WithMany() + .HasForeignKey("EditorOrganizationUserId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Bit.Infrastructure.EntityFramework.SecretsManager.Models.ServiceAccount", "EditorServiceAccount") + .WithMany() + .HasForeignKey("EditorServiceAccountId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Bit.Infrastructure.EntityFramework.SecretsManager.Models.Secret", "Secret") + .WithMany("SecretVersions") + .HasForeignKey("SecretId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("EditorOrganizationUser"); + + b.Navigation("EditorServiceAccount"); + + b.Navigation("Secret"); + }); + modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.ServiceAccount", b => { b.HasOne("Bit.Infrastructure.EntityFramework.AdminConsole.Models.Organization", "Organization") @@ -3250,6 +3404,8 @@ namespace Bit.SqliteMigrations.Migrations { b.Navigation("GroupAccessPolicies"); + b.Navigation("SecretVersions"); + b.Navigation("ServiceAccountAccessPolicies"); b.Navigation("UserAccessPolicies"); diff --git a/util/SqliteMigrations/Migrations/20251015172754_AddingNewFlagToLicenseForDisableSMAdsForUser.cs b/util/SqliteMigrations/Migrations/20251126165445_AddingdisableSMAdsForUsersToLicense.cs similarity index 89% rename from util/SqliteMigrations/Migrations/20251015172754_AddingNewFlagToLicenseForDisableSMAdsForUser.cs rename to util/SqliteMigrations/Migrations/20251126165445_AddingdisableSMAdsForUsersToLicense.cs index b1e05e2ae7..d534d9caa2 100644 --- a/util/SqliteMigrations/Migrations/20251015172754_AddingNewFlagToLicenseForDisableSMAdsForUser.cs +++ b/util/SqliteMigrations/Migrations/20251126165445_AddingdisableSMAdsForUsersToLicense.cs @@ -5,7 +5,7 @@ namespace Bit.SqliteMigrations.Migrations; /// -public partial class AddingNewFlagToLicenseForDisableSMAdsForUser : Migration +public partial class AddingdisableSMAdsForUsersToLicense : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) diff --git a/util/SqliteMigrations/Migrations/DatabaseContextModelSnapshot.cs b/util/SqliteMigrations/Migrations/DatabaseContextModelSnapshot.cs index f1e5be7e8f..d013291322 100644 --- a/util/SqliteMigrations/Migrations/DatabaseContextModelSnapshot.cs +++ b/util/SqliteMigrations/Migrations/DatabaseContextModelSnapshot.cs @@ -105,9 +105,6 @@ namespace Bit.SqliteMigrations.Migrations b.Property("CreationDate") .HasColumnType("TEXT"); - b.Property("UseDisableSmAdsForUsers") - .HasColumnType("INTEGER"); - b.Property("Enabled") .HasColumnType("INTEGER"); @@ -227,6 +224,9 @@ namespace Bit.SqliteMigrations.Migrations b.Property("UseDirectory") .HasColumnType("INTEGER"); + b.Property("UseDisableSmAdsForUsers") + .HasColumnType("INTEGER"); + b.Property("UseEvents") .HasColumnType("INTEGER");