53 lines
2.3 KiB
C#
53 lines
2.3 KiB
C#
|
using System;
|
||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||
|
|
||
|
#nullable disable
|
||
|
|
||
|
namespace ASC.EventBus.Extensions.Logger.Migrations.MySql.IntegrationEventLogContextMySql
|
||
|
{
|
||
|
public partial class IntegrationEventLogContextMySql : Migration
|
||
|
{
|
||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||
|
{
|
||
|
migrationBuilder.AlterDatabase()
|
||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||
|
|
||
|
migrationBuilder.CreateTable(
|
||
|
name: "event_bus_integration_event_log",
|
||
|
columns: table => new
|
||
|
{
|
||
|
event_id = table.Column<string>(type: "char(38)", nullable: false, collation: "utf8_general_ci")
|
||
|
.Annotation("MySql:CharSet", "utf8"),
|
||
|
event_type_name = table.Column<string>(type: "varchar(255)", nullable: false, collation: "utf8_general_ci")
|
||
|
.Annotation("MySql:CharSet", "utf8"),
|
||
|
state = table.Column<int>(type: "int(11)", nullable: false),
|
||
|
times_sent = table.Column<int>(type: "int(11)", nullable: false),
|
||
|
create_on = table.Column<DateTime>(type: "datetime", nullable: false),
|
||
|
create_by = table.Column<string>(type: "char(38)", nullable: false, collation: "utf8_general_ci")
|
||
|
.Annotation("MySql:CharSet", "utf8"),
|
||
|
content = table.Column<string>(type: "text", nullable: false, collation: "utf8_general_ci")
|
||
|
.Annotation("MySql:CharSet", "utf8"),
|
||
|
TransactionId = table.Column<string>(type: "longtext", nullable: true)
|
||
|
.Annotation("MySql:CharSet", "utf8"),
|
||
|
tenant_id = table.Column<int>(type: "int(11)", nullable: false)
|
||
|
},
|
||
|
constraints: table =>
|
||
|
{
|
||
|
table.PrimaryKey("PRIMARY", x => x.event_id);
|
||
|
})
|
||
|
.Annotation("MySql:CharSet", "utf8");
|
||
|
|
||
|
migrationBuilder.CreateIndex(
|
||
|
name: "tenant_id",
|
||
|
table: "event_bus_integration_event_log",
|
||
|
column: "tenant_id");
|
||
|
}
|
||
|
|
||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||
|
{
|
||
|
migrationBuilder.DropTable(
|
||
|
name: "event_bus_integration_event_log");
|
||
|
}
|
||
|
}
|
||
|
}
|