Files
Aberwyn/Aberwyn/Migrations/20250515204407_MakePersonNullable.cs
Elias Jansson 3759769ea0
All checks were successful
continuous-integration/drone/push Build is passing
Budget, admin och lite css
2025-05-21 00:13:47 +02:00

44 lines
1.3 KiB
C#

using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Aberwyn.Migrations
{
public partial class MakePersonNullable : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "Person",
table: "BudgetItems",
type: "longtext",
nullable: true,
oldClrType: typeof(string),
oldType: "longtext")
.Annotation("MySql:CharSet", "utf8mb4")
.OldAnnotation("MySql:CharSet", "utf8mb4");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.UpdateData(
table: "BudgetItems",
keyColumn: "Person",
keyValue: null,
column: "Person",
value: "");
migrationBuilder.AlterColumn<string>(
name: "Person",
table: "BudgetItems",
type: "longtext",
nullable: false,
oldClrType: typeof(string),
oldType: "longtext",
oldNullable: true)
.Annotation("MySql:CharSet", "utf8mb4")
.OldAnnotation("MySql:CharSet", "utf8mb4");
}
}
}