forked from ddrilling/AsbCloudServer
Fix DB Models. Specify TypeName = "timestamp with time zone" on DateTime.
This commit is contained in:
parent
46c244a7d7
commit
a30c8883a5
3083
AsbCloudDb/Migrations/20211227053852_Specify_type_for_datetime_props.Designer.cs
generated
Normal file
3083
AsbCloudDb/Migrations/20211227053852_Specify_type_for_datetime_props.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,94 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace AsbCloudDb.Migrations
|
||||
{
|
||||
public partial class Specify_type_for_datetime_props : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<DateTime>(
|
||||
name: "date_start",
|
||||
table: "t_well_operation",
|
||||
type: "timestamp with time zone",
|
||||
nullable: false,
|
||||
comment: "Дата начала операции",
|
||||
oldClrType: typeof(DateTime),
|
||||
oldType: "timestamp without time zone",
|
||||
oldComment: "Дата начала операции");
|
||||
|
||||
migrationBuilder.AlterColumn<DateTime>(
|
||||
name: "timestamp",
|
||||
table: "t_measure",
|
||||
type: "timestamp with time zone",
|
||||
nullable: false,
|
||||
comment: "время добавления",
|
||||
oldClrType: typeof(DateTime),
|
||||
oldType: "timestamp without time zone",
|
||||
oldComment: "время добавления");
|
||||
|
||||
migrationBuilder.AlterColumn<DateTime>(
|
||||
name: "date_created",
|
||||
table: "t_file_mark",
|
||||
type: "timestamp with time zone",
|
||||
nullable: false,
|
||||
comment: "Дата совершенного действия",
|
||||
oldClrType: typeof(DateTime),
|
||||
oldType: "timestamp without time zone",
|
||||
oldComment: "Дата совершенного действия");
|
||||
|
||||
migrationBuilder.AlterColumn<DateTime>(
|
||||
name: "last_update",
|
||||
table: "t_drill_flow_chart",
|
||||
type: "timestamp with time zone",
|
||||
nullable: false,
|
||||
comment: "Дата последнего изменения",
|
||||
oldClrType: typeof(DateTime),
|
||||
oldType: "timestamp without time zone",
|
||||
oldComment: "Дата последнего изменения");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<DateTime>(
|
||||
name: "date_start",
|
||||
table: "t_well_operation",
|
||||
type: "timestamp without time zone",
|
||||
nullable: false,
|
||||
comment: "Дата начала операции",
|
||||
oldClrType: typeof(DateTime),
|
||||
oldType: "timestamp with time zone",
|
||||
oldComment: "Дата начала операции");
|
||||
|
||||
migrationBuilder.AlterColumn<DateTime>(
|
||||
name: "timestamp",
|
||||
table: "t_measure",
|
||||
type: "timestamp without time zone",
|
||||
nullable: false,
|
||||
comment: "время добавления",
|
||||
oldClrType: typeof(DateTime),
|
||||
oldType: "timestamp with time zone",
|
||||
oldComment: "время добавления");
|
||||
|
||||
migrationBuilder.AlterColumn<DateTime>(
|
||||
name: "date_created",
|
||||
table: "t_file_mark",
|
||||
type: "timestamp without time zone",
|
||||
nullable: false,
|
||||
comment: "Дата совершенного действия",
|
||||
oldClrType: typeof(DateTime),
|
||||
oldType: "timestamp with time zone",
|
||||
oldComment: "Дата совершенного действия");
|
||||
|
||||
migrationBuilder.AlterColumn<DateTime>(
|
||||
name: "last_update",
|
||||
table: "t_drill_flow_chart",
|
||||
type: "timestamp without time zone",
|
||||
nullable: false,
|
||||
comment: "Дата последнего изменения",
|
||||
oldClrType: typeof(DateTime),
|
||||
oldType: "timestamp with time zone",
|
||||
oldComment: "Дата последнего изменения");
|
||||
}
|
||||
}
|
||||
}
|
@ -205,7 +205,7 @@ namespace AsbCloudDb.Migrations
|
||||
.HasComment("Id типа операции");
|
||||
|
||||
b.Property<DateTime>("LastUpdate")
|
||||
.HasColumnType("timestamp without time zone")
|
||||
.HasColumnType("timestamp with time zone")
|
||||
.HasColumnName("last_update")
|
||||
.HasComment("Дата последнего изменения");
|
||||
|
||||
@ -548,7 +548,7 @@ namespace AsbCloudDb.Migrations
|
||||
.HasComment("Комментарий");
|
||||
|
||||
b.Property<DateTime>("DateCreated")
|
||||
.HasColumnType("timestamp without time zone")
|
||||
.HasColumnType("timestamp with time zone")
|
||||
.HasColumnName("date_created")
|
||||
.HasComment("Дата совершенного действия");
|
||||
|
||||
@ -613,7 +613,7 @@ namespace AsbCloudDb.Migrations
|
||||
.HasComment("Пометка удаленным");
|
||||
|
||||
b.Property<DateTime>("Timestamp")
|
||||
.HasColumnType("timestamp without time zone")
|
||||
.HasColumnType("timestamp with time zone")
|
||||
.HasColumnName("timestamp")
|
||||
.HasComment("время добавления");
|
||||
|
||||
@ -1888,7 +1888,7 @@ namespace AsbCloudDb.Migrations
|
||||
.HasComment("Комментарий");
|
||||
|
||||
b.Property<DateTime>("DateStart")
|
||||
.HasColumnType("timestamp without time zone")
|
||||
.HasColumnType("timestamp with time zone")
|
||||
.HasColumnName("date_start")
|
||||
.HasComment("Дата начала операции");
|
||||
|
||||
|
@ -19,7 +19,7 @@ namespace AsbCloudDb.Model
|
||||
[Column("id_operation_category"), Comment("Id типа операции")]
|
||||
public int IdWellOperationCategory { get; set; }
|
||||
|
||||
[Column("last_update"), Comment("Дата последнего изменения")]
|
||||
[Column("last_update", TypeName = "timestamp with time zone"), Comment("Дата последнего изменения")]
|
||||
public DateTime LastUpdate { get; set; }
|
||||
|
||||
[Column("depth_start"), Comment("Стартовая глубина")]
|
||||
|
@ -19,7 +19,7 @@ namespace AsbCloudDb.Model
|
||||
[Column("id_mark_type"), Comment("0 - Согласован")]
|
||||
public int IdMarkType { get; set; }
|
||||
|
||||
[Column("date_created"), Comment("Дата совершенного действия")]
|
||||
[Column("date_created", TypeName = "timestamp with time zone"), Comment("Дата совершенного действия")]
|
||||
public DateTime DateCreated { get; set; }
|
||||
|
||||
[Column("id_user"), Comment("id пользователя")]
|
||||
|
@ -20,7 +20,7 @@ namespace AsbCloudDb.Model
|
||||
[Column("id_category"), Comment("id категории")]
|
||||
public int IdCategory { get; set; }
|
||||
|
||||
[Column("timestamp"), Comment("время добавления")]
|
||||
[Column("timestamp", TypeName = "timestamp with time zone"), Comment("время добавления")]
|
||||
public DateTime Timestamp { get; set; }
|
||||
|
||||
[Column("data", TypeName = "jsonb"), Comment("Данные таблицы последних данных")]
|
||||
|
@ -31,7 +31,7 @@ namespace AsbCloudDb.Model
|
||||
[Column("depth_end"), Comment("Глубина после завершения операции, м")]
|
||||
public double DepthEnd { get; set; }
|
||||
|
||||
[Column("date_start"), Comment("Дата начала операции")]
|
||||
[Column("date_start", TypeName = "timestamp with time zone"), Comment("Дата начала операции")]
|
||||
public DateTime DateStart { get; set; }
|
||||
|
||||
[Column("duration_hours"), Comment("Продолжительность, часы")]
|
||||
|
Loading…
Reference in New Issue
Block a user