forked from ddrilling/AsbCloudServer
60 lines
2.1 KiB
C#
60 lines
2.1 KiB
C#
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|||
|
|
|||
|
namespace AsbCloudDb.Migrations
|
|||
|
{
|
|||
|
public partial class RenameTable_WellComposite : Migration
|
|||
|
{
|
|||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|||
|
{
|
|||
|
migrationBuilder.DropPrimaryKey(
|
|||
|
name: "PK_t_well_сomposite",
|
|||
|
table: "t_well_сomposite");
|
|||
|
|
|||
|
migrationBuilder.RenameTable(
|
|||
|
name: "t_well_сomposite",
|
|||
|
newName: "t_well_composite");
|
|||
|
|
|||
|
migrationBuilder.RenameIndex(
|
|||
|
name: "IX_t_well_сomposite_id_well_src",
|
|||
|
table: "t_well_composite",
|
|||
|
newName: "IX_t_well_composite_id_well_src");
|
|||
|
|
|||
|
migrationBuilder.RenameIndex(
|
|||
|
name: "IX_t_well_сomposite_id_well_section_type",
|
|||
|
table: "t_well_composite",
|
|||
|
newName: "IX_t_well_composite_id_well_section_type");
|
|||
|
|
|||
|
migrationBuilder.AddPrimaryKey(
|
|||
|
name: "PK_t_well_composite",
|
|||
|
table: "t_well_composite",
|
|||
|
columns: new[] { "id_well", "id_well_src", "id_well_section_type" });
|
|||
|
}
|
|||
|
|
|||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|||
|
{
|
|||
|
migrationBuilder.DropPrimaryKey(
|
|||
|
name: "PK_t_well_composite",
|
|||
|
table: "t_well_composite");
|
|||
|
|
|||
|
migrationBuilder.RenameTable(
|
|||
|
name: "t_well_composite",
|
|||
|
newName: "t_well_сomposite");
|
|||
|
|
|||
|
migrationBuilder.RenameIndex(
|
|||
|
name: "IX_t_well_composite_id_well_src",
|
|||
|
table: "t_well_сomposite",
|
|||
|
newName: "IX_t_well_сomposite_id_well_src");
|
|||
|
|
|||
|
migrationBuilder.RenameIndex(
|
|||
|
name: "IX_t_well_composite_id_well_section_type",
|
|||
|
table: "t_well_сomposite",
|
|||
|
newName: "IX_t_well_сomposite_id_well_section_type");
|
|||
|
|
|||
|
migrationBuilder.AddPrimaryKey(
|
|||
|
name: "PK_t_well_сomposite",
|
|||
|
table: "t_well_сomposite",
|
|||
|
columns: new[] { "id_well", "id_well_src", "id_well_section_type" });
|
|||
|
}
|
|||
|
}
|
|||
|
}
|