using System; using Microsoft.EntityFrameworkCore.Migrations; namespace RMuseum.Migrations { public partial class Notifications : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "Notifications", columns: table => new { Id = table.Column(nullable: false), UserId = table.Column(nullable: false), DateTime = table.Column(nullable: false), Status = table.Column(nullable: false), Subject = table.Column(nullable: true), HtmlText = table.Column(nullable: true) }, constraints: table => { table.PrimaryKey("PK_Notifications", x => x.Id); table.ForeignKey( name: "FK_Notifications_AspNetUsers_UserId", column: x => x.UserId, principalTable: "AspNetUsers", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateIndex( name: "IX_Notifications_UserId", table: "Notifications", column: "UserId"); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "Notifications"); } } }