PIAPS_CW/DatabaseImplement/Migrations/20240718214141_purchasepatch.cs

41 lines
1.2 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace DatabaseImplement.Migrations
{
/// <inheritdoc />
public partial class purchasepatch : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.RenameColumn(
name: "DatePurchase",
table: "Purchases",
newName: "DateClosed");
migrationBuilder.AddColumn<DateTime>(
name: "DateCreated",
table: "Purchases",
type: "timestamp without time zone",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "DateCreated",
table: "Purchases");
migrationBuilder.RenameColumn(
name: "DateClosed",
table: "Purchases",
newName: "DatePurchase");
}
}
}