forked from ddrilling/AsbCloudServer
35 lines
1.1 KiB
C#
35 lines
1.1 KiB
C#
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|||
|
|
|||
|
#nullable disable
|
|||
|
|
|||
|
namespace AsbCloudDb.Migrations
|
|||
|
{
|
|||
|
public partial class DrillingProgram_parts_Add_unique_constrain : Migration
|
|||
|
{
|
|||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|||
|
{
|
|||
|
migrationBuilder.DropIndex(
|
|||
|
name: "IX_t_drilling_program_part_id_well",
|
|||
|
table: "t_drilling_program_part");
|
|||
|
|
|||
|
migrationBuilder.CreateIndex(
|
|||
|
name: "IX_t_drilling_program_part_id_well_id_file_category",
|
|||
|
table: "t_drilling_program_part",
|
|||
|
columns: new[] { "id_well", "id_file_category" },
|
|||
|
unique: true);
|
|||
|
}
|
|||
|
|
|||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|||
|
{
|
|||
|
migrationBuilder.DropIndex(
|
|||
|
name: "IX_t_drilling_program_part_id_well_id_file_category",
|
|||
|
table: "t_drilling_program_part");
|
|||
|
|
|||
|
migrationBuilder.CreateIndex(
|
|||
|
name: "IX_t_drilling_program_part_id_well",
|
|||
|
table: "t_drilling_program_part",
|
|||
|
column: "id_well");
|
|||
|
}
|
|||
|
}
|
|||
|
}
|