82 lines
2.8 KiB
C#
82 lines
2.8 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace PowderCoating.Infrastructure.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class FixInventorySkuUniqueIndex : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropIndex(
|
|
name: "IX_InventoryItems_SKU",
|
|
table: "InventoryItems");
|
|
|
|
migrationBuilder.UpdateData(
|
|
table: "PricingTiers",
|
|
keyColumn: "Id",
|
|
keyValue: 1,
|
|
column: "CreatedAt",
|
|
value: new DateTime(2026, 4, 2, 18, 47, 18, 878, DateTimeKind.Utc).AddTicks(8284));
|
|
|
|
migrationBuilder.UpdateData(
|
|
table: "PricingTiers",
|
|
keyColumn: "Id",
|
|
keyValue: 2,
|
|
column: "CreatedAt",
|
|
value: new DateTime(2026, 4, 2, 18, 47, 18, 878, DateTimeKind.Utc).AddTicks(8291));
|
|
|
|
migrationBuilder.UpdateData(
|
|
table: "PricingTiers",
|
|
keyColumn: "Id",
|
|
keyValue: 3,
|
|
column: "CreatedAt",
|
|
value: new DateTime(2026, 4, 2, 18, 47, 18, 878, DateTimeKind.Utc).AddTicks(8292));
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_InventoryItems_CompanyId_SKU",
|
|
table: "InventoryItems",
|
|
columns: new[] { "CompanyId", "SKU" },
|
|
unique: true);
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropIndex(
|
|
name: "IX_InventoryItems_CompanyId_SKU",
|
|
table: "InventoryItems");
|
|
|
|
migrationBuilder.UpdateData(
|
|
table: "PricingTiers",
|
|
keyColumn: "Id",
|
|
keyValue: 1,
|
|
column: "CreatedAt",
|
|
value: new DateTime(2026, 4, 2, 16, 57, 55, 24, DateTimeKind.Utc).AddTicks(6999));
|
|
|
|
migrationBuilder.UpdateData(
|
|
table: "PricingTiers",
|
|
keyColumn: "Id",
|
|
keyValue: 2,
|
|
column: "CreatedAt",
|
|
value: new DateTime(2026, 4, 2, 16, 57, 55, 24, DateTimeKind.Utc).AddTicks(7004));
|
|
|
|
migrationBuilder.UpdateData(
|
|
table: "PricingTiers",
|
|
keyColumn: "Id",
|
|
keyValue: 3,
|
|
column: "CreatedAt",
|
|
value: new DateTime(2026, 4, 2, 16, 57, 55, 24, DateTimeKind.Utc).AddTicks(7006));
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_InventoryItems_SKU",
|
|
table: "InventoryItems",
|
|
column: "SKU",
|
|
unique: true);
|
|
}
|
|
}
|
|
}
|