using System; using Microsoft.EntityFrameworkCore.Migrations; using MySql.EntityFrameworkCore.Metadata; #nullable disable namespace API.Migrations { /// public partial class init : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AlterDatabase() .Annotation("MySQL:Charset", "utf8mb4"); migrationBuilder.CreateTable( name: "Users", columns: table => new { Id = table.Column(type: "int", nullable: false) .Annotation("MySQL:ValueGenerationStrategy", MySQLValueGenerationStrategy.IdentityColumn), UserName = table.Column(type: "longtext", nullable: false), Password = table.Column(type: "longtext", nullable: false), Email = table.Column(type: "longtext", nullable: false), Salt = table.Column(type: "longtext", nullable: true), RefreshToken = table.Column(type: "longtext", nullable: true), RefreshTokenExpireAt = table.Column(type: "datetime(6)", nullable: false) }, constraints: table => { table.PrimaryKey("PK_Users", x => x.Id); }) .Annotation("MySQL:Charset", "utf8mb4"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "Users"); } } }