feat(dal, api): в таблицу RobotHistories добавлено поле RobotIp. Из таблицы AppInWorks удалены поля Next/LastRun. В историю работы роботов, пишется ip робота.

This commit is contained in:
Mikhail Trubnikov
2024-07-22 14:48:44 +10:00
parent fc197a6a5b
commit 08b8fba8a5
9 changed files with 3015 additions and 14 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,50 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace PARR.DAL.Migrations
{
/// <inheritdoc />
public partial class tblRobotHistoriesAddRobotIp : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "LastRun",
table: "ApplicationsInWorks");
migrationBuilder.DropColumn(
name: "NextRun",
table: "ApplicationsInWorks");
migrationBuilder.AddColumn<string>(
name: "RobotIp",
table: "RobotHistories",
type: "text",
nullable: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "RobotIp",
table: "RobotHistories");
migrationBuilder.AddColumn<DateTimeOffset>(
name: "LastRun",
table: "ApplicationsInWorks",
type: "timestamp with time zone",
nullable: true);
migrationBuilder.AddColumn<DateTimeOffset>(
name: "NextRun",
table: "ApplicationsInWorks",
type: "timestamp with time zone",
nullable: false,
defaultValue: new DateTimeOffset(new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)));
}
}
}

View File

@@ -269,12 +269,6 @@ namespace PARR.DAL.Migrations
b.Property<bool>("IsAutoDistributionEnabled")
.HasColumnType("boolean");
b.Property<DateTimeOffset?>("LastRun")
.HasColumnType("timestamp with time zone");
b.Property<DateTimeOffset>("NextRun")
.HasColumnType("timestamp with time zone");
b.Property<DateTimeOffset>("ReferenceDate")
.HasColumnType("timestamp with time zone");
@@ -1896,6 +1890,9 @@ namespace PARR.DAL.Migrations
b.Property<Guid>("RobotConfigurationId")
.HasColumnType("uuid");
b.Property<string>("RobotIp")
.HasColumnType("text");
b.Property<string>("RobotMessage")
.HasColumnType("text");

View File

@@ -26,6 +26,11 @@ namespace PARR.DAL.Models
public Guid RobotConfigurationId { get; set; }
/// <summary>
/// IP адрес робота
/// </summary>
public string? RobotIp { get; set; }
///// <summary>
///// Уникальный идентификатор серии выполнения, нужен для сопоставления истории
///// </summary>