[backend/database] Remove length restriction from DriveFile comment column

This commit is contained in:
Laura Hausmann 2024-02-13 03:01:39 +01:00
parent 45d08caa94
commit 8c015815bc
No known key found for this signature in database
GPG key ID: D044E84C5BE01605
3 changed files with 6002 additions and 2 deletions

View file

@ -0,0 +1,42 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Iceshrimp.Backend.Core.Database.Migrations
{
/// <inheritdoc />
public partial class RemoveDriveFileCommentLengthRestriction : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "comment",
table: "drive_file",
type: "text",
nullable: true,
comment: "The comment of the DriveFile.",
oldClrType: typeof(string),
oldType: "character varying(8192)",
oldMaxLength: 8192,
oldNullable: true,
oldComment: "The comment of the DriveFile.");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "comment",
table: "drive_file",
type: "character varying(8192)",
maxLength: 8192,
nullable: true,
comment: "The comment of the DriveFile.",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true,
oldComment: "The comment of the DriveFile.");
}
}
}

View file

@ -854,8 +854,7 @@ namespace Iceshrimp.Backend.Core.Database.Migrations
.HasComment("The BlurHash string.");
b.Property<string>("Comment")
.HasMaxLength(8192)
.HasColumnType("character varying(8192)")
.HasColumnType("text")
.HasColumnName("comment")
.HasComment("The comment of the DriveFile.");