divan/RMuseum/Migrations/20200325142334_AuditLogs.cs
Hamid Reza Mohammadi 5991d7fa5f Add project files.
2020-08-14 21:06:22 +04:30

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");
}
}
}