using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Nuuru.Server.Migrations
{
///
public partial class AddUserSettings : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "UserSettings",
columns: table => new
{
UserId = table.Column(type: "TEXT", nullable: false),
Theme = table.Column(type: "TEXT", maxLength: 10, nullable: false),
NotifyOnPostComment = table.Column(type: "INTEGER", nullable: false),
NotifyOnMention = table.Column(type: "INTEGER", nullable: false),
NotifyOnForumQuote = table.Column(type: "INTEGER", nullable: false),
NotifyOnWatchedPostComment = table.Column(type: "INTEGER", nullable: false),
NotifyOnWatchedThreadReply = table.Column(type: "INTEGER", nullable: false),
NotifyOnPrivateMessage = table.Column(type: "INTEGER", nullable: false),
AutoWatchOwnPosts = table.Column(type: "INTEGER", nullable: false),
AutoWatchOnPostComment = table.Column(type: "INTEGER", nullable: false),
AutoWatchOnForumThreadCreate = table.Column(type: "INTEGER", nullable: false),
AutoWatchOnForumThreadReply = table.Column(type: "INTEGER", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_UserSettings", x => x.UserId);
table.ForeignKey(
name: "FK_UserSettings_AspNetUsers_UserId",
column: x => x.UserId,
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "UserSettings");
}
}
}