2024-09-05 22:17:10 +02:00
|
|
|
|
using Foxnouns.Backend.Database.Models;
|
2024-09-26 17:11:52 +02:00
|
|
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
2024-09-05 22:17:10 +02:00
|
|
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
|
|
|
|
|
|
#nullable disable
|
|
|
|
|
|
|
|
|
|
namespace Foxnouns.Backend.Database.Migrations
|
|
|
|
|
{
|
|
|
|
|
/// <inheritdoc />
|
2024-09-26 17:11:52 +02:00
|
|
|
|
[DbContext(typeof(DatabaseContext))]
|
|
|
|
|
[Migration("20240905191709_AddUserSettings")]
|
2024-09-05 22:17:10 +02:00
|
|
|
|
public partial class AddUserSettings : Migration
|
|
|
|
|
{
|
|
|
|
|
/// <inheritdoc />
|
|
|
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
|
|
|
{
|
|
|
|
|
migrationBuilder.AddColumn<UserSettings>(
|
|
|
|
|
name: "settings",
|
|
|
|
|
table: "users",
|
|
|
|
|
type: "jsonb",
|
|
|
|
|
nullable: false,
|
2024-10-02 00:28:07 +02:00
|
|
|
|
defaultValueSql: "'{}'"
|
|
|
|
|
);
|
2024-09-05 22:17:10 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <inheritdoc />
|
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
|
|
|
{
|
2024-10-02 00:28:07 +02:00
|
|
|
|
migrationBuilder.DropColumn(name: "settings", table: "users");
|
2024-09-05 22:17:10 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|