dramaling-vocab-learning/backend/DramaLing.Api/Migrations/20250925104256_AddSpacedRep...

62 lines
1.7 KiB
C#

using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace DramaLing.Api.Migrations
{
/// <inheritdoc />
public partial class AddSpacedRepetitionFields : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "LastQuestionType",
table: "flashcards",
type: "TEXT",
maxLength: 50,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "ReviewHistory",
table: "flashcards",
type: "TEXT",
nullable: true);
migrationBuilder.AddColumn<int>(
name: "UserLevel",
table: "flashcards",
type: "INTEGER",
nullable: false,
defaultValue: 0);
migrationBuilder.AddColumn<int>(
name: "WordLevel",
table: "flashcards",
type: "INTEGER",
nullable: false,
defaultValue: 0);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "LastQuestionType",
table: "flashcards");
migrationBuilder.DropColumn(
name: "ReviewHistory",
table: "flashcards");
migrationBuilder.DropColumn(
name: "UserLevel",
table: "flashcards");
migrationBuilder.DropColumn(
name: "WordLevel",
table: "flashcards");
}
}
}