mirror of
https://github.com/bitwarden/server.git
synced 2025-07-19 00:21:35 -05:00
EF migrations (#5537)
Co-authored-by: Ike Kottlowski <ikottlowski@bitwarden.com>
This commit is contained in:
3054
util/PostgresMigrations/Migrations/20250321102623_OpaqueKex.Designer.cs
generated
Normal file
3054
util/PostgresMigrations/Migrations/20250321102623_OpaqueKex.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,38 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Bit.PostgresMigrations.Migrations;
|
||||
|
||||
/// <inheritdoc />
|
||||
public partial class OpaqueKex : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "OpaqueKeyExchangeCredential",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uuid", nullable: false),
|
||||
UserId = table.Column<Guid>(type: "uuid", nullable: false),
|
||||
CipherConfiguration = table.Column<string>(type: "text", nullable: true),
|
||||
CredentialBlob = table.Column<string>(type: "text", nullable: true),
|
||||
EncryptedPublicKey = table.Column<string>(type: "text", nullable: true),
|
||||
EncryptedPrivateKey = table.Column<string>(type: "text", nullable: true),
|
||||
EncryptedUserKey = table.Column<string>(type: "text", nullable: true),
|
||||
CreationDate = table.Column<DateTime>(type: "timestamp with time zone", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_OpaqueKeyExchangeCredential", x => x.Id);
|
||||
});
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "OpaqueKeyExchangeCredential");
|
||||
}
|
||||
}
|
@ -23,6 +23,37 @@ namespace Bit.PostgresMigrations.Migrations
|
||||
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("Bit.Core.Auth.Entities.OpaqueKeyExchangeCredential", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<string>("CipherConfiguration")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<DateTime>("CreationDate")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<string>("CredentialBlob")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("EncryptedPrivateKey")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("EncryptedPublicKey")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("EncryptedUserKey")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<Guid>("UserId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("OpaqueKeyExchangeCredential", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Bit.Infrastructure.EntityFramework.AdminConsole.Models.Organization", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
@ -410,10 +441,6 @@ namespace Bit.PostgresMigrations.Migrations
|
||||
b.Property<DateTime?>("AuthenticationDate")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<string>("RequestCountryName")
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("character varying(200)");
|
||||
|
||||
b.Property<DateTime>("CreationDate")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
@ -429,6 +456,10 @@ namespace Bit.PostgresMigrations.Migrations
|
||||
b.Property<string>("PublicKey")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("RequestCountryName")
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("character varying(200)");
|
||||
|
||||
b.Property<string>("RequestDeviceIdentifier")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("character varying(50)");
|
||||
|
Reference in New Issue
Block a user