選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

20230210130911_FileEntityChanged.cs 1.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. using System;
  2. using Microsoft.EntityFrameworkCore.Migrations;
  3. #nullable disable
  4. namespace Diligent.WebAPI.Data.Migrations
  5. {
  6. public partial class FileEntityChanged : Migration
  7. {
  8. protected override void Up(MigrationBuilder migrationBuilder)
  9. {
  10. migrationBuilder.DropColumn(
  11. name: "Extension",
  12. table: "Files");
  13. migrationBuilder.DropColumn(
  14. name: "Name",
  15. table: "Files");
  16. migrationBuilder.DropColumn(
  17. name: "Size",
  18. table: "Files");
  19. migrationBuilder.AddColumn<Guid>(
  20. name: "DocumentId",
  21. table: "Files",
  22. type: "uniqueidentifier",
  23. nullable: false,
  24. defaultValue: new Guid("00000000-0000-0000-0000-000000000000"));
  25. }
  26. protected override void Down(MigrationBuilder migrationBuilder)
  27. {
  28. migrationBuilder.DropColumn(
  29. name: "DocumentId",
  30. table: "Files");
  31. migrationBuilder.AddColumn<string>(
  32. name: "Extension",
  33. table: "Files",
  34. type: "nvarchar(max)",
  35. nullable: false,
  36. defaultValue: "");
  37. migrationBuilder.AddColumn<string>(
  38. name: "Name",
  39. table: "Files",
  40. type: "nvarchar(max)",
  41. nullable: false,
  42. defaultValue: "");
  43. migrationBuilder.AddColumn<long>(
  44. name: "Size",
  45. table: "Files",
  46. type: "bigint",
  47. nullable: false,
  48. defaultValue: 0L);
  49. }
  50. }
  51. }