using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace Kruzya.TelegramBot.Core.Migrations { /// public partial class AddChatOptions : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "ChatOptionValues", columns: table => new { ChatId = table.Column(type: "bigint", nullable: false), OptionId = table.Column(type: "varchar(255)", nullable: false) .Annotation("MySql:CharSet", "utf8mb4"), Value = table.Column(type: "longblob", nullable: false) }, constraints: table => { table.PrimaryKey("PK_ChatOptionValues", x => new { x.ChatId, x.OptionId }); }) .Annotation("MySql:CharSet", "utf8mb4"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "ChatOptionValues"); migrationBuilder.AlterColumn( name: "ValueType", table: "UserValues", type: "longtext CHARACTER SET utf8mb4", nullable: true, oldClrType: typeof(string), oldType: "longtext", oldNullable: true) .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AlterColumn( name: "Name", table: "UserValues", type: "longtext CHARACTER SET utf8mb4", nullable: true, oldClrType: typeof(string), oldType: "longtext", oldNullable: true) .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("MySql:CharSet", "utf8mb4"); } } }