using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace LANCommander.Migrations { public partial class AddBasicServerModel : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "Servers", columns: table => new { Id = table.Column(type: "TEXT", nullable: false), Name = table.Column(type: "TEXT", nullable: false), Path = table.Column(type: "TEXT", nullable: false), Arguments = table.Column(type: "TEXT", nullable: false), WorkingDirectory = table.Column(type: "TEXT", nullable: false), OnStartScriptPath = table.Column(type: "TEXT", nullable: false), OnStopScriptPath = table.Column(type: "TEXT", nullable: false), Autostart = table.Column(type: "INTEGER", nullable: false), 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_Servers", x => x.Id); table.ForeignKey( name: "FK_Servers_AspNetUsers_CreatedById", column: x => x.CreatedById, principalTable: "AspNetUsers", principalColumn: "Id"); table.ForeignKey( name: "FK_Servers_AspNetUsers_UpdatedById", column: x => x.UpdatedById, principalTable: "AspNetUsers", principalColumn: "Id"); }); migrationBuilder.CreateIndex( name: "IX_Servers_CreatedById", table: "Servers", column: "CreatedById"); migrationBuilder.CreateIndex( name: "IX_Servers_UpdatedById", table: "Servers", column: "UpdatedById"); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "Servers"); } } }