Modified BatchId column in Document table to accept null values.
This commit is contained in:
parent
4d0901b4dd
commit
1eab6669e1
2643
Marco.Pms.DataAccess/Migrations/20250423095655_Made_BatchId_Nullable_In_Document.Designer.cs
generated
Normal file
2643
Marco.Pms.DataAccess/Migrations/20250423095655_Made_BatchId_Nullable_In_Document.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,41 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Marco.Pms.DataAccess.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class Made_BatchId_Nullable_In_Document : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "BatchId",
|
||||
table: "Documents",
|
||||
type: "char(36)",
|
||||
nullable: true,
|
||||
collation: "ascii_general_ci",
|
||||
oldClrType: typeof(Guid),
|
||||
oldType: "char(36)")
|
||||
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "BatchId",
|
||||
table: "Documents",
|
||||
type: "char(36)",
|
||||
nullable: false,
|
||||
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
|
||||
collation: "ascii_general_ci",
|
||||
oldClrType: typeof(Guid),
|
||||
oldType: "char(36)",
|
||||
oldNullable: true)
|
||||
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
||||
}
|
||||
}
|
||||
}
|
@ -284,7 +284,7 @@ namespace Marco.Pms.DataAccess.Migrations
|
||||
b.Property<string>("Base64Data")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<Guid>("BatchId")
|
||||
b.Property<Guid?>("BatchId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<string>("ContentType")
|
||||
|
@ -7,7 +7,7 @@ namespace Marco.Pms.Model.DocumentManager
|
||||
public class Document
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Guid BatchId { get; set; }
|
||||
public Guid? BatchId { get; set; }
|
||||
public string FileName { get; set; } = string.Empty;
|
||||
/// <summary>
|
||||
/// Full S3 object key
|
||||
|
Loading…
x
Reference in New Issue
Block a user