DD.WellWorkover.Cloud/AsbCloudDb/Migrations/20220310113607_Add_Mse_to_dataSaub.cs

57 lines
1.9 KiB
C#
Raw Normal View History

2022-03-10 17:18:30 +05:00
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace AsbCloudDb.Migrations
{
public partial class Add_Mse_to_dataSaub : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DeleteData(
table: "t_relation_user_user_role",
keyColumns: new[] { "id_user", "id_user_role" },
keyValues: new object[] { 1, 2 });
migrationBuilder.AddColumn<float>(
name: "mse",
table: "t_telemetry_data_saub",
type: "real",
nullable: true,
comment: "MSE");
migrationBuilder.AlterColumn<int>(
name: "id_mark_type",
table: "t_file_mark",
type: "integer",
nullable: false,
comment: "0 - отклонен, 1 - согласован",
oldClrType: typeof(int),
oldType: "integer",
oldComment: "0 - Согласован");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "mse",
table: "t_telemetry_data_saub");
migrationBuilder.AlterColumn<int>(
name: "id_mark_type",
table: "t_file_mark",
type: "integer",
nullable: false,
comment: "0 - Согласован",
oldClrType: typeof(int),
oldType: "integer",
oldComment: "0 - отклонен, 1 - согласован");
migrationBuilder.InsertData(
table: "t_relation_user_user_role",
columns: new[] { "id_user", "id_user_role" },
values: new object[] { 1, 2 });
}
}
}