20250526104756_altrAttachmentOriginal.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using Microsoft.EntityFrameworkCore.Migrations;
  2. #nullable disable
  3. namespace MTWorkHR.Infrastructure.Migrations
  4. {
  5. /// <inheritdoc />
  6. public partial class altrAttachmentOriginal : Migration
  7. {
  8. /// <inheritdoc />
  9. protected override void Up(MigrationBuilder migrationBuilder)
  10. {
  11. migrationBuilder.AlterColumn<string>(
  12. name: "OriginalName",
  13. table: "UserAttachments",
  14. type: "nvarchar(250)",
  15. maxLength: 250,
  16. nullable: true,
  17. oldClrType: typeof(string),
  18. oldType: "nvarchar(250)",
  19. oldMaxLength: 250);
  20. }
  21. /// <inheritdoc />
  22. protected override void Down(MigrationBuilder migrationBuilder)
  23. {
  24. migrationBuilder.AlterColumn<string>(
  25. name: "OriginalName",
  26. table: "UserAttachments",
  27. type: "nvarchar(250)",
  28. maxLength: 250,
  29. nullable: false,
  30. defaultValue: "",
  31. oldClrType: typeof(string),
  32. oldType: "nvarchar(250)",
  33. oldMaxLength: 250,
  34. oldNullable: true);
  35. }
  36. }
  37. }