You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
2.6 KiB
51 lines
2.6 KiB
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<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
TenantId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
|
Name = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: false)
|
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
Description = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true)
|
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
Title = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: false)
|
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
Content = table.Column<string>(type: "longtext", maxLength: 1048576, nullable: false)
|
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
Culture = table.Column<string>(type: "varchar(30)", maxLength: 30, nullable: false)
|
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
CreationTime = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
|
CreatorId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
|
LastModificationTime = table.Column<DateTime>(type: "datetime(6)", nullable: true),
|
|
LastModifierId = table.Column<Guid>(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");
|
|
}
|
|
}
|
|
}
|
|
|