using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace ASC.Migrations.MySql.Migrations { public partial class AccountLinkContextMigrate : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AlterDatabase() .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( name: "account_links", columns: table => new { id = table.Column(type: "varchar(200)", nullable: false, collation: "utf8_general_ci") .Annotation("MySql:CharSet", "utf8"), uid = table.Column(type: "varchar(200)", nullable: false, collation: "utf8_general_ci") .Annotation("MySql:CharSet", "utf8"), provider = table.Column(type: "char(60)", nullable: true, collation: "utf8_general_ci") .Annotation("MySql:CharSet", "utf8"), profile = table.Column(type: "text", nullable: false, collation: "utf8_general_ci") .Annotation("MySql:CharSet", "utf8"), linked = table.Column(type: "datetime", nullable: false) }, constraints: table => { table.PrimaryKey("PRIMARY", x => new { x.id, x.uid }); }) .Annotation("MySql:CharSet", "utf8"); migrationBuilder.CreateIndex( name: "uid", table: "account_links", column: "uid"); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "account_links"); } } }