mirror of
https://github.com/whoswhip/Sharpbin.git
synced 2026-12-05 18:48:41 +00:00
46 lines
1.3 KiB
C#
46 lines
1.3 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace SharpbinV3.Server.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class FlaggedRolesEnumVisiblity : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AlterColumn<int>(
|
|
name: "Roles",
|
|
table: "Users",
|
|
type: "INTEGER",
|
|
nullable: false,
|
|
oldClrType: typeof(string),
|
|
oldType: "TEXT");
|
|
|
|
migrationBuilder.AddColumn<bool>(
|
|
name: "IsBanned",
|
|
table: "Users",
|
|
type: "INTEGER",
|
|
nullable: false,
|
|
defaultValue: false);
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "IsBanned",
|
|
table: "Users");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "Roles",
|
|
table: "Users",
|
|
type: "TEXT",
|
|
nullable: false,
|
|
oldClrType: typeof(int),
|
|
oldType: "INTEGER");
|
|
}
|
|
}
|
|
}
|