This commit is contained in:
2026-02-12 21:53:26 +08:00
parent 77db20dc38
commit b96d895809
339 changed files with 46655 additions and 46657 deletions
File diff suppressed because it is too large Load Diff
@@ -1,73 +1,73 @@
using System;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace IM_API.Migrations
{
/// <inheritdoc />
public partial class InitialCreate : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "admins");
migrationBuilder.DropTable(
name: "conversations");
migrationBuilder.DropTable(
name: "devices");
migrationBuilder.DropTable(
name: "files");
migrationBuilder.DropTable(
name: "friend_request");
migrationBuilder.DropTable(
name: "friends");
migrationBuilder.DropTable(
name: "group_invite");
migrationBuilder.DropTable(
name: "group_member");
migrationBuilder.DropTable(
name: "group_request");
migrationBuilder.DropTable(
name: "login_log");
migrationBuilder.DropTable(
name: "notifications");
migrationBuilder.DropTable(
name: "permissionarole");
migrationBuilder.DropTable(
name: "messages");
migrationBuilder.DropTable(
name: "groups");
migrationBuilder.DropTable(
name: "roles");
migrationBuilder.DropTable(
name: "permissions");
migrationBuilder.DropTable(
name: "users");
}
}
}
using System;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace IM_API.Migrations
{
/// <inheritdoc />
public partial class InitialCreate : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "admins");
migrationBuilder.DropTable(
name: "conversations");
migrationBuilder.DropTable(
name: "devices");
migrationBuilder.DropTable(
name: "files");
migrationBuilder.DropTable(
name: "friend_request");
migrationBuilder.DropTable(
name: "friends");
migrationBuilder.DropTable(
name: "group_invite");
migrationBuilder.DropTable(
name: "group_member");
migrationBuilder.DropTable(
name: "group_request");
migrationBuilder.DropTable(
name: "login_log");
migrationBuilder.DropTable(
name: "notifications");
migrationBuilder.DropTable(
name: "permissionarole");
migrationBuilder.DropTable(
name: "messages");
migrationBuilder.DropTable(
name: "groups");
migrationBuilder.DropTable(
name: "roles");
migrationBuilder.DropTable(
name: "permissions");
migrationBuilder.DropTable(
name: "users");
}
}
}
File diff suppressed because it is too large Load Diff
@@ -1,28 +1,28 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace IM_API.Migrations
{
/// <inheritdoc />
public partial class change_file : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.RenameColumn(
name: "Type",
table: "files",
newName: "FileType");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.RenameColumn(
name: "FileType",
table: "files",
newName: "Type");
}
}
}
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace IM_API.Migrations
{
/// <inheritdoc />
public partial class change_file : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.RenameColumn(
name: "Type",
table: "files",
newName: "FileType");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.RenameColumn(
name: "FileType",
table: "files",
newName: "Type");
}
}
}
File diff suppressed because it is too large Load Diff
@@ -1,40 +1,40 @@
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");
}
}
}
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");
}
}
}
File diff suppressed because it is too large Load Diff
@@ -1,41 +1,41 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace IM_API.Migrations
{
/// <inheritdoc />
public partial class updateconversationlastreadmessageid : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "conversations_ibfk_2",
table: "conversations");
migrationBuilder.AddForeignKey(
name: "conversations_ibfk_2",
table: "conversations",
column: "lastReadMessageId",
principalTable: "messages",
principalColumn: "ID",
onDelete: ReferentialAction.SetNull);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "conversations_ibfk_2",
table: "conversations");
migrationBuilder.AddForeignKey(
name: "conversations_ibfk_2",
table: "conversations",
column: "lastReadMessageId",
principalTable: "messages",
principalColumn: "ID");
}
}
}
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace IM_API.Migrations
{
/// <inheritdoc />
public partial class updateconversationlastreadmessageid : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "conversations_ibfk_2",
table: "conversations");
migrationBuilder.AddForeignKey(
name: "conversations_ibfk_2",
table: "conversations",
column: "lastReadMessageId",
principalTable: "messages",
principalColumn: "ID",
onDelete: ReferentialAction.SetNull);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "conversations_ibfk_2",
table: "conversations");
migrationBuilder.AddForeignKey(
name: "conversations_ibfk_2",
table: "conversations",
column: "lastReadMessageId",
principalTable: "messages",
principalColumn: "ID");
}
}
}
File diff suppressed because it is too large Load Diff
@@ -1,93 +1,93 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace IM_API.Migrations
{
/// <inheritdoc />
public partial class updatemessage : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "conversations_ibfk_2",
table: "conversations");
migrationBuilder.RenameIndex(
name: "lastMessageId",
table: "conversations",
newName: "LastReadSequenceId");
migrationBuilder.AddColumn<Guid>(
name: "ClientMsgId",
table: "messages",
type: "char(36)",
nullable: false,
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
collation: "ascii_general_ci");
migrationBuilder.AddColumn<int>(
name: "MessageId",
table: "conversations",
type: "int(11)",
nullable: true);
migrationBuilder.CreateIndex(
name: "IX_messages_SequenceId_StreamKey",
table: "messages",
columns: new[] { "SequenceId", "StreamKey" },
unique: true);
migrationBuilder.CreateIndex(
name: "IX_conversations_MessageId",
table: "conversations",
column: "MessageId");
migrationBuilder.AddForeignKey(
name: "FK_conversations_messages_MessageId",
table: "conversations",
column: "MessageId",
principalTable: "messages",
principalColumn: "ID");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_conversations_messages_MessageId",
table: "conversations");
migrationBuilder.DropIndex(
name: "IX_messages_SequenceId_StreamKey",
table: "messages");
migrationBuilder.DropIndex(
name: "IX_conversations_MessageId",
table: "conversations");
migrationBuilder.DropColumn(
name: "ClientMsgId",
table: "messages");
migrationBuilder.DropColumn(
name: "MessageId",
table: "conversations");
migrationBuilder.RenameIndex(
name: "LastReadSequenceId",
table: "conversations",
newName: "lastMessageId");
migrationBuilder.AddForeignKey(
name: "conversations_ibfk_2",
table: "conversations",
column: "lastReadMessageId",
principalTable: "messages",
principalColumn: "ID",
onDelete: ReferentialAction.SetNull);
}
}
}
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace IM_API.Migrations
{
/// <inheritdoc />
public partial class updatemessage : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "conversations_ibfk_2",
table: "conversations");
migrationBuilder.RenameIndex(
name: "lastMessageId",
table: "conversations",
newName: "LastReadSequenceId");
migrationBuilder.AddColumn<Guid>(
name: "ClientMsgId",
table: "messages",
type: "char(36)",
nullable: false,
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
collation: "ascii_general_ci");
migrationBuilder.AddColumn<int>(
name: "MessageId",
table: "conversations",
type: "int(11)",
nullable: true);
migrationBuilder.CreateIndex(
name: "IX_messages_SequenceId_StreamKey",
table: "messages",
columns: new[] { "SequenceId", "StreamKey" },
unique: true);
migrationBuilder.CreateIndex(
name: "IX_conversations_MessageId",
table: "conversations",
column: "MessageId");
migrationBuilder.AddForeignKey(
name: "FK_conversations_messages_MessageId",
table: "conversations",
column: "MessageId",
principalTable: "messages",
principalColumn: "ID");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_conversations_messages_MessageId",
table: "conversations");
migrationBuilder.DropIndex(
name: "IX_messages_SequenceId_StreamKey",
table: "messages");
migrationBuilder.DropIndex(
name: "IX_conversations_MessageId",
table: "conversations");
migrationBuilder.DropColumn(
name: "ClientMsgId",
table: "messages");
migrationBuilder.DropColumn(
name: "MessageId",
table: "conversations");
migrationBuilder.RenameIndex(
name: "LastReadSequenceId",
table: "conversations",
newName: "lastMessageId");
migrationBuilder.AddForeignKey(
name: "conversations_ibfk_2",
table: "conversations",
column: "lastReadMessageId",
principalTable: "messages",
principalColumn: "ID",
onDelete: ReferentialAction.SetNull);
}
}
}
File diff suppressed because it is too large Load Diff
@@ -1,22 +1,22 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace IM_API.Migrations
{
/// <inheritdoc />
public partial class updatedatetimeToDateTimeOffset : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
}
}
}
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace IM_API.Migrations
{
/// <inheritdoc />
public partial class updatedatetimeToDateTimeOffset : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
}
}
}
File diff suppressed because it is too large Load Diff
@@ -1,22 +1,22 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace IM_API.Migrations
{
/// <inheritdoc />
public partial class updateDateTimeOffsettype : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
}
}
}
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace IM_API.Migrations
{
/// <inheritdoc />
public partial class updateDateTimeOffsettype : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
}
}
}
File diff suppressed because it is too large Load Diff
@@ -1,65 +1,65 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace IM_API.Migrations
{
/// <inheritdoc />
public partial class updategroup : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "LastMessage",
table: "groups",
type: "longtext",
nullable: false,
collation: "utf8mb4_general_ci")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "LastSenderName",
table: "groups",
type: "longtext",
nullable: false,
collation: "utf8mb4_general_ci")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<DateTimeOffset>(
name: "LastUpdateTime",
table: "groups",
type: "datetime(6)",
nullable: false,
defaultValue: new DateTimeOffset(new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)));
migrationBuilder.AddColumn<long>(
name: "MaxSequenceId",
table: "groups",
type: "bigint",
nullable: false,
defaultValue: 0L);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "LastMessage",
table: "groups");
migrationBuilder.DropColumn(
name: "LastSenderName",
table: "groups");
migrationBuilder.DropColumn(
name: "LastUpdateTime",
table: "groups");
migrationBuilder.DropColumn(
name: "MaxSequenceId",
table: "groups");
}
}
}
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace IM_API.Migrations
{
/// <inheritdoc />
public partial class updategroup : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "LastMessage",
table: "groups",
type: "longtext",
nullable: false,
collation: "utf8mb4_general_ci")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "LastSenderName",
table: "groups",
type: "longtext",
nullable: false,
collation: "utf8mb4_general_ci")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<DateTimeOffset>(
name: "LastUpdateTime",
table: "groups",
type: "datetime(6)",
nullable: false,
defaultValue: new DateTimeOffset(new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), new TimeSpan(0, 0, 0, 0, 0)));
migrationBuilder.AddColumn<long>(
name: "MaxSequenceId",
table: "groups",
type: "bigint",
nullable: false,
defaultValue: 0L);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "LastMessage",
table: "groups");
migrationBuilder.DropColumn(
name: "LastSenderName",
table: "groups");
migrationBuilder.DropColumn(
name: "LastUpdateTime",
table: "groups");
migrationBuilder.DropColumn(
name: "MaxSequenceId",
table: "groups");
}
}
}
File diff suppressed because it is too large Load Diff
@@ -1,49 +1,49 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace IM_API.Migrations
{
/// <inheritdoc />
public partial class updategroupgroupiduserid : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "group_request_ibfk_2",
table: "group_request");
migrationBuilder.CreateIndex(
name: "IX_group_request_UserId",
table: "group_request",
column: "UserId");
migrationBuilder.AddForeignKey(
name: "group_request_ibfk_2",
table: "group_request",
column: "UserId",
principalTable: "users",
principalColumn: "ID");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "group_request_ibfk_2",
table: "group_request");
migrationBuilder.DropIndex(
name: "IX_group_request_UserId",
table: "group_request");
migrationBuilder.AddForeignKey(
name: "group_request_ibfk_2",
table: "group_request",
column: "GroupId",
principalTable: "users",
principalColumn: "ID");
}
}
}
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace IM_API.Migrations
{
/// <inheritdoc />
public partial class updategroupgroupiduserid : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "group_request_ibfk_2",
table: "group_request");
migrationBuilder.CreateIndex(
name: "IX_group_request_UserId",
table: "group_request",
column: "UserId");
migrationBuilder.AddForeignKey(
name: "group_request_ibfk_2",
table: "group_request",
column: "UserId",
principalTable: "users",
principalColumn: "ID");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "group_request_ibfk_2",
table: "group_request");
migrationBuilder.DropIndex(
name: "IX_group_request_UserId",
table: "group_request");
migrationBuilder.AddForeignKey(
name: "group_request_ibfk_2",
table: "group_request",
column: "GroupId",
principalTable: "users",
principalColumn: "ID");
}
}
}
File diff suppressed because it is too large Load Diff