Foxnouns.NET/Foxnouns.Backend/Database/Migrations/20240905191709_AddUserSettings.cs

32 lines
944 B
C#

using Foxnouns.Backend.Database.Models;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Foxnouns.Backend.Database.Migrations
{
/// <inheritdoc />
[DbContext(typeof(DatabaseContext))]
[Migration("20240905191709_AddUserSettings")]
public partial class AddUserSettings : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<UserSettings>(
name: "settings",
table: "users",
type: "jsonb",
nullable: false,
defaultValueSql: "'{}'"
);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(name: "settings", table: "users");
}
}
}