20260526121617_ChangeLimitPeriodToAbsoluteRange.cs 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. using System;
  2. using Microsoft.EntityFrameworkCore.Migrations;
  3. #nullable disable
  4. namespace Infrastructure.Migrations.AppDb
  5. {
  6. /// <inheritdoc />
  7. public partial class ChangeLimitPeriodToAbsoluteRange : Migration
  8. {
  9. /// <inheritdoc />
  10. protected override void Up(MigrationBuilder migrationBuilder)
  11. {
  12. migrationBuilder.DropColumn(
  13. name: "PeriodHours",
  14. table: "ProductLimitConfig");
  15. migrationBuilder.AddColumn<DateTime>(
  16. name: "PeriodEndAt",
  17. table: "ProductLimitConfig",
  18. type: "datetime2",
  19. nullable: true,
  20. comment: "Custom 시 절대 윈도우 종료 시각 (UTC)");
  21. migrationBuilder.AddColumn<DateTime>(
  22. name: "PeriodStartAt",
  23. table: "ProductLimitConfig",
  24. type: "datetime2",
  25. nullable: true,
  26. comment: "Custom 시 절대 윈도우 시작 시각 (UTC)");
  27. }
  28. /// <inheritdoc />
  29. protected override void Down(MigrationBuilder migrationBuilder)
  30. {
  31. migrationBuilder.DropColumn(
  32. name: "PeriodEndAt",
  33. table: "ProductLimitConfig");
  34. migrationBuilder.DropColumn(
  35. name: "PeriodStartAt",
  36. table: "ProductLimitConfig");
  37. migrationBuilder.AddColumn<int>(
  38. name: "PeriodHours",
  39. table: "ProductLimitConfig",
  40. type: "int",
  41. nullable: false,
  42. defaultValue: 0,
  43. comment: "Custom 시 누적 윈도우 (시간 단위)");
  44. }
  45. }
  46. }