ปรับปรุงการเก็บ log
This commit is contained in:
1071
Migrations/20210519141654_AddLog.Designer.cs
generated
Normal file
1071
Migrations/20210519141654_AddLog.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
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");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -19,6 +19,45 @@ namespace tb320eva.Migrations
|
||||
.HasAnnotation("ProductVersion", "2.2.6-servicing-10079")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.activity_log_evaEntity", b =>
|
||||
{
|
||||
b.Property<int>("id")
|
||||
.ValueGeneratedOnAdd();
|
||||
|
||||
b.Property<int?>("causer_id");
|
||||
|
||||
b.Property<string>("causer_type")
|
||||
.HasMaxLength(191);
|
||||
|
||||
b.Property<DateTime?>("created_at");
|
||||
|
||||
b.Property<string>("description")
|
||||
.HasMaxLength(4000);
|
||||
|
||||
b.Property<string>("ip_address")
|
||||
.HasMaxLength(191);
|
||||
|
||||
b.Property<string>("log_name")
|
||||
.HasMaxLength(191);
|
||||
|
||||
b.Property<string>("mac_address")
|
||||
.HasMaxLength(191);
|
||||
|
||||
b.Property<string>("properties")
|
||||
.HasMaxLength(8000);
|
||||
|
||||
b.Property<int?>("subject_id");
|
||||
|
||||
b.Property<string>("subject_type")
|
||||
.HasMaxLength(191);
|
||||
|
||||
b.Property<DateTime?>("updated_at");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("activity_log_eva");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("TodoAPI2.Models.eva_adjust_postponementEntity", b =>
|
||||
{
|
||||
b.Property<int>("id");
|
||||
|
||||
Reference in New Issue
Block a user