1
0
mirror of https://github.com/bitwarden/server synced 2025-12-21 10:43:44 +00:00

add migrations

This commit is contained in:
jaasen-livefront
2025-11-14 10:54:32 -08:00
parent a9e845d9bd
commit 314fa33a43
6 changed files with 7091 additions and 0 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,21 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Bit.PostgresMigrations.Migrations;
/// <inheritdoc />
public partial class AddCipherArchive : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
}
}

View File

@@ -2362,6 +2362,24 @@ namespace Bit.PostgresMigrations.Migrations
b.ToTable("Cipher", (string)null);
});
modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Vault.Models.CipherArchive", b =>
{
b.Property<Guid>("CipherId")
.HasColumnType("uuid");
b.Property<Guid>("UserId")
.HasColumnType("uuid");
b.Property<DateTime>("ArchivedDate")
.HasColumnType("timestamp with time zone");
b.HasKey("CipherId", "UserId");
b.HasIndex("UserId");
b.ToTable("CipherArchive", (string)null);
});
modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Vault.Models.Folder", b =>
{
b.Property<Guid>("Id")
@@ -3170,6 +3188,25 @@ namespace Bit.PostgresMigrations.Migrations
b.Navigation("User");
});
modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Vault.Models.CipherArchive", b =>
{
b.HasOne("Bit.Infrastructure.EntityFramework.Vault.Models.Cipher", "Cipher")
.WithMany()
.HasForeignKey("CipherId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("Bit.Infrastructure.EntityFramework.Models.User", "User")
.WithMany()
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Cipher");
b.Navigation("User");
});
modelBuilder.Entity("Bit.Infrastructure.EntityFramework.Vault.Models.Folder", b =>
{
b.HasOne("Bit.Infrastructure.EntityFramework.Models.User", "User")