forked from ddrilling/AsbCloudServer
Enable nullable on DailyReport
This commit is contained in:
parent
09d0d42688
commit
0c26c57d97
7028
AsbCloudDb/Migrations/20230220100934_Enable_nullable_on_daylyReport.Designer.cs
generated
Normal file
7028
AsbCloudDb/Migrations/20230220100934_Enable_nullable_on_daylyReport.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,37 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace AsbCloudDb.Migrations
|
||||
{
|
||||
public partial class Enable_nullable_on_daylyReport : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "info",
|
||||
table: "t_daily_report",
|
||||
type: "jsonb",
|
||||
nullable: false,
|
||||
defaultValue: "{}",
|
||||
comment: "Список параметров для отчёта",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "jsonb",
|
||||
oldNullable: true,
|
||||
oldComment: "Список параметров для отчёта");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "info",
|
||||
table: "t_daily_report",
|
||||
type: "jsonb",
|
||||
nullable: true,
|
||||
comment: "Список параметров для отчёта",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "jsonb",
|
||||
oldComment: "Список параметров для отчёта");
|
||||
}
|
||||
}
|
||||
}
|
@ -154,6 +154,7 @@ namespace AsbCloudDb.Migrations
|
||||
.HasComment("Дата отчёта");
|
||||
|
||||
b.Property<string>("Info")
|
||||
.IsRequired()
|
||||
.HasColumnType("jsonb")
|
||||
.HasColumnName("info")
|
||||
.HasComment("Список параметров для отчёта");
|
||||
|
@ -4,7 +4,6 @@ using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace AsbCloudDb.Model.DailyReport
|
||||
{
|
||||
#nullable disable
|
||||
[Table("t_daily_report"), Comment("Ежедневные отчёты")]
|
||||
public class DailyReport
|
||||
{
|
||||
@ -15,19 +14,9 @@ namespace AsbCloudDb.Model.DailyReport
|
||||
public DateTimeOffset StartDate { get; set; }
|
||||
|
||||
[Column("info", TypeName = "jsonb"), Comment("Список параметров для отчёта")]
|
||||
public DailyReportInfo Info { get; set; }
|
||||
public DailyReportInfo Info { get; set; } = null!;
|
||||
|
||||
[ForeignKey(nameof(IdWell))]
|
||||
public virtual Well Well { get; set; }
|
||||
public virtual Well Well { get; set; } = null!;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
@ -2,15 +2,13 @@
|
||||
|
||||
namespace AsbCloudDb.Model
|
||||
{
|
||||
#nullable disable
|
||||
public class DailyReportInfo
|
||||
{
|
||||
public Head Head { get; set; }
|
||||
public Bha Bha { get; set; }
|
||||
public NoDrilling NoDrilling { get; set; }
|
||||
public TimeBalance TimeBalance { get; set; }
|
||||
public Saub Saub { get; set; }
|
||||
public Sign Sign { get; set; }
|
||||
public Head Head { get; set; } = null!;
|
||||
public Bha Bha { get; set; } = new();
|
||||
public NoDrilling NoDrilling { get; set; } = new();
|
||||
public TimeBalance TimeBalance { get; set; } = new();
|
||||
public Saub Saub { get; set; } = new();
|
||||
public Sign Sign { get; set; } = new();
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user