[backend/database] Remove length limit on note.cw column (ISH-84)
This commit is contained in:
parent
ecaaa27d87
commit
7655e216ec
4 changed files with 6204 additions and 3 deletions
6164
Iceshrimp.Backend/Core/Database/Migrations/20240304000222_RemoveCwLengthRestriction.Designer.cs
generated
Normal file
6164
Iceshrimp.Backend/Core/Database/Migrations/20240304000222_RemoveCwLengthRestriction.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,38 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Iceshrimp.Backend.Core.Database.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class RemoveCwLengthRestriction : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "cw",
|
||||
table: "note",
|
||||
type: "text",
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "character varying(512)",
|
||||
oldMaxLength: 512,
|
||||
oldNullable: true);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "cw",
|
||||
table: "note",
|
||||
type: "character varying(512)",
|
||||
maxLength: 512,
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "text",
|
||||
oldNullable: true);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -2434,8 +2434,7 @@ namespace Iceshrimp.Backend.Core.Database.Migrations
|
|||
.HasComment("The created date of the Note.");
|
||||
|
||||
b.Property<string>("Cw")
|
||||
.HasMaxLength(512)
|
||||
.HasColumnType("character varying(512)")
|
||||
.HasColumnType("text")
|
||||
.HasColumnName("cw");
|
||||
|
||||
b.Property<List<string>>("Emojis")
|
||||
|
|
|
@ -63,7 +63,7 @@ public class Note : IEntity
|
|||
|
||||
[Column("name")] [StringLength(256)] public string? Name { get; set; }
|
||||
|
||||
[Column("cw")] [StringLength(512)] public string? Cw { get; set; }
|
||||
[Column("cw")] public string? Cw { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The ID of author.
|
||||
|
|
Loading…
Add table
Reference in a new issue