Make Profile.Markings db column jsonb (#7947)
This commit is contained in:
1256
Content.Server.Database/Migrations/Postgres/20220505084828_MarkingsJsonb.Designer.cs
generated
Normal file
1256
Content.Server.Database/Migrations/Postgres/20220505084828_MarkingsJsonb.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -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: "");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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")
|
||||
|
||||
1195
Content.Server.Database/Migrations/Sqlite/20220505084819_MarkingsJsonb.Designer.cs
generated
Normal file
1195
Content.Server.Database/Migrations/Sqlite/20220505084819_MarkingsJsonb.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,36 @@
|
||||
#nullable disable
|
||||
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace Content.Server.Database.Migrations.Sqlite
|
||||
{
|
||||
public partial class MarkingsJsonb : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "markings",
|
||||
table: "profile");
|
||||
|
||||
migrationBuilder.AddColumn<byte[]>(
|
||||
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: "");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using System.Text.Json;
|
||||
using Content.Server.Database;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
@@ -553,9 +554,8 @@ namespace Content.Server.Database.Migrations.Sqlite
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("hair_name");
|
||||
|
||||
b.Property<string>("Markings")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT")
|
||||
b.Property<JsonDocument>("Markings")
|
||||
.HasColumnType("jsonb")
|
||||
.HasColumnName("markings");
|
||||
|
||||
b.Property<int>("PreferenceId")
|
||||
|
||||
Reference in New Issue
Block a user