Tranga/API/Migrations/20250111180034_ChapterNumber.cs

55 lines
1.6 KiB
C#
Raw Normal View History

using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace API.Migrations
{
/// <inheritdoc />
public partial class ChapterNumber : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<int>(
name: "VolumeNumber",
table: "Chapters",
type: "integer",
nullable: true,
oldClrType: typeof(float),
oldType: "real",
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "ChapterNumber",
table: "Chapters",
type: "character varying(10)",
maxLength: 10,
nullable: false,
oldClrType: typeof(float),
oldType: "real");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<float>(
name: "VolumeNumber",
table: "Chapters",
type: "real",
nullable: true,
oldClrType: typeof(int),
oldType: "integer",
oldNullable: true);
migrationBuilder.AlterColumn<float>(
name: "ChapterNumber",
table: "Chapters",
type: "real",
nullable: false,
oldClrType: typeof(string),
oldType: "character varying(10)",
oldMaxLength: 10);
}
}
}