Skip to content

Commit

Permalink
Fixed migration
Browse files Browse the repository at this point in the history
  • Loading branch information
Aragas committed Feb 24, 2024
1 parent 5efb31a commit 550b350
Show file tree
Hide file tree
Showing 14 changed files with 125 additions and 668 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public class IdEntityConfiguration : BaseEntityConfiguration<IdEntity>
{
protected override void ConfigureModel(EntityTypeBuilder<IdEntity> builder)
{
builder.Property(x => x.FileId).HasColumnName("file_id").HasDefaultValueSql("hex(randomblob(3))");
builder.Property(x => x.FileId).HasColumnName("file_id");
builder.Property(x => x.CrashReportId).HasColumnName("crash_report_id");
builder.Property(x => x.Version).HasColumnName("version");
builder.Property(x => x.Created).HasColumnName("created");
Expand Down
8 changes: 4 additions & 4 deletions src/BUTR.CrashReportServer/Contexts/OldAppDbContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace BUTR.CrashReportServer.Contexts;

public class FileEntityConfiguration : BaseEntityConfiguration<FileEntity>
public class OldFileEntityConfiguration : BaseEntityConfiguration<FileEntity>
{
protected override void ConfigureModel(EntityTypeBuilder<FileEntity> builder)
{
Expand All @@ -23,7 +23,7 @@ protected override void ConfigureModel(EntityTypeBuilder<FileEntity> builder)
builder.Navigation(x => x.Id).AutoInclude();
}
}
public class IdEntityConfiguration : BaseEntityConfiguration<IdEntity>
public class OldIdEntityConfiguration : BaseEntityConfiguration<IdEntity>
{
protected override void ConfigureModel(EntityTypeBuilder<IdEntity> builder)
{
Expand Down Expand Up @@ -62,8 +62,8 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
{
base.OnModelCreating(modelBuilder);

modelBuilder.ApplyConfiguration(new IdEntityConfiguration());
modelBuilder.ApplyConfiguration(new FileEntityConfiguration());
modelBuilder.ApplyConfiguration(new OldIdEntityConfiguration());
modelBuilder.ApplyConfiguration(new OldFileEntityConfiguration());
modelBuilder.ApplyConfiguration(new OldJsonEntityConfiguration());
}
}

This file was deleted.

38 changes: 0 additions & 38 deletions src/BUTR.CrashReportServer/Migrations/20230401192915_Initial.cs

This file was deleted.

101 changes: 0 additions & 101 deletions src/BUTR.CrashReportServer/Migrations/20230927114922_Json.Designer.cs

This file was deleted.

118 changes: 0 additions & 118 deletions src/BUTR.CrashReportServer/Migrations/20230927114922_Json.cs

This file was deleted.

Loading

0 comments on commit 550b350

Please sign in to comment.