1
0
mirror of https://github.com/bitwarden/server synced 2026-01-31 00:33:17 +00:00

Generate EF migrations

This commit is contained in:
Thomas Rittson
2026-01-01 09:37:49 +10:00
parent 7ea237f5d5
commit a6fcee7094
9 changed files with 10589 additions and 0 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,41 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Bit.MySqlMigrations.Migrations
{
/// <inheritdoc />
public partial class DefaultCollectionSemaphore : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "DefaultCollectionSemaphore",
columns: table => new
{
OrganizationUserId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
CreationDate = table.Column<DateTime>(type: "datetime(6)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_DefaultCollectionSemaphore", x => x.OrganizationUserId);
table.ForeignKey(
name: "FK_DefaultCollectionSemaphore_OrganizationUser_OrganizationUser~",
column: x => x.OrganizationUserId,
principalTable: "OrganizationUser",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "DefaultCollectionSemaphore");
}
}
}

View File

@@ -69,6 +69,19 @@ namespace Bit.MySqlMigrations.Migrations
b.ToTable("OrganizationMemberBaseDetails");
});
modelBuilder.Entity("Bit.Infrastructure.EntityFramework.AdminConsole.Models.DefaultCollectionSemaphore", b =>
{
b.Property<Guid>("OrganizationUserId")
.HasColumnType("char(36)");
b.Property<DateTime>("CreationDate")
.HasColumnType("datetime(6)");
b.HasKey("OrganizationUserId");
b.ToTable("DefaultCollectionSemaphore", (string)null);
});
modelBuilder.Entity("Bit.Infrastructure.EntityFramework.AdminConsole.Models.Organization", b =>
{
b.Property<Guid>("Id")
@@ -2601,6 +2614,17 @@ namespace Bit.MySqlMigrations.Migrations
b.HasDiscriminator().HasValue("user_service_account");
});
modelBuilder.Entity("Bit.Infrastructure.EntityFramework.AdminConsole.Models.DefaultCollectionSemaphore", b =>
{
b.HasOne("Bit.Infrastructure.EntityFramework.Models.OrganizationUser", "OrganizationUser")
.WithMany()
.HasForeignKey("OrganizationUserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("OrganizationUser");
});
modelBuilder.Entity("Bit.Infrastructure.EntityFramework.AdminConsole.Models.OrganizationIntegration", b =>
{
b.HasOne("Bit.Infrastructure.EntityFramework.AdminConsole.Models.Organization", "Organization")

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,40 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Bit.PostgresMigrations.Migrations
{
/// <inheritdoc />
public partial class DefaultCollectionSemaphore : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "DefaultCollectionSemaphore",
columns: table => new
{
OrganizationUserId = table.Column<Guid>(type: "uuid", nullable: false),
CreationDate = table.Column<DateTime>(type: "timestamp with time zone", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_DefaultCollectionSemaphore", x => x.OrganizationUserId);
table.ForeignKey(
name: "FK_DefaultCollectionSemaphore_OrganizationUser_OrganizationUse~",
column: x => x.OrganizationUserId,
principalTable: "OrganizationUser",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "DefaultCollectionSemaphore");
}
}
}

View File

@@ -70,6 +70,19 @@ namespace Bit.PostgresMigrations.Migrations
b.ToTable("OrganizationMemberBaseDetails");
});
modelBuilder.Entity("Bit.Infrastructure.EntityFramework.AdminConsole.Models.DefaultCollectionSemaphore", b =>
{
b.Property<Guid>("OrganizationUserId")
.HasColumnType("uuid");
b.Property<DateTime>("CreationDate")
.HasColumnType("timestamp with time zone");
b.HasKey("OrganizationUserId");
b.ToTable("DefaultCollectionSemaphore", (string)null);
});
modelBuilder.Entity("Bit.Infrastructure.EntityFramework.AdminConsole.Models.Organization", b =>
{
b.Property<Guid>("Id")
@@ -2607,6 +2620,17 @@ namespace Bit.PostgresMigrations.Migrations
b.HasDiscriminator().HasValue("user_service_account");
});
modelBuilder.Entity("Bit.Infrastructure.EntityFramework.AdminConsole.Models.DefaultCollectionSemaphore", b =>
{
b.HasOne("Bit.Infrastructure.EntityFramework.Models.OrganizationUser", "OrganizationUser")
.WithMany()
.HasForeignKey("OrganizationUserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("OrganizationUser");
});
modelBuilder.Entity("Bit.Infrastructure.EntityFramework.AdminConsole.Models.OrganizationIntegration", b =>
{
b.HasOne("Bit.Infrastructure.EntityFramework.AdminConsole.Models.Organization", "Organization")

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,40 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Bit.SqliteMigrations.Migrations
{
/// <inheritdoc />
public partial class DefaultCollectionSemaphore : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "DefaultCollectionSemaphore",
columns: table => new
{
OrganizationUserId = table.Column<Guid>(type: "TEXT", nullable: false),
CreationDate = table.Column<DateTime>(type: "TEXT", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_DefaultCollectionSemaphore", x => x.OrganizationUserId);
table.ForeignKey(
name: "FK_DefaultCollectionSemaphore_OrganizationUser_OrganizationUserId",
column: x => x.OrganizationUserId,
principalTable: "OrganizationUser",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "DefaultCollectionSemaphore");
}
}
}

View File

@@ -64,6 +64,19 @@ namespace Bit.SqliteMigrations.Migrations
b.ToTable("OrganizationMemberBaseDetails");
});
modelBuilder.Entity("Bit.Infrastructure.EntityFramework.AdminConsole.Models.DefaultCollectionSemaphore", b =>
{
b.Property<Guid>("OrganizationUserId")
.HasColumnType("TEXT");
b.Property<DateTime>("CreationDate")
.HasColumnType("TEXT");
b.HasKey("OrganizationUserId");
b.ToTable("DefaultCollectionSemaphore", (string)null);
});
modelBuilder.Entity("Bit.Infrastructure.EntityFramework.AdminConsole.Models.Organization", b =>
{
b.Property<Guid>("Id")
@@ -2590,6 +2603,17 @@ namespace Bit.SqliteMigrations.Migrations
b.HasDiscriminator().HasValue("user_service_account");
});
modelBuilder.Entity("Bit.Infrastructure.EntityFramework.AdminConsole.Models.DefaultCollectionSemaphore", b =>
{
b.HasOne("Bit.Infrastructure.EntityFramework.Models.OrganizationUser", "OrganizationUser")
.WithMany()
.HasForeignKey("OrganizationUserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("OrganizationUser");
});
modelBuilder.Entity("Bit.Infrastructure.EntityFramework.AdminConsole.Models.OrganizationIntegration", b =>
{
b.HasOne("Bit.Infrastructure.EntityFramework.AdminConsole.Models.Organization", "Organization")