Church.Net.API/Church.Net.WebAPI/DAL/Migrations/20220828023808_AddLoggingService.cs
2025-11-02 17:05:06 -08:00

42 lines
1.7 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Migrations;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
namespace Church.Net.DAL.EFCoreDBF.Migrations
{
public partial class AddLoggingService : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "LogInfos",
columns: table => new
{
Id = table.Column<string>(type: "text", nullable: false),
TrackNo = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Url = table.Column<string>(type: "text", nullable: true),
Message = table.Column<string>(type: "text", nullable: true),
Source = table.Column<string>(type: "text", nullable: true),
StackTrace = table.Column<string>(type: "text", nullable: true),
DetailMessage = table.Column<string>(type: "text", nullable: true),
UserId = table.Column<string>(type: "text", nullable: true),
Time = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
Level = table.Column<int>(type: "integer", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_LogInfos", x => x.Id);
});
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "LogInfos");
}
}
}