66 lines
2.0 KiB
C#
66 lines
2.0 KiB
C#
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");
|
|
}
|
|
}
|
|
}
|