using Microsoft.EntityFrameworkCore.Migrations; namespace API.Data.Migrations { public partial class BookmarkPages : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "AppUserBookmark", columns: table => new { Id = table.Column(type: "INTEGER", nullable: false) .Annotation("Sqlite:Autoincrement", true), Page = table.Column(type: "INTEGER", nullable: false), VolumeId = table.Column(type: "INTEGER", nullable: false), SeriesId = table.Column(type: "INTEGER", nullable: false), ChapterId = table.Column(type: "INTEGER", nullable: false), AppUserId = table.Column(type: "INTEGER", nullable: false) }, constraints: table => { table.PrimaryKey("PK_AppUserBookmark", x => x.Id); table.ForeignKey( name: "FK_AppUserBookmark_AspNetUsers_AppUserId", column: x => x.AppUserId, principalTable: "AspNetUsers", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); migrationBuilder.CreateIndex( name: "IX_AppUserBookmark_AppUserId", table: "AppUserBookmark", column: "AppUserId"); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "AppUserBookmark"); } } }