83 lines
2.3 KiB
C#
83 lines
2.3 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace Knot.Modules.Auth.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class AddUserExtendedFields : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<bool>(
|
|
name: "IsExternal",
|
|
schema: "identity",
|
|
table: "Users",
|
|
type: "boolean",
|
|
nullable: false,
|
|
defaultValue: false);
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "Domain",
|
|
schema: "identity",
|
|
table: "Users",
|
|
type: "text",
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<bool>(
|
|
name: "IsOnline",
|
|
schema: "identity",
|
|
table: "Users",
|
|
type: "boolean",
|
|
nullable: false,
|
|
defaultValue: false);
|
|
|
|
migrationBuilder.AddColumn<DateTime>(
|
|
name: "LastSeen",
|
|
schema: "identity",
|
|
table: "Users",
|
|
type: "timestamp with time zone",
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<bool>(
|
|
name: "HideStatus",
|
|
schema: "identity",
|
|
table: "Users",
|
|
type: "boolean",
|
|
nullable: false,
|
|
defaultValue: false);
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "IsExternal",
|
|
schema: "identity",
|
|
table: "Users");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "Domain",
|
|
schema: "identity",
|
|
table: "Users");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "IsOnline",
|
|
schema: "identity",
|
|
table: "Users");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "LastSeen",
|
|
schema: "identity",
|
|
table: "Users");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "HideStatus",
|
|
schema: "identity",
|
|
table: "Users");
|
|
}
|
|
}
|
|
}
|