87 lines
2.9 KiB
C#
87 lines
2.9 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace GroupService.Infrastructure.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class removeGroupRequestOperatorProfile : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "OperatorProfile_Avatar",
|
|
table: "group_join_requests");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "OperatorProfile_NickName",
|
|
table: "group_join_requests");
|
|
|
|
migrationBuilder.AlterColumn<Guid>(
|
|
name: "OperatorId",
|
|
table: "group_join_requests",
|
|
type: "char(36)",
|
|
nullable: true,
|
|
collation: "ascii_general_ci",
|
|
oldClrType: typeof(Guid),
|
|
oldType: "char(36)")
|
|
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "OperatorAvatar",
|
|
table: "group_join_requests",
|
|
type: "longtext",
|
|
nullable: true)
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "OperatorName",
|
|
table: "group_join_requests",
|
|
type: "longtext",
|
|
nullable: true)
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "OperatorAvatar",
|
|
table: "group_join_requests");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "OperatorName",
|
|
table: "group_join_requests");
|
|
|
|
migrationBuilder.AlterColumn<Guid>(
|
|
name: "OperatorId",
|
|
table: "group_join_requests",
|
|
type: "char(36)",
|
|
nullable: false,
|
|
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
|
|
collation: "ascii_general_ci",
|
|
oldClrType: typeof(Guid),
|
|
oldType: "char(36)",
|
|
oldNullable: true)
|
|
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "OperatorProfile_Avatar",
|
|
table: "group_join_requests",
|
|
type: "varchar(100)",
|
|
maxLength: 100,
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "OperatorProfile_NickName",
|
|
table: "group_join_requests",
|
|
type: "varchar(20)",
|
|
maxLength: 20,
|
|
nullable: false,
|
|
defaultValue: "");
|
|
}
|
|
}
|
|
}
|