52 lines
1.5 KiB
C#
52 lines
1.5 KiB
C#
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");
|
|
}
|
|
}
|
|
}
|