20250120034312_AddBannerTables.cs 1.2 KB

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