DD.WellWorkover.Cloud/AsbCloudDb/Migrations/20220815093950_AddDataDefault_SubsystemFiller.cs
eugeniy_ivanov 20f79f461f - В SubsystemStatDto свойство UsedTimeHours double. TimeSpan.
- В SubsystemDto свойство Subsystem переименовано в SubsystemName
- миграция для заполнения Subsystem
- метод bsystemOperationTimeService.GetSubsystemByIdWellAsync перенесен в SubsystemService.
2022-08-15 15:08:17 +05:00

105 lines
3.5 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace AsbCloudDb.Migrations
{
public partial class AddDataDefault_SubsystemFiller : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "name",
table: "t_subsystem",
type: "character varying(255)",
maxLength: 255,
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "character varying(255)",
oldMaxLength: 255,
oldNullable: true);
migrationBuilder.InsertData(
table: "t_subsystem",
columns: new[] { "id", "description", "name" },
values: new object[,]
{
{ 1, "Ручной", "Ручной" },
{ 2, "Бурение в роторе", "Бурение в роторе" },
{ 3, "Проработка", "Проработка" },
{ 4, "Бурение в слайде", "Бурение в слайде" },
{ 5, "Спуск СПО", "Спуск СПО" },
{ 6, "Подъем СПО", "Подъем СПО" },
{ 7, "Подъем с проработкой", "Подъем с проработкой" },
{ 11, "Блокировка", "Блокировка" },
{ 65536, "Spin master", "Spin master" },
{ 65537, "Torque master", "Torque master" }
});
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DeleteData(
table: "t_subsystem",
keyColumn: "id",
keyValue: 1);
migrationBuilder.DeleteData(
table: "t_subsystem",
keyColumn: "id",
keyValue: 2);
migrationBuilder.DeleteData(
table: "t_subsystem",
keyColumn: "id",
keyValue: 3);
migrationBuilder.DeleteData(
table: "t_subsystem",
keyColumn: "id",
keyValue: 4);
migrationBuilder.DeleteData(
table: "t_subsystem",
keyColumn: "id",
keyValue: 5);
migrationBuilder.DeleteData(
table: "t_subsystem",
keyColumn: "id",
keyValue: 6);
migrationBuilder.DeleteData(
table: "t_subsystem",
keyColumn: "id",
keyValue: 7);
migrationBuilder.DeleteData(
table: "t_subsystem",
keyColumn: "id",
keyValue: 11);
migrationBuilder.DeleteData(
table: "t_subsystem",
keyColumn: "id",
keyValue: 65536);
migrationBuilder.DeleteData(
table: "t_subsystem",
keyColumn: "id",
keyValue: 65537);
migrationBuilder.AlterColumn<string>(
name: "name",
table: "t_subsystem",
type: "character varying(255)",
maxLength: 255,
nullable: true,
oldClrType: typeof(string),
oldType: "character varying(255)",
oldMaxLength: 255);
}
}
}