mirror of
https://github.com/Sea-Haven-Industries/shoc-backend.git
synced 2026-10-02 17:53:20 +00:00
Harden contextual search on the weekly board and expose paginated cross-week GET /board/search with date presets, FE filter params, SQL indexes, and unit tests.
48 lines
1.5 KiB
C#
48 lines
1.5 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.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");
|
|
}
|
|
}
|
|
}
|