55 lines
1.8 KiB
C#
55 lines
1.8 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace Yavsc.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class commentAllowed : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<bool>(
|
|
name: "Comment",
|
|
table: "CircleAuthorizationToBlogPost",
|
|
type: "boolean",
|
|
nullable: false,
|
|
defaultValue: false);
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "Avatar",
|
|
table: "AspNetUsers",
|
|
type: "character varying(512)",
|
|
maxLength: 512,
|
|
nullable: true,
|
|
defaultValue: "/images/Users/icon_user.png",
|
|
oldClrType: typeof(string),
|
|
oldType: "character varying(512)",
|
|
oldMaxLength: 512,
|
|
oldDefaultValue: "/images/Users/icon_user.png");
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "Comment",
|
|
table: "CircleAuthorizationToBlogPost");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "Avatar",
|
|
table: "AspNetUsers",
|
|
type: "character varying(512)",
|
|
maxLength: 512,
|
|
nullable: false,
|
|
defaultValue: "/images/Users/icon_user.png",
|
|
oldClrType: typeof(string),
|
|
oldType: "character varying(512)",
|
|
oldMaxLength: 512,
|
|
oldNullable: true,
|
|
oldDefaultValue: "/images/Users/icon_user.png");
|
|
}
|
|
}
|
|
}
|