ISEbd-21_Melnikov_I.O._CarS.../CarService/CarServiceDatabase/Migrations/20230405185109_DateFixMigration.cs

52 lines
1.5 KiB
C#
Raw Normal View History

using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace CarServiceDatabase.Migrations
{
/// <inheritdoc />
public partial class DateFixMigration : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<DateTime>(
name: "DatePayment",
table: "WorkPayments",
type: "date",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "datetime2");
migrationBuilder.AlterColumn<DateTime>(
name: "DateCreated",
table: "RepairRequests",
type: "date",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "datetime2");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<DateTime>(
name: "DatePayment",
table: "WorkPayments",
type: "datetime2",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "date");
migrationBuilder.AlterColumn<DateTime>(
name: "DateCreated",
table: "RepairRequests",
type: "datetime2",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "date");
}
}
}