ปรับปรุงการเก็บ log
This commit is contained in:
41
Migrations/20210519141654_AddLog.cs
Normal file
41
Migrations/20210519141654_AddLog.cs
Normal file
@@ -0,0 +1,41 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
namespace tb320eva.Migrations
|
||||
{
|
||||
public partial class AddLog : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "activity_log_eva",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<int>(nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn),
|
||||
log_name = table.Column<string>(maxLength: 191, nullable: true),
|
||||
description = table.Column<string>(maxLength: 4000, nullable: true),
|
||||
subject_id = table.Column<int>(nullable: true),
|
||||
subject_type = table.Column<string>(maxLength: 191, nullable: true),
|
||||
causer_id = table.Column<int>(nullable: true),
|
||||
causer_type = table.Column<string>(maxLength: 191, nullable: true),
|
||||
properties = table.Column<string>(maxLength: 8000, nullable: true),
|
||||
ip_address = table.Column<string>(maxLength: 191, nullable: true),
|
||||
mac_address = table.Column<string>(maxLength: 191, nullable: true),
|
||||
created_at = table.Column<DateTime>(nullable: true),
|
||||
updated_at = table.Column<DateTime>(nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_activity_log_eva", x => x.id);
|
||||
});
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "activity_log_eva");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user