20220505084828_MarkingsJsonb.cs 1021 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #nullable disable
  2. using System.Text.Json;
  3. using Microsoft.EntityFrameworkCore.Migrations;
  4. namespace Content.Server.Database.Migrations.Postgres
  5. {
  6. public partial class MarkingsJsonb : Migration
  7. {
  8. protected override void Up(MigrationBuilder migrationBuilder)
  9. {
  10. migrationBuilder.DropColumn(
  11. name: "markings",
  12. table: "profile");
  13. migrationBuilder.AddColumn<JsonDocument>(
  14. name: "markings",
  15. table: "profile",
  16. type: "jsonb",
  17. nullable: true);
  18. }
  19. protected override void Down(MigrationBuilder migrationBuilder)
  20. {
  21. migrationBuilder.DropColumn(
  22. name: "markings",
  23. table: "profile");
  24. migrationBuilder.AddColumn<string>(
  25. name: "markings",
  26. table: "profile",
  27. type: "text",
  28. nullable: false,
  29. defaultValue: "");
  30. }
  31. }
  32. }