20260710094717_RemoveDerivativeSessionDbDefault.cs 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. using Microsoft.EntityFrameworkCore.Migrations;
  2. #nullable disable
  3. namespace Infrastructure.Migrations.AppDb
  4. {
  5. /// <inheritdoc />
  6. public partial class RemoveDerivativeSessionDbDefault : Migration
  7. {
  8. /// <inheritdoc />
  9. protected override void Up(MigrationBuilder migrationBuilder)
  10. {
  11. migrationBuilder.AlterColumn<byte>(
  12. name: "Session",
  13. table: "OptionsDailyTrade",
  14. type: "tinyint",
  15. nullable: false,
  16. comment: "매매 세션 (1=정규, 2=야간) — 수집기가 항상 명시 세팅(0-sentinel 회피 위해 DB 기본값 미설정)",
  17. oldClrType: typeof(byte),
  18. oldType: "tinyint",
  19. oldDefaultValue: (byte)1,
  20. oldComment: "매매 세션 (1=정규, 2=야간)");
  21. migrationBuilder.AlterColumn<byte>(
  22. name: "Session",
  23. table: "FuturesDailyTrade",
  24. type: "tinyint",
  25. nullable: false,
  26. comment: "매매 세션 (1=정규, 2=야간) — 수집기가 항상 명시 세팅(0-sentinel 회피 위해 DB 기본값 미설정)",
  27. oldClrType: typeof(byte),
  28. oldType: "tinyint",
  29. oldDefaultValue: (byte)1,
  30. oldComment: "매매 세션 (1=정규, 2=야간)");
  31. }
  32. /// <inheritdoc />
  33. protected override void Down(MigrationBuilder migrationBuilder)
  34. {
  35. migrationBuilder.AlterColumn<byte>(
  36. name: "Session",
  37. table: "OptionsDailyTrade",
  38. type: "tinyint",
  39. nullable: false,
  40. defaultValue: (byte)1,
  41. comment: "매매 세션 (1=정규, 2=야간)",
  42. oldClrType: typeof(byte),
  43. oldType: "tinyint",
  44. oldComment: "매매 세션 (1=정규, 2=야간) — 수집기가 항상 명시 세팅(0-sentinel 회피 위해 DB 기본값 미설정)");
  45. migrationBuilder.AlterColumn<byte>(
  46. name: "Session",
  47. table: "FuturesDailyTrade",
  48. type: "tinyint",
  49. nullable: false,
  50. defaultValue: (byte)1,
  51. comment: "매매 세션 (1=정규, 2=야간)",
  52. oldClrType: typeof(byte),
  53. oldType: "tinyint",
  54. oldComment: "매매 세션 (1=정규, 2=야간) — 수집기가 항상 명시 세팅(0-sentinel 회피 위해 DB 기본값 미설정)");
  55. }
  56. }
  57. }