using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace LY.MicroService.RealtimeMessage.Migrations { public partial class AddDynamicNotification : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "AppNotificationDefinitionGroups", columns: table => new { Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), Name = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) .Annotation("MySql:CharSet", "utf8mb4"), DisplayName = table.Column(type: "varchar(255)", maxLength: 255, nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), Description = table.Column(type: "varchar(255)", maxLength: 255, nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), ResourceName = table.Column(type: "varchar(64)", maxLength: 64, nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), Localization = table.Column(type: "varchar(128)", maxLength: 128, nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), AllowSubscriptionToClients = table.Column(type: "tinyint(1)", nullable: false), ExtraProperties = table.Column(type: "longtext", nullable: true) .Annotation("MySql:CharSet", "utf8mb4") }, constraints: table => { table.PrimaryKey("PK_AppNotificationDefinitionGroups", x => x.Id); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( name: "AppNotificationDefinitions", columns: table => new { Id = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), Name = table.Column(type: "varchar(64)", maxLength: 64, nullable: false) .Annotation("MySql:CharSet", "utf8mb4"), DisplayName = table.Column(type: "varchar(255)", maxLength: 255, nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), Description = table.Column(type: "varchar(255)", maxLength: 255, nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), ResourceName = table.Column(type: "varchar(64)", maxLength: 64, nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), Localization = table.Column(type: "varchar(128)", maxLength: 128, nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), NotificationLifetime = table.Column(type: "int", nullable: false), NotificationType = table.Column(type: "int", nullable: false), Providers = table.Column(type: "varchar(200)", maxLength: 200, nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), AllowSubscriptionToClients = table.Column(type: "tinyint(1)", nullable: false), ExtraProperties = table.Column(type: "longtext", nullable: true) .Annotation("MySql:CharSet", "utf8mb4") }, constraints: table => { table.PrimaryKey("PK_AppNotificationDefinitions", x => x.Id); }) .Annotation("MySql:CharSet", "utf8mb4"); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "AppNotificationDefinitionGroups"); migrationBuilder.DropTable( name: "AppNotificationDefinitions"); } } }