20260609032455_AddChannelYouTubeLastSyncedAt.cs 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. using System;
  2. using Microsoft.EntityFrameworkCore.Migrations;
  3. #nullable disable
  4. namespace Infrastructure.Migrations.AppDb
  5. {
  6. /// <inheritdoc />
  7. public partial class AddChannelYouTubeLastSyncedAt : Migration
  8. {
  9. /// <inheritdoc />
  10. protected override void Up(MigrationBuilder migrationBuilder)
  11. {
  12. migrationBuilder.AddColumn<DateTime>(
  13. name: "YouTubeLastSyncedAt",
  14. table: "Channel",
  15. type: "datetime2",
  16. nullable: true,
  17. comment: "YouTube API 마지막 동기화 시각(UTC) — 30일 정책 enforcement");
  18. migrationBuilder.CreateIndex(
  19. name: "IX_Channel_YouTubeLastSyncedAt",
  20. table: "Channel",
  21. column: "YouTubeLastSyncedAt");
  22. }
  23. /// <inheritdoc />
  24. protected override void Down(MigrationBuilder migrationBuilder)
  25. {
  26. migrationBuilder.DropIndex(
  27. name: "IX_Channel_YouTubeLastSyncedAt",
  28. table: "Channel");
  29. migrationBuilder.DropColumn(
  30. name: "YouTubeLastSyncedAt",
  31. table: "Channel");
  32. }
  33. }
  34. }