mirror of
https://github.com/Sea-Haven-Industries/shoc-backend.git
synced 2026-09-30 04:53:11 +00:00
84 lines
2.8 KiB
C#
84 lines
2.8 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace Data.SeaHavenIndustries.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class Phase4_SearchIndexes : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "SiteCode",
|
|
table: "workOrders",
|
|
type: "nvarchar(32)",
|
|
maxLength: 32,
|
|
nullable: true,
|
|
oldClrType: typeof(string),
|
|
oldType: "nvarchar(max)");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "InternalWONumber",
|
|
table: "workOrders",
|
|
type: "nvarchar(11)",
|
|
maxLength: 11,
|
|
nullable: true,
|
|
oldClrType: typeof(string),
|
|
oldType: "nvarchar(max)");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_workOrders_SiteCode",
|
|
table: "workOrders",
|
|
column: "SiteCode",
|
|
filter: "[istemplate] = 0");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_workOrders_InternalWONumber",
|
|
table: "workOrders",
|
|
column: "InternalWONumber",
|
|
filter: "[istemplate] = 0");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_workOrders_LifecycleStatus_ScheduledDate",
|
|
table: "workOrders",
|
|
columns: new[] { "LifecycleStatus", "ScheduledDate" },
|
|
filter: "[istemplate] = 0");
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropIndex(
|
|
name: "IX_workOrders_SiteCode",
|
|
table: "workOrders");
|
|
|
|
migrationBuilder.DropIndex(
|
|
name: "IX_workOrders_InternalWONumber",
|
|
table: "workOrders");
|
|
|
|
migrationBuilder.DropIndex(
|
|
name: "IX_workOrders_LifecycleStatus_ScheduledDate",
|
|
table: "workOrders");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "SiteCode",
|
|
table: "workOrders",
|
|
type: "nvarchar(max)",
|
|
nullable: true,
|
|
oldClrType: typeof(string),
|
|
oldType: "nvarchar(32)",
|
|
oldMaxLength: 32);
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "InternalWONumber",
|
|
table: "workOrders",
|
|
type: "nvarchar(max)",
|
|
nullable: true,
|
|
oldClrType: typeof(string),
|
|
oldType: "nvarchar(11)",
|
|
oldMaxLength: 11);
|
|
}
|
|
}
|
|
}
|