38 lines
1.4 KiB
C#
38 lines
1.4 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
namespace RMuseum.Migrations
|
|
{
|
|
public partial class AuditLogs : Migration
|
|
{
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.CreateTable(
|
|
name: "AuditLogs",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<Guid>(nullable: false),
|
|
EventType = table.Column<string>(nullable: true),
|
|
StartDate = table.Column<DateTime>(nullable: false),
|
|
EndDate = table.Column<DateTime>(nullable: true),
|
|
Duration = table.Column<int>(nullable: false),
|
|
UserName = table.Column<string>(nullable: true),
|
|
IpAddress = table.Column<string>(nullable: true),
|
|
ResponseStatusCode = table.Column<int>(nullable: false),
|
|
RequestUrl = table.Column<string>(nullable: true),
|
|
JsonData = table.Column<string>(nullable: true)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_AuditLogs", x => x.Id);
|
|
});
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "AuditLogs");
|
|
}
|
|
}
|
|
}
|