92 lines
3.2 KiB
C#
92 lines
3.2 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace PowderCoating.Infrastructure.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class AddUserBan : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<bool>(
|
|
name: "IsBanned",
|
|
table: "AspNetUsers",
|
|
type: "bit",
|
|
nullable: false,
|
|
defaultValue: false);
|
|
|
|
migrationBuilder.AddColumn<DateTime>(
|
|
name: "BannedAt",
|
|
table: "AspNetUsers",
|
|
type: "datetime2",
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "BanReason",
|
|
table: "AspNetUsers",
|
|
type: "nvarchar(max)",
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "BannedByUserId",
|
|
table: "AspNetUsers",
|
|
type: "nvarchar(450)",
|
|
nullable: true);
|
|
|
|
migrationBuilder.UpdateData(
|
|
table: "PricingTiers",
|
|
keyColumn: "Id",
|
|
keyValue: 1,
|
|
column: "CreatedAt",
|
|
value: new DateTime(2026, 4, 22, 4, 8, 40, 918, DateTimeKind.Utc).AddTicks(2111));
|
|
|
|
migrationBuilder.UpdateData(
|
|
table: "PricingTiers",
|
|
keyColumn: "Id",
|
|
keyValue: 2,
|
|
column: "CreatedAt",
|
|
value: new DateTime(2026, 4, 22, 4, 8, 40, 918, DateTimeKind.Utc).AddTicks(2118));
|
|
|
|
migrationBuilder.UpdateData(
|
|
table: "PricingTiers",
|
|
keyColumn: "Id",
|
|
keyValue: 3,
|
|
column: "CreatedAt",
|
|
value: new DateTime(2026, 4, 22, 4, 8, 40, 918, DateTimeKind.Utc).AddTicks(2119));
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(name: "IsBanned", table: "AspNetUsers");
|
|
migrationBuilder.DropColumn(name: "BannedAt", table: "AspNetUsers");
|
|
migrationBuilder.DropColumn(name: "BanReason", table: "AspNetUsers");
|
|
migrationBuilder.DropColumn(name: "BannedByUserId", table: "AspNetUsers");
|
|
|
|
migrationBuilder.UpdateData(
|
|
table: "PricingTiers",
|
|
keyColumn: "Id",
|
|
keyValue: 1,
|
|
column: "CreatedAt",
|
|
value: new DateTime(2026, 4, 22, 2, 47, 54, 470, DateTimeKind.Utc).AddTicks(431));
|
|
|
|
migrationBuilder.UpdateData(
|
|
table: "PricingTiers",
|
|
keyColumn: "Id",
|
|
keyValue: 2,
|
|
column: "CreatedAt",
|
|
value: new DateTime(2026, 4, 22, 2, 47, 54, 470, DateTimeKind.Utc).AddTicks(437));
|
|
|
|
migrationBuilder.UpdateData(
|
|
table: "PricingTiers",
|
|
keyColumn: "Id",
|
|
keyValue: 3,
|
|
column: "CreatedAt",
|
|
value: new DateTime(2026, 4, 22, 2, 47, 54, 470, DateTimeKind.Utc).AddTicks(439));
|
|
}
|
|
}
|
|
}
|