using Microsoft.EntityFrameworkCore.Migrations; using System; using System.Collections.Generic; namespace Ombi.Store.Migrations { public partial class NotificationIds : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "NotificationUserId", columns: table => new { Id = table.Column(type: "INTEGER", nullable: false) .Annotation("Sqlite:Autoincrement", true), AddedAt = table.Column(type: "TEXT", nullable: false), PlayerId = table.Column(type: "TEXT", nullable: true), UserId = table.Column(type: "TEXT", nullable: true) }, constraints: table => { table.PrimaryKey("PK_NotificationUserId", x => x.Id); table.ForeignKey( name: "FK_NotificationUserId_AspNetUsers_UserId", column: x => x.UserId, principalTable: "AspNetUsers", principalColumn: "Id", onDelete: ReferentialAction.Restrict); }); migrationBuilder.CreateIndex( name: "IX_NotificationUserId_UserId", table: "NotificationUserId", column: "UserId"); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "NotificationUserId"); } } }