Refactored Evidence to UpdateBy is optional When creating evidence
This commit is contained in:
@@ -33,8 +33,8 @@ public sealed class EvidenceConfiguration : IEntityTypeConfiguration<Evidence>
|
|||||||
builder.Property(f => f.IndicatorId).IsRequired();
|
builder.Property(f => f.IndicatorId).IsRequired();
|
||||||
builder.Property(f => f.ActivityId).IsRequired();
|
builder.Property(f => f.ActivityId).IsRequired();
|
||||||
builder.Property(f => f.CreatedBy).IsRequired();
|
builder.Property(f => f.CreatedBy).IsRequired();
|
||||||
builder.Property(f => f.UpdatedBy).IsRequired();
|
|
||||||
builder.Property(f => f.CreatedAt).IsRequired().HasDefaultValueSql("now()");
|
builder.Property(f => f.CreatedAt).IsRequired().HasDefaultValueSql("now()");
|
||||||
|
builder.Property(f => f.UpdatedBy).IsRequired(false);
|
||||||
builder.Property(f => f.UpdatedAt).IsRequired(false);
|
builder.Property(f => f.UpdatedAt).IsRequired(false);
|
||||||
builder.Property(f => f.Version).IsRequired().HasDefaultValue(1);
|
builder.Property(f => f.Version).IsRequired().HasDefaultValue(1);
|
||||||
builder.Property(f => f.DocumentUrl).IsRequired();
|
builder.Property(f => f.DocumentUrl).IsRequired();
|
||||||
|
|||||||
+2519
File diff suppressed because it is too large
Load Diff
+37
@@ -0,0 +1,37 @@
|
|||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace PostFundManagement.Infrastructure.Database.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class UpdatedByIsOptionalOnEvidence : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AlterColumn<Guid>(
|
||||||
|
name: "UpdatedBy",
|
||||||
|
table: "Evidences",
|
||||||
|
type: "uuid",
|
||||||
|
nullable: true,
|
||||||
|
oldClrType: typeof(Guid),
|
||||||
|
oldType: "uuid");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AlterColumn<Guid>(
|
||||||
|
name: "UpdatedBy",
|
||||||
|
table: "Evidences",
|
||||||
|
type: "uuid",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
|
||||||
|
oldClrType: typeof(Guid),
|
||||||
|
oldType: "uuid",
|
||||||
|
oldNullable: true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+1
-1
@@ -604,7 +604,7 @@ namespace PostFundManagement.Infrastructure.Database.Migrations
|
|||||||
b.Property<DateTime?>("UpdatedAt")
|
b.Property<DateTime?>("UpdatedAt")
|
||||||
.HasColumnType("timestamp with time zone");
|
.HasColumnType("timestamp with time zone");
|
||||||
|
|
||||||
b.Property<Guid>("UpdatedBy")
|
b.Property<Guid?>("UpdatedBy")
|
||||||
.HasColumnType("uuid");
|
.HasColumnType("uuid");
|
||||||
|
|
||||||
b.Property<int>("Version")
|
b.Property<int>("Version")
|
||||||
|
|||||||
Reference in New Issue
Block a user