feat: update custom preferences endpoint

This commit is contained in:
sam 2024-08-22 15:13:46 +02:00
parent c4e39d4d59
commit ef221b2c45
Signed by: sam
GPG key ID: B4EF20DDE721CAA1
13 changed files with 820 additions and 20 deletions

View file

@ -0,0 +1,32 @@
using System;
using System.Collections.Generic;
using Foxnouns.Backend.Database.Models;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Foxnouns.Backend.Database.Migrations
{
/// <inheritdoc />
public partial class AddCustomPreferences : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<Dictionary<Guid, User.CustomPreference>>(
name: "custom_preferences",
table: "users",
type: "jsonb",
nullable: false,
defaultValueSql: "'{}'");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "custom_preferences",
table: "users");
}
}
}