Files
Iris-Rec-2023-Server-Code/Migrations/20260326190847_refreshTableConfig.cs
T
Exception 46589f2ef3 MOVEMENT
2026-05-09 14:13:43 -04:00

52 lines
1.7 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace ir23.Migrations
{
/// <inheritdoc />
public partial class refreshTableConfig : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "developer",
table: "Accounts",
type: "tinyint(1)",
nullable: false,
defaultValue: false);
migrationBuilder.CreateTable(
name: "refreshtables",
columns: table => new
{
Id = table.Column<long>(type: "bigint", nullable: false)
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
RefreshToken = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
ExpiryTime = table.Column<DateTime>(type: "datetime(6)", nullable: false),
AccountId = table.Column<long>(type: "bigint", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_refreshtables", x => x.Id);
})
.Annotation("MySql:CharSet", "utf8mb4");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "refreshtables");
migrationBuilder.DropColumn(
name: "developer",
table: "Accounts");
}
}
}