mirror of
https://github.com/alex289/CleanArchitecture.git
synced 2025-06-30 10:33:43 +00:00
48 lines
1.4 KiB
C#
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");
|
|
}
|
|
}
|
|
}
|