using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace Nuuru.Server.Migrations.PostgreSQL { /// public partial class AddUserSettings : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "UserSettings", columns: table => new { UserId = table.Column(type: "uuid", nullable: false), Theme = table.Column(type: "character varying(10)", maxLength: 10, nullable: false), NotifyOnPostComment = table.Column(type: "boolean", nullable: false), NotifyOnMention = table.Column(type: "boolean", nullable: false), NotifyOnForumQuote = table.Column(type: "boolean", nullable: false), NotifyOnWatchedPostComment = table.Column(type: "boolean", nullable: false), NotifyOnWatchedThreadReply = table.Column(type: "boolean", nullable: false), NotifyOnPrivateMessage = table.Column(type: "boolean", nullable: false), AutoWatchOwnPosts = table.Column(type: "boolean", nullable: false), AutoWatchOnPostComment = table.Column(type: "boolean", nullable: false), AutoWatchOnForumThreadCreate = table.Column(type: "boolean", nullable: false), AutoWatchOnForumThreadReply = table.Column(type: "boolean", 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"); } } }