using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace LANCommander.Migrations { public partial class AddSavePaths : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "SavePaths", columns: table => new { Id = table.Column(type: "TEXT", nullable: false), Type = table.Column(type: "INTEGER", nullable: false), Path = table.Column(type: "TEXT", nullable: false), GameId = table.Column(type: "TEXT", nullable: true), CreatedOn = table.Column(type: "TEXT", nullable: false), CreatedById = table.Column(type: "TEXT", nullable: true), UpdatedOn = table.Column(type: "TEXT", nullable: false), UpdatedById = table.Column(type: "TEXT", nullable: true) }, constraints: table => { table.PrimaryKey("PK_SavePaths", x => x.Id); table.ForeignKey( name: "FK_SavePaths_AspNetUsers_CreatedById", column: x => x.CreatedById, principalTable: "AspNetUsers", principalColumn: "Id"); table.ForeignKey( name: "FK_SavePaths_AspNetUsers_UpdatedById", column: x => x.UpdatedById, principalTable: "AspNetUsers", principalColumn: "Id"); table.ForeignKey( name: "FK_SavePaths_Games_GameId", column: x => x.GameId, principalTable: "Games", principalColumn: "Id"); }); migrationBuilder.CreateIndex( name: "IX_SavePaths_CreatedById", table: "SavePaths", column: "CreatedById"); migrationBuilder.CreateIndex( name: "IX_SavePaths_GameId", table: "SavePaths", column: "GameId"); migrationBuilder.CreateIndex( name: "IX_SavePaths_UpdatedById", table: "SavePaths", column: "UpdatedById"); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "SavePaths"); } } }