Files
Govor/Govor.Data/Migrations/20250618082839_AddPasswordHashColumn.cs
T
2025-06-18 16:55:19 +07:00

46 lines
1.3 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Govor.Data.Migrations
{
/// <inheritdoc />
public partial class AddPasswordHashColumn : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.RenameColumn(
name: "HashPassword",
table: "Users",
newName: "PasswordHash");
migrationBuilder.AlterColumn<DateOnly>(
name: "CreatedOn",
table: "Users",
type: "date",
nullable: false,
oldClrType: typeof(DateTime),
oldType: "timestamp with time zone");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.RenameColumn(
name: "PasswordHash",
table: "Users",
newName: "HashPassword");
migrationBuilder.AlterColumn<DateTime>(
name: "CreatedOn",
table: "Users",
type: "timestamp with time zone",
nullable: false,
oldClrType: typeof(DateOnly),
oldType: "date");
}
}
}