41 lines
1.1 KiB
C#
41 lines
1.1 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace IM_API.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class addSequenceId : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "GroupMemberId",
|
|
table: "messages");
|
|
|
|
migrationBuilder.AddColumn<long>(
|
|
name: "SequenceId",
|
|
table: "messages",
|
|
type: "bigint",
|
|
nullable: false,
|
|
defaultValue: 0L);
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "SequenceId",
|
|
table: "messages");
|
|
|
|
migrationBuilder.AddColumn<int>(
|
|
name: "GroupMemberId",
|
|
table: "messages",
|
|
type: "int(11)",
|
|
nullable: true,
|
|
comment: "若为群消息则表示具体的成员id");
|
|
}
|
|
}
|
|
}
|