Add nsfw and disabled in db

This commit is contained in:
defnotken
2025-10-15 12:39:46 -05:00
parent 7909850ad5
commit b36b1fb8f9
4 changed files with 1227 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace LightlessSyncServer.Migrations
{
/// <inheritdoc />
public partial class AddGroupDisabledAndNSFW : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "is_nsfw",
table: "group_profiles",
type: "boolean",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "profile_disabled",
table: "group_profiles",
type: "boolean",
nullable: false,
defaultValue: false);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "is_nsfw",
table: "group_profiles");
migrationBuilder.DropColumn(
name: "profile_disabled",
table: "group_profiles");
}
}
}

View File

@@ -597,6 +597,14 @@ namespace LightlessSyncServer.Migrations
.HasColumnType("text") .HasColumnType("text")
.HasColumnName("description"); .HasColumnName("description");
b.Property<bool>("IsNSFW")
.HasColumnType("boolean")
.HasColumnName("is_nsfw");
b.Property<bool>("ProfileDisabled")
.HasColumnType("boolean")
.HasColumnName("profile_disabled");
b.Property<string>("Tags") b.Property<string>("Tags")
.HasColumnType("text") .HasColumnType("text")
.HasColumnName("tags"); .HasColumnName("tags");

View File

@@ -15,4 +15,6 @@ public class GroupProfile
public string Description { get; set; } public string Description { get; set; }
public string Tags { get; set; } public string Tags { get; set; }
public string Base64GroupProfileImage { get; set; } public string Base64GroupProfileImage { get; set; }
public bool IsNSFW { get; set; } = false;
public bool ProfileDisabled { get; set; } = false;
} }