using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace LY.MicroService.RealtimeMessage.Migrations { public partial class AddEntityNotificationTemplate : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "AppNotificationTemplates", columns: table => new { Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), TenantId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), Name = table.Column(type: "varchar(100)", maxLength: 100, nullable: false) .Annotation("MySql:CharSet", "utf8mb4"), Description = table.Column(type: "varchar(255)", maxLength: 255, nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), Title = table.Column(type: "varchar(100)", maxLength: 100, nullable: false) .Annotation("MySql:CharSet", "utf8mb4"), Content = table.Column(type: "longtext", maxLength: 1048576, nullable: false) .Annotation("MySql:CharSet", "utf8mb4"), Culture = table.Column(type: "varchar(30)", maxLength: 30, nullable: false) .Annotation("MySql:CharSet", "utf8mb4"), CreationTime = table.Column(type: "datetime(6)", nullable: false), CreatorId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), LastModificationTime = table.Column(type: "datetime(6)", nullable: true), LastModifierId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci") }, constraints: table => { table.PrimaryKey("PK_AppNotificationTemplates", x => x.Id); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateIndex( name: "IX_Tenant_Notification_Template_Name", table: "AppNotificationTemplates", columns: new[] { "TenantId", "Name" }); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "AppNotificationTemplates"); } } }