Make Profile.Markings db column jsonb (#7947)

This commit is contained in:
DrSmugleaf
2022-05-05 11:23:48 +02:00
committed by GitHub
parent 0121025d12
commit 0502d3dec4
9 changed files with 2571 additions and 19 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,37 @@
#nullable disable
using System.Text.Json;
using Microsoft.EntityFrameworkCore.Migrations;
namespace Content.Server.Database.Migrations.Postgres
{
public partial class MarkingsJsonb : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "markings",
table: "profile");
migrationBuilder.AddColumn<JsonDocument>(
name: "markings",
table: "profile",
type: "jsonb",
nullable: true);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "markings",
table: "profile");
migrationBuilder.AddColumn<string>(
name: "markings",
table: "profile",
type: "text",
nullable: false,
defaultValue: "");
}
}
}

View File

@@ -595,9 +595,8 @@ namespace Content.Server.Database.Migrations.Postgres
.HasColumnType("text")
.HasColumnName("hair_name");
b.Property<string>("Markings")
.IsRequired()
.HasColumnType("text")
b.Property<JsonDocument>("Markings")
.HasColumnType("jsonb")
.HasColumnName("markings");
b.Property<int>("PreferenceId")