20260704192053_AddPaymentReconcileLog.cs 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. using System;
  2. using Microsoft.EntityFrameworkCore.Migrations;
  3. #nullable disable
  4. namespace Infrastructure.Migrations.AppDb
  5. {
  6. /// <inheritdoc />
  7. public partial class AddPaymentReconcileLog : Migration
  8. {
  9. /// <inheritdoc />
  10. protected override void Up(MigrationBuilder migrationBuilder)
  11. {
  12. migrationBuilder.CreateTable(
  13. name: "PaymentReconcileLog",
  14. columns: table => new
  15. {
  16. ID = table.Column<int>(type: "int", nullable: false)
  17. .Annotation("SqlServer:Identity", "1, 1"),
  18. PaymentOrderID = table.Column<int>(type: "int", nullable: false),
  19. Kind = table.Column<int>(type: "int", nullable: false),
  20. TransactionID = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
  21. Amount = table.Column<int>(type: "int", nullable: false),
  22. Reason = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: false),
  23. CreatedAt = table.Column<DateTime>(type: "datetime2", nullable: false)
  24. },
  25. constraints: table =>
  26. {
  27. table.PrimaryKey("PK_PaymentReconcileLog", x => x.ID);
  28. },
  29. comment: "PG 성공 후 저장 실패 대사 로그 (Phase 1.5)");
  30. migrationBuilder.CreateIndex(
  31. name: "IX_PaymentReconcileLog_CreatedAt",
  32. table: "PaymentReconcileLog",
  33. column: "CreatedAt");
  34. migrationBuilder.CreateIndex(
  35. name: "IX_PaymentReconcileLog_PaymentOrderID",
  36. table: "PaymentReconcileLog",
  37. column: "PaymentOrderID");
  38. }
  39. /// <inheritdoc />
  40. protected override void Down(MigrationBuilder migrationBuilder)
  41. {
  42. migrationBuilder.DropTable(
  43. name: "PaymentReconcileLog");
  44. }
  45. }
  46. }