using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace PowderCoating.Infrastructure.Migrations { /// public partial class FixInventorySkuUniqueIndex : Migration { /// 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); } /// 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); } } }