0
0
mirror of https://github.com/alex289/CleanArchitecture.git synced 2025-06-29 18:21:08 +00:00
CleanArchitecture/CleanArchitecture.Infrastructure/Migrations/20230901064720_AddUserStatus.cs
2023-09-01 08:48:23 +02:00

48 lines
1.4 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace CleanArchitecture.Infrastructure.Migrations
{
/// <inheritdoc />
public partial class AddUserStatus : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<DateTimeOffset>(
name: "LastLoggedinDate",
table: "Users",
type: "datetimeoffset",
nullable: true);
migrationBuilder.AddColumn<int>(
name: "Status",
table: "Users",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.UpdateData(
table: "Users",
keyColumn: "Id",
keyValue: new Guid("7e3892c0-9374-49fa-a3fd-53db637a40ae"),
columns: new[] { "LastLoggedinDate", "Status" },
values: new object[] { null, 0 });
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "LastLoggedinDate",
table: "Users");
migrationBuilder.DropColumn(
name: "Status",
table: "Users");
}
}
}