using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace DorkNet.Server.Migrations { /// public partial class Phase5AdminAudit : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "AdminActions", columns: table => new { Id = table.Column(type: "INTEGER", nullable: false) .Annotation("Sqlite:Autoincrement", true), AdminPlayerId = table.Column(type: "INTEGER", nullable: false), Action = table.Column(type: "TEXT", maxLength: 64, nullable: false), TargetType = table.Column(type: "TEXT", maxLength: 32, nullable: false), TargetId = table.Column(type: "INTEGER", nullable: false), Reason = table.Column(type: "TEXT", maxLength: 512, nullable: false), Timestamp = table.Column(type: "TEXT", nullable: false) }, constraints: table => { table.PrimaryKey("PK_AdminActions", x => x.Id); }); migrationBuilder.CreateIndex( name: "IX_AdminActions_AdminPlayerId", table: "AdminActions", column: "AdminPlayerId"); migrationBuilder.CreateIndex( name: "IX_AdminActions_TargetType_TargetId", table: "AdminActions", columns: new[] { "TargetType", "TargetId" }); migrationBuilder.CreateIndex( name: "IX_AdminActions_Timestamp", table: "AdminActions", column: "Timestamp"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "AdminActions"); } } }