71b7a53e59
Removes DateOnly/DateTime conversion boilerplate from all Show endpoints and adds the corresponding EF Core migration. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
38 lines
1.0 KiB
C#
38 lines
1.0 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace PyroFetes.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class DateTimeForShow : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AlterColumn<DateTime>(
|
|
name: "Date",
|
|
table: "Shows",
|
|
type: "datetime2",
|
|
nullable: true,
|
|
oldClrType: typeof(DateOnly),
|
|
oldType: "date",
|
|
oldNullable: true);
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AlterColumn<DateOnly>(
|
|
name: "Date",
|
|
table: "Shows",
|
|
type: "date",
|
|
nullable: true,
|
|
oldClrType: typeof(DateTime),
|
|
oldType: "datetime2",
|
|
oldNullable: true);
|
|
}
|
|
}
|
|
}
|