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(type: "char(38)", nullable: false, collation: "utf8_general_ci") .Annotation("MySql:CharSet", "utf8"), event_type_name = table.Column(type: "varchar(255)", nullable: false, collation: "utf8_general_ci") .Annotation("MySql:CharSet", "utf8"), state = table.Column(type: "int(11)", nullable: false), times_sent = table.Column(type: "int(11)", nullable: false), create_on = table.Column(type: "datetime", nullable: false), create_by = table.Column(type: "char(38)", nullable: false, collation: "utf8_general_ci") .Annotation("MySql:CharSet", "utf8"), content = table.Column(type: "text", nullable: false, collation: "utf8_general_ci") .Annotation("MySql:CharSet", "utf8"), TransactionId = table.Column(type: "longtext", nullable: true) .Annotation("MySql:CharSet", "utf8"), tenant_id = table.Column(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"); } } }