Initial commit
This commit is contained in:
+130
@@ -0,0 +1,130 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace PowderCoating.Infrastructure.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddOvenCostCapacityFields : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "DefaultCycleMinutes",
|
||||
table: "OvenCosts",
|
||||
type: "int",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<decimal>(
|
||||
name: "MaxLoadSqFt",
|
||||
table: "OvenCosts",
|
||||
type: "decimal(18,2)",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "EquipmentId",
|
||||
table: "OvenBatches",
|
||||
type: "int",
|
||||
nullable: true,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "int");
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "OvenCostId",
|
||||
table: "OvenBatches",
|
||||
type: "int",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "PricingTiers",
|
||||
keyColumn: "Id",
|
||||
keyValue: 1,
|
||||
column: "CreatedAt",
|
||||
value: new DateTime(2026, 3, 14, 23, 49, 48, 209, DateTimeKind.Utc).AddTicks(5969));
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "PricingTiers",
|
||||
keyColumn: "Id",
|
||||
keyValue: 2,
|
||||
column: "CreatedAt",
|
||||
value: new DateTime(2026, 3, 14, 23, 49, 48, 209, DateTimeKind.Utc).AddTicks(5976));
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "PricingTiers",
|
||||
keyColumn: "Id",
|
||||
keyValue: 3,
|
||||
column: "CreatedAt",
|
||||
value: new DateTime(2026, 3, 14, 23, 49, 48, 209, DateTimeKind.Utc).AddTicks(5977));
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_OvenBatches_OvenCostId",
|
||||
table: "OvenBatches",
|
||||
column: "OvenCostId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_OvenBatches_OvenCosts_OvenCostId",
|
||||
table: "OvenBatches",
|
||||
column: "OvenCostId",
|
||||
principalTable: "OvenCosts",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_OvenBatches_OvenCosts_OvenCostId",
|
||||
table: "OvenBatches");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_OvenBatches_OvenCostId",
|
||||
table: "OvenBatches");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "DefaultCycleMinutes",
|
||||
table: "OvenCosts");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "MaxLoadSqFt",
|
||||
table: "OvenCosts");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "OvenCostId",
|
||||
table: "OvenBatches");
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "EquipmentId",
|
||||
table: "OvenBatches",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "int",
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "PricingTiers",
|
||||
keyColumn: "Id",
|
||||
keyValue: 1,
|
||||
column: "CreatedAt",
|
||||
value: new DateTime(2026, 3, 14, 14, 37, 3, 564, DateTimeKind.Utc).AddTicks(122));
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "PricingTiers",
|
||||
keyColumn: "Id",
|
||||
keyValue: 2,
|
||||
column: "CreatedAt",
|
||||
value: new DateTime(2026, 3, 14, 14, 37, 3, 564, DateTimeKind.Utc).AddTicks(131));
|
||||
|
||||
migrationBuilder.UpdateData(
|
||||
table: "PricingTiers",
|
||||
keyColumn: "Id",
|
||||
keyValue: 3,
|
||||
column: "CreatedAt",
|
||||
value: new DateTime(2026, 3, 14, 14, 37, 3, 564, DateTimeKind.Utc).AddTicks(133));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user