using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Example.Data.Migrations.Postgres
{
///
public partial class DateOnlyColumns : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn(
name: "Published",
table: "Books",
type: "date",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone");
migrationBuilder.AlterColumn(
name: "Birthdate",
table: "Authors",
type: "date",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone");
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn(
name: "Published",
table: "Books",
type: "timestamp with time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "date");
migrationBuilder.AlterColumn(
name: "Birthdate",
table: "Authors",
type: "timestamp with time zone",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "date");
}
}
}