2024-07-04 11:02:45 +05:00
|
|
|
using System;
|
2024-04-01 15:32:48 +05:00
|
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
|
|
|
|
#nullable disable
|
|
|
|
|
|
|
|
namespace AsbCloudDb.Migrations
|
|
|
|
{
|
|
|
|
/// <inheritdoc />
|
|
|
|
public partial class Update_DetectedOperation : Migration
|
|
|
|
{
|
|
|
|
/// <inheritdoc />
|
|
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
|
|
{
|
|
|
|
migrationBuilder.AlterColumn<int>(
|
|
|
|
name: "id_user",
|
|
|
|
table: "t_detected_operation",
|
|
|
|
type: "integer",
|
|
|
|
nullable: true,
|
|
|
|
comment: "Id пользователя по телеметрии на момент начала операции",
|
|
|
|
oldClrType: typeof(int),
|
|
|
|
oldType: "integer",
|
|
|
|
oldComment: "Id пользователя по телеметрии на момент начала операции");
|
|
|
|
|
|
|
|
migrationBuilder.AddColumn<DateTimeOffset>(
|
|
|
|
name: "creation",
|
|
|
|
table: "t_detected_operation",
|
|
|
|
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)),
|
|
|
|
comment: "дата создания");
|
|
|
|
|
|
|
|
migrationBuilder.AddColumn<int>(
|
|
|
|
name: "id_editor",
|
|
|
|
table: "t_detected_operation",
|
|
|
|
type: "integer",
|
|
|
|
nullable: true,
|
|
|
|
comment: "Редактор");
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <inheritdoc />
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
|
|
{
|
|
|
|
migrationBuilder.DropColumn(
|
|
|
|
name: "creation",
|
|
|
|
table: "t_detected_operation");
|
|
|
|
|
|
|
|
migrationBuilder.DropColumn(
|
|
|
|
name: "id_editor",
|
|
|
|
table: "t_detected_operation");
|
|
|
|
|
|
|
|
migrationBuilder.AlterColumn<int>(
|
|
|
|
name: "id_user",
|
|
|
|
table: "t_detected_operation",
|
|
|
|
type: "integer",
|
|
|
|
nullable: false,
|
|
|
|
defaultValue: 0,
|
|
|
|
comment: "Id пользователя по телеметрии на момент начала операции",
|
|
|
|
oldClrType: typeof(int),
|
|
|
|
oldType: "integer",
|
|
|
|
oldNullable: true,
|
|
|
|
oldComment: "Id пользователя по телеметрии на момент начала операции");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|