forked from ddrilling/AsbCloudServer
Изменение модели суточного отчёта
1. Изменён тип суточного отчёта 2. Добавлены новые миграции
This commit is contained in:
parent
4ff7b73403
commit
6b03e03865
9115
AsbCloudDb/Migrations/20231220091403_UpdateDateFormat_DailyReport.Designer.cs
generated
Normal file
9115
AsbCloudDb/Migrations/20231220091403_UpdateDateFormat_DailyReport.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,36 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace AsbCloudDb.Migrations
|
||||
{
|
||||
public partial class UpdateDateFormat_DailyReport : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<DateOnly>(
|
||||
name: "date",
|
||||
table: "t_daily_report",
|
||||
type: "date",
|
||||
nullable: false,
|
||||
comment: "Дата формирования отчёта",
|
||||
oldClrType: typeof(DateTime),
|
||||
oldType: "timestamp with time zone",
|
||||
oldComment: "Дата формирования отчёта");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<DateTime>(
|
||||
name: "date",
|
||||
table: "t_daily_report",
|
||||
type: "timestamp with time zone",
|
||||
nullable: false,
|
||||
comment: "Дата формирования отчёта",
|
||||
oldClrType: typeof(DateOnly),
|
||||
oldType: "date",
|
||||
oldComment: "Дата формирования отчёта");
|
||||
}
|
||||
}
|
||||
}
|
@ -278,8 +278,8 @@ namespace AsbCloudDb.Migrations
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<DateTime>("Date")
|
||||
.HasColumnType("timestamp with time zone")
|
||||
b.Property<DateOnly>("Date")
|
||||
.HasColumnType("date")
|
||||
.HasColumnName("date")
|
||||
.HasComment("Дата формирования отчёта");
|
||||
|
||||
|
@ -20,8 +20,8 @@ public class DailyReport : IId
|
||||
[Column("date_last_update", TypeName = "timestamp with time zone"), Comment("Дата последнего обновления")]
|
||||
public DateTime? DateLastUpdate { get; set; }
|
||||
|
||||
[Column("date", TypeName = "timestamp with time zone"), Comment("Дата формирования отчёта")]
|
||||
public DateTime Date { get; set; }
|
||||
[Column("date", TypeName = "date"), Comment("Дата формирования отчёта")]
|
||||
public DateOnly Date { get; set; }
|
||||
|
||||
[Column("sign_block", TypeName = "jsonb"), Comment("Подпись")]
|
||||
public SignBlock? SignBlock { get; set; }
|
||||
|
Loading…
Reference in New Issue
Block a user