using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace LANCommander.Migrations { /// public partial class AddServerHttpPaths : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "ServerHttpPath", columns: table => new { Id = table.Column(type: "TEXT", nullable: false), LocalPath = table.Column(type: "TEXT", nullable: false), Path = table.Column(type: "TEXT", nullable: false), ServerId = table.Column(type: "TEXT", nullable: false), ServerId1 = 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_ServerHttpPath", x => x.Id); table.ForeignKey( name: "FK_ServerHttpPath_AspNetUsers_CreatedById", column: x => x.CreatedById, principalTable: "AspNetUsers", principalColumn: "Id"); table.ForeignKey( name: "FK_ServerHttpPath_AspNetUsers_UpdatedById", column: x => x.UpdatedById, principalTable: "AspNetUsers", principalColumn: "Id"); table.ForeignKey( name: "FK_ServerHttpPath_Servers_ServerId", column: x => x.ServerId, principalTable: "Servers", principalColumn: "Id", onDelete: ReferentialAction.Cascade); table.ForeignKey( name: "FK_ServerHttpPath_Servers_ServerId1", column: x => x.ServerId1, principalTable: "Servers", principalColumn: "Id"); }); migrationBuilder.CreateIndex( name: "IX_ServerHttpPath_CreatedById", table: "ServerHttpPath", column: "CreatedById"); migrationBuilder.CreateIndex( name: "IX_ServerHttpPath_ServerId", table: "ServerHttpPath", column: "ServerId"); migrationBuilder.CreateIndex( name: "IX_ServerHttpPath_ServerId1", table: "ServerHttpPath", column: "ServerId1"); migrationBuilder.CreateIndex( name: "IX_ServerHttpPath_UpdatedById", table: "ServerHttpPath", column: "UpdatedById"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "ServerHttpPath"); } } }