1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-30 07:36:14 -05:00

Drop LimitCollectionCreationDeletion from the database (#4810)

* Drop a MSSQL column

* Delete property from `Organization` entity

* Generate EF migrations
This commit is contained in:
Addison Beck
2025-01-16 14:35:00 -05:00
committed by GitHub
parent a015f429c2
commit d8b4a4a28d
17 changed files with 9636 additions and 120 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,28 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Bit.SqliteMigrations.Migrations;
/// <inheritdoc />
public partial class DropLimitCollectionCreationDeletion : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "LimitCollectionCreationDeletion",
table: "Organization");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "LimitCollectionCreationDeletion",
table: "Organization",
type: "INTEGER",
nullable: false,
defaultValue: false);
}
}

View File

@ -86,9 +86,6 @@ namespace Bit.SqliteMigrations.Migrations
b.Property<bool>("LimitCollectionCreation")
.HasColumnType("INTEGER");
b.Property<bool>("LimitCollectionCreationDeletion")
.HasColumnType("INTEGER");
b.Property<bool>("LimitCollectionDeletion")
.HasColumnType("INTEGER");
@ -1133,35 +1130,6 @@ namespace Bit.SqliteMigrations.Migrations
b.ToTable("GroupUser", (string)null);
});
modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.Installation", b =>
{
b.Property<Guid>("Id")
.HasColumnType("TEXT");
b.Property<DateTime>("CreationDate")
.HasColumnType("TEXT");
b.Property<string>("Email")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("TEXT");
b.Property<bool>("Enabled")
.HasColumnType("INTEGER");
b.Property<string>("Key")
.IsRequired()
.HasMaxLength(150)
.HasColumnType("TEXT");
b.Property<DateTime?>("LastActivityDate")
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("Installation", (string)null);
});
modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Models.OrganizationApiKey", b =>
{
b.Property<Guid>("Id")
@ -1737,6 +1705,35 @@ namespace Bit.SqliteMigrations.Migrations
b.ToTable("NotificationStatus", (string)null);
});
modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Platform.Installation", b =>
{
b.Property<Guid>("Id")
.HasColumnType("TEXT");
b.Property<DateTime>("CreationDate")
.HasColumnType("TEXT");
b.Property<string>("Email")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("TEXT");
b.Property<bool>("Enabled")
.HasColumnType("INTEGER");
b.Property<string>("Key")
.IsRequired()
.HasMaxLength(150)
.HasColumnType("TEXT");
b.Property<DateTime?>("LastActivityDate")
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("Installation", (string)null);
});
modelBuilder.Entity("Bit.Infrastructure.EntityFramework.SecretsManager.Models.AccessPolicy", b =>
{
b.Property<Guid>("Id")
@ -2362,7 +2359,7 @@ namespace Bit.SqliteMigrations.Migrations
modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Billing.Models.OrganizationInstallation", b =>
{
b.HasOne("Bit.Infrastructure.EntityFramework.Models.Installation", "Installation")
b.HasOne("Bit.Infrastructure.EntityFramework.Platform.Installation", "Installation")
.WithMany()
.HasForeignKey("InstallationId")
.OnDelete(DeleteBehavior.Cascade)