Reorder SectionsTypes to keep existing operations

This commit is contained in:
Фролов 2021-12-22 19:18:09 +05:00
parent 95df836155
commit e29dbf49df
4 changed files with 3633 additions and 141 deletions

View File

@ -0,0 +1,405 @@
using Microsoft.EntityFrameworkCore.Migrations;
namespace AsbCloudDb.Migrations
{
public partial class Reorder_SectionsTypes_to_keep_existing_operations : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.UpdateData(
table: "t_well_section_type",
keyColumn: "id",
keyValue: 2,
column: "caption",
value: "Направление 1");
migrationBuilder.UpdateData(
table: "t_well_section_type",
keyColumn: "id",
keyValue: 3,
column: "caption",
value: "Кондуктор 1");
migrationBuilder.UpdateData(
table: "t_well_section_type",
keyColumn: "id",
keyValue: 4,
column: "caption",
value: "Эксплуатационная колонна 1");
migrationBuilder.UpdateData(
table: "t_well_section_type",
keyColumn: "id",
keyValue: 5,
column: "caption",
value: "Транспортный ствол 1");
migrationBuilder.UpdateData(
table: "t_well_section_type",
keyColumn: "id",
keyValue: 6,
column: "caption",
value: "Хвостовик 1");
migrationBuilder.UpdateData(
table: "t_well_section_type",
keyColumn: "id",
keyValue: 7,
column: "caption",
value: "Пилотный ствол 2");
migrationBuilder.UpdateData(
table: "t_well_section_type",
keyColumn: "id",
keyValue: 8,
column: "caption",
value: "Направление 2");
migrationBuilder.UpdateData(
table: "t_well_section_type",
keyColumn: "id",
keyValue: 9,
column: "caption",
value: "Кондуктор 2");
migrationBuilder.UpdateData(
table: "t_well_section_type",
keyColumn: "id",
keyValue: 10,
column: "caption",
value: "Эксплуатационная колонна 2");
migrationBuilder.UpdateData(
table: "t_well_section_type",
keyColumn: "id",
keyValue: 11,
column: "caption",
value: "Транспортный ствол 2");
migrationBuilder.UpdateData(
table: "t_well_section_type",
keyColumn: "id",
keyValue: 12,
column: "caption",
value: "Хвостовик 2");
migrationBuilder.UpdateData(
table: "t_well_section_type",
keyColumn: "id",
keyValue: 13,
column: "caption",
value: "Пилотный ствол 3");
migrationBuilder.UpdateData(
table: "t_well_section_type",
keyColumn: "id",
keyValue: 14,
column: "caption",
value: "Направление 3");
migrationBuilder.UpdateData(
table: "t_well_section_type",
keyColumn: "id",
keyValue: 15,
column: "caption",
value: "Кондуктор 3");
migrationBuilder.UpdateData(
table: "t_well_section_type",
keyColumn: "id",
keyValue: 16,
column: "caption",
value: "Эксплуатационная колонна 3");
migrationBuilder.UpdateData(
table: "t_well_section_type",
keyColumn: "id",
keyValue: 17,
column: "caption",
value: "Транспортный ствол 3");
migrationBuilder.UpdateData(
table: "t_well_section_type",
keyColumn: "id",
keyValue: 18,
column: "caption",
value: "Хвостовик 3");
migrationBuilder.UpdateData(
table: "t_well_section_type",
keyColumn: "id",
keyValue: 19,
column: "caption",
value: "Пилотный ствол 4");
migrationBuilder.UpdateData(
table: "t_well_section_type",
keyColumn: "id",
keyValue: 20,
column: "caption",
value: "Направление 4");
migrationBuilder.UpdateData(
table: "t_well_section_type",
keyColumn: "id",
keyValue: 21,
column: "caption",
value: "Кондуктор 4");
migrationBuilder.UpdateData(
table: "t_well_section_type",
keyColumn: "id",
keyValue: 22,
column: "caption",
value: "Эксплуатационная колонна 4");
migrationBuilder.UpdateData(
table: "t_well_section_type",
keyColumn: "id",
keyValue: 23,
column: "caption",
value: "Транспортный ствол 4");
migrationBuilder.UpdateData(
table: "t_well_section_type",
keyColumn: "id",
keyValue: 24,
column: "caption",
value: "Хвостовик 4");
migrationBuilder.UpdateData(
table: "t_well_section_type",
keyColumn: "id",
keyValue: 25,
column: "caption",
value: "Пилотный ствол 5");
migrationBuilder.UpdateData(
table: "t_well_section_type",
keyColumn: "id",
keyValue: 26,
column: "caption",
value: "Направление 5");
migrationBuilder.UpdateData(
table: "t_well_section_type",
keyColumn: "id",
keyValue: 27,
column: "caption",
value: "Кондуктор 5");
migrationBuilder.UpdateData(
table: "t_well_section_type",
keyColumn: "id",
keyValue: 28,
column: "caption",
value: "Эксплуатационная колонна 5");
migrationBuilder.UpdateData(
table: "t_well_section_type",
keyColumn: "id",
keyValue: 29,
column: "caption",
value: "Транспортный ствол 5");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.UpdateData(
table: "t_well_section_type",
keyColumn: "id",
keyValue: 2,
column: "caption",
value: "Пилотный ствол 2");
migrationBuilder.UpdateData(
table: "t_well_section_type",
keyColumn: "id",
keyValue: 3,
column: "caption",
value: "Пилотный ствол 3");
migrationBuilder.UpdateData(
table: "t_well_section_type",
keyColumn: "id",
keyValue: 4,
column: "caption",
value: "Пилотный ствол 4");
migrationBuilder.UpdateData(
table: "t_well_section_type",
keyColumn: "id",
keyValue: 5,
column: "caption",
value: "Пилотный ствол 5");
migrationBuilder.UpdateData(
table: "t_well_section_type",
keyColumn: "id",
keyValue: 6,
column: "caption",
value: "Направление 1");
migrationBuilder.UpdateData(
table: "t_well_section_type",
keyColumn: "id",
keyValue: 7,
column: "caption",
value: "Направление 2");
migrationBuilder.UpdateData(
table: "t_well_section_type",
keyColumn: "id",
keyValue: 8,
column: "caption",
value: "Направление 3");
migrationBuilder.UpdateData(
table: "t_well_section_type",
keyColumn: "id",
keyValue: 9,
column: "caption",
value: "Направление 4");
migrationBuilder.UpdateData(
table: "t_well_section_type",
keyColumn: "id",
keyValue: 10,
column: "caption",
value: "Направление 5");
migrationBuilder.UpdateData(
table: "t_well_section_type",
keyColumn: "id",
keyValue: 11,
column: "caption",
value: "Кондуктор 1");
migrationBuilder.UpdateData(
table: "t_well_section_type",
keyColumn: "id",
keyValue: 12,
column: "caption",
value: "Кондуктор 2");
migrationBuilder.UpdateData(
table: "t_well_section_type",
keyColumn: "id",
keyValue: 13,
column: "caption",
value: "Кондуктор 3");
migrationBuilder.UpdateData(
table: "t_well_section_type",
keyColumn: "id",
keyValue: 14,
column: "caption",
value: "Кондуктор 4");
migrationBuilder.UpdateData(
table: "t_well_section_type",
keyColumn: "id",
keyValue: 15,
column: "caption",
value: "Кондуктор 5");
migrationBuilder.UpdateData(
table: "t_well_section_type",
keyColumn: "id",
keyValue: 16,
column: "caption",
value: "Эксплуатационная колонна 1");
migrationBuilder.UpdateData(
table: "t_well_section_type",
keyColumn: "id",
keyValue: 17,
column: "caption",
value: "Эксплуатационная колонна 2");
migrationBuilder.UpdateData(
table: "t_well_section_type",
keyColumn: "id",
keyValue: 18,
column: "caption",
value: "Эксплуатационная колонна 3");
migrationBuilder.UpdateData(
table: "t_well_section_type",
keyColumn: "id",
keyValue: 19,
column: "caption",
value: "Эксплуатационная колонна 4");
migrationBuilder.UpdateData(
table: "t_well_section_type",
keyColumn: "id",
keyValue: 20,
column: "caption",
value: "Эксплуатационная колонна 5");
migrationBuilder.UpdateData(
table: "t_well_section_type",
keyColumn: "id",
keyValue: 21,
column: "caption",
value: "Транспортный ствол 1");
migrationBuilder.UpdateData(
table: "t_well_section_type",
keyColumn: "id",
keyValue: 22,
column: "caption",
value: "Транспортный ствол 2");
migrationBuilder.UpdateData(
table: "t_well_section_type",
keyColumn: "id",
keyValue: 23,
column: "caption",
value: "Транспортный ствол 3");
migrationBuilder.UpdateData(
table: "t_well_section_type",
keyColumn: "id",
keyValue: 24,
column: "caption",
value: "Транспортный ствол 4");
migrationBuilder.UpdateData(
table: "t_well_section_type",
keyColumn: "id",
keyValue: 25,
column: "caption",
value: "Транспортный ствол 5");
migrationBuilder.UpdateData(
table: "t_well_section_type",
keyColumn: "id",
keyValue: 26,
column: "caption",
value: "Хвостовик 1");
migrationBuilder.UpdateData(
table: "t_well_section_type",
keyColumn: "id",
keyValue: 27,
column: "caption",
value: "Хвостовик 2");
migrationBuilder.UpdateData(
table: "t_well_section_type",
keyColumn: "id",
keyValue: 28,
column: "caption",
value: "Хвостовик 3");
migrationBuilder.UpdateData(
table: "t_well_section_type",
keyColumn: "id",
keyValue: 29,
column: "caption",
value: "Хвостовик 4");
}
}
}

View File

@ -1672,6 +1672,11 @@ namespace AsbCloudDb.Migrations
.HasColumnType("integer")
.HasColumnName("id_company");
b.Property<short?>("IdState")
.HasColumnType("smallint")
.HasColumnName("state")
.HasComment("состояние:\n100 - удален");
b.Property<string>("Login")
.HasMaxLength(255)
.HasColumnType("character varying(255)")
@ -1707,11 +1712,6 @@ namespace AsbCloudDb.Migrations
.HasColumnName("position")
.HasComment("email");
b.Property<short?>("State")
.HasColumnType("smallint")
.HasColumnName("state")
.HasComment("состояние:\n100 - удален");
b.Property<string>("Surname")
.HasMaxLength(255)
.HasColumnType("character varying(255)")
@ -2411,144 +2411,144 @@ namespace AsbCloudDb.Migrations
new
{
Id = 2,
Caption = "Пилотный ствол 2"
},
new
{
Id = 3,
Caption = "Пилотный ствол 3"
},
new
{
Id = 4,
Caption = "Пилотный ствол 4"
},
new
{
Id = 5,
Caption = "Пилотный ствол 5"
},
new
{
Id = 6,
Caption = "Направление 1"
},
new
{
Id = 7,
Caption = "Направление 2"
},
new
{
Id = 8,
Caption = "Направление 3"
},
new
{
Id = 9,
Caption = "Направление 4"
},
new
{
Id = 10,
Caption = "Направление 5"
},
new
{
Id = 11,
Id = 3,
Caption = "Кондуктор 1"
},
new
{
Id = 12,
Caption = "Кондуктор 2"
},
new
{
Id = 13,
Caption = "Кондуктор 3"
},
new
{
Id = 14,
Caption = "Кондуктор 4"
},
new
{
Id = 15,
Caption = "Кондуктор 5"
},
new
{
Id = 16,
Id = 4,
Caption = "Эксплуатационная колонна 1"
},
new
{
Id = 17,
Caption = "Эксплуатационная колонна 2"
},
new
{
Id = 18,
Caption = "Эксплуатационная колонна 3"
},
new
{
Id = 19,
Caption = "Эксплуатационная колонна 4"
},
new
{
Id = 20,
Caption = "Эксплуатационная колонна 5"
},
new
{
Id = 21,
Id = 5,
Caption = "Транспортный ствол 1"
},
new
{
Id = 22,
Caption = "Транспортный ствол 2"
},
new
{
Id = 23,
Caption = "Транспортный ствол 3"
},
new
{
Id = 24,
Caption = "Транспортный ствол 4"
},
new
{
Id = 25,
Caption = "Транспортный ствол 5"
},
new
{
Id = 26,
Id = 6,
Caption = "Хвостовик 1"
},
new
{
Id = 27,
Id = 7,
Caption = "Пилотный ствол 2"
},
new
{
Id = 8,
Caption = "Направление 2"
},
new
{
Id = 9,
Caption = "Кондуктор 2"
},
new
{
Id = 10,
Caption = "Эксплуатационная колонна 2"
},
new
{
Id = 11,
Caption = "Транспортный ствол 2"
},
new
{
Id = 12,
Caption = "Хвостовик 2"
},
new
{
Id = 28,
Id = 13,
Caption = "Пилотный ствол 3"
},
new
{
Id = 14,
Caption = "Направление 3"
},
new
{
Id = 15,
Caption = "Кондуктор 3"
},
new
{
Id = 16,
Caption = "Эксплуатационная колонна 3"
},
new
{
Id = 17,
Caption = "Транспортный ствол 3"
},
new
{
Id = 18,
Caption = "Хвостовик 3"
},
new
{
Id = 29,
Id = 19,
Caption = "Пилотный ствол 4"
},
new
{
Id = 20,
Caption = "Направление 4"
},
new
{
Id = 21,
Caption = "Кондуктор 4"
},
new
{
Id = 22,
Caption = "Эксплуатационная колонна 4"
},
new
{
Id = 23,
Caption = "Транспортный ствол 4"
},
new
{
Id = 24,
Caption = "Хвостовик 4"
},
new
{
Id = 25,
Caption = "Пилотный ствол 5"
},
new
{
Id = 26,
Caption = "Направление 5"
},
new
{
Id = 27,
Caption = "Кондуктор 5"
},
new
{
Id = 28,
Caption = "Эксплуатационная колонна 5"
},
new
{
Id = 29,
Caption = "Транспортный ствол 5"
},
new
{
Id = 30,
Caption = "Хвостовик 5"

View File

@ -403,35 +403,39 @@ namespace AsbCloudDb.Model
{
entity.HasData(new List<WellSectionType>{
new WellSectionType{ Id = 1, Caption = "Пилотный ствол 1"},
new WellSectionType{ Id = 2, Caption = "Пилотный ствол 2"},
new WellSectionType{ Id = 3, Caption = "Пилотный ствол 3"},
new WellSectionType{ Id = 4, Caption = "Пилотный ствол 4"},
new WellSectionType{ Id = 5, Caption = "Пилотный ствол 5"},
new WellSectionType{ Id = 6, Caption = "Направление 1"},
new WellSectionType{ Id = 7, Caption = "Направление 2"},
new WellSectionType{ Id = 8, Caption = "Направление 3"},
new WellSectionType{ Id = 9, Caption = "Направление 4"},
new WellSectionType{ Id = 10, Caption = "Направление 5"},
new WellSectionType{ Id = 11, Caption = "Кондуктор 1"},
new WellSectionType{ Id = 12, Caption = "Кондуктор 2"},
new WellSectionType{ Id = 13, Caption = "Кондуктор 3"},
new WellSectionType{ Id = 14, Caption = "Кондуктор 4"},
new WellSectionType{ Id = 15, Caption = "Кондуктор 5"},
new WellSectionType{ Id = 16, Caption = "Эксплуатационная колонна 1"},
new WellSectionType{ Id = 17, Caption = "Эксплуатационная колонна 2"},
new WellSectionType{ Id = 18, Caption = "Эксплуатационная колонна 3"},
new WellSectionType{ Id = 19, Caption = "Эксплуатационная колонна 4"},
new WellSectionType{ Id = 20, Caption = "Эксплуатационная колонна 5"},
new WellSectionType{ Id = 21, Caption = "Транспортный ствол 1"},
new WellSectionType{ Id = 22, Caption = "Транспортный ствол 2"},
new WellSectionType{ Id = 23, Caption = "Транспортный ствол 3"},
new WellSectionType{ Id = 24, Caption = "Транспортный ствол 4"},
new WellSectionType{ Id = 25, Caption = "Транспортный ствол 5"},
new WellSectionType{ Id = 26, Caption = "Хвостовик 1"},
new WellSectionType{ Id = 27, Caption = "Хвостовик 2"},
new WellSectionType{ Id = 28, Caption = "Хвостовик 3"},
new WellSectionType{ Id = 29, Caption = "Хвостовик 4"},
new WellSectionType{ Id = 30, Caption = "Хвостовик 5"}
new WellSectionType{ Id = 2, Caption = "Направление 1"},
new WellSectionType{ Id = 3, Caption = "Кондуктор 1"},
new WellSectionType{ Id = 4, Caption = "Эксплуатационная колонна 1"},
new WellSectionType{ Id = 5, Caption = "Транспортный ствол 1"},
new WellSectionType{ Id = 6, Caption = "Хвостовик 1"},
new WellSectionType{ Id = 7, Caption = "Пилотный ствол 2"},
new WellSectionType{ Id = 8, Caption = "Направление 2"},
new WellSectionType{ Id = 9, Caption = "Кондуктор 2"},
new WellSectionType{ Id = 10, Caption = "Эксплуатационная колонна 2"},
new WellSectionType{ Id = 11, Caption = "Транспортный ствол 2"},
new WellSectionType{ Id = 12, Caption = "Хвостовик 2"},
new WellSectionType{ Id = 13, Caption = "Пилотный ствол 3"},
new WellSectionType{ Id = 14, Caption = "Направление 3"},
new WellSectionType{ Id = 15, Caption = "Кондуктор 3"},
new WellSectionType{ Id = 16, Caption = "Эксплуатационная колонна 3"},
new WellSectionType{ Id = 17, Caption = "Транспортный ствол 3"},
new WellSectionType{ Id = 18, Caption = "Хвостовик 3"},
new WellSectionType{ Id = 19, Caption = "Пилотный ствол 4"},
new WellSectionType{ Id = 20, Caption = "Направление 4"},
new WellSectionType{ Id = 21, Caption = "Кондуктор 4"},
new WellSectionType{ Id = 22, Caption = "Эксплуатационная колонна 4"},
new WellSectionType{ Id = 23, Caption = "Транспортный ствол 4"},
new WellSectionType{ Id = 24, Caption = "Хвостовик 4"},
new WellSectionType{ Id = 25, Caption = "Пилотный ствол 5"},
new WellSectionType{ Id = 26, Caption = "Направление 5"},
new WellSectionType{ Id = 27, Caption = "Кондуктор 5"},
new WellSectionType{ Id = 28, Caption = "Эксплуатационная колонна 5"},
new WellSectionType{ Id = 29, Caption = "Транспортный ствол 5"},
new WellSectionType{ Id = 30, Caption = "Хвостовик 5"},
});
});