This migration adds a new "nonce" column to the "chat_messages" table to ensure message uniqueness or integrity. Additionally, it corrects a typo in the "members_mentioned" column name to improve consistency and clarity.
49 lines
1.4 KiB
C#
49 lines
1.4 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace DysonNetwork.Sphere.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class DontKnowHowToNameThing2 : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "type",
|
|
table: "chat_messages");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "nonce",
|
|
table: "chat_messages",
|
|
type: "character varying(36)",
|
|
maxLength: 36,
|
|
nullable: false,
|
|
oldClrType: typeof(string),
|
|
oldType: "text");
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "nonce",
|
|
table: "chat_messages",
|
|
type: "text",
|
|
nullable: false,
|
|
oldClrType: typeof(string),
|
|
oldType: "character varying(36)",
|
|
oldMaxLength: 36);
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "type",
|
|
table: "chat_messages",
|
|
type: "character varying(1024)",
|
|
maxLength: 1024,
|
|
nullable: false,
|
|
defaultValue: "");
|
|
}
|
|
}
|
|
}
|