[backend/database] Increase instance softwareName and softwareVersion max length to 256
This commit is contained in:
parent
7dd0262333
commit
d7a69375b6
3 changed files with 75 additions and 6 deletions
|
@ -1498,14 +1498,14 @@ namespace Iceshrimp.Backend.Core.Database.Migrations
|
||||||
.HasColumnName("outgoingFollows");
|
.HasColumnName("outgoingFollows");
|
||||||
|
|
||||||
b.Property<string>("SoftwareName")
|
b.Property<string>("SoftwareName")
|
||||||
.HasMaxLength(64)
|
.HasMaxLength(256)
|
||||||
.HasColumnType("character varying(64)")
|
.HasColumnType("character varying(256)")
|
||||||
.HasColumnName("softwareName")
|
.HasColumnName("softwareName")
|
||||||
.HasComment("The software of the Instance.");
|
.HasComment("The software of the Instance.");
|
||||||
|
|
||||||
b.Property<string>("SoftwareVersion")
|
b.Property<string>("SoftwareVersion")
|
||||||
.HasMaxLength(64)
|
.HasMaxLength(256)
|
||||||
.HasColumnType("character varying(64)")
|
.HasColumnType("character varying(256)")
|
||||||
.HasColumnName("softwareVersion");
|
.HasColumnName("softwareVersion");
|
||||||
|
|
||||||
b.Property<string>("ThemeColor")
|
b.Property<string>("ThemeColor")
|
||||||
|
|
|
@ -0,0 +1,69 @@
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace Iceshrimp.Backend.Core.Database.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
[DbContext(typeof(DatabaseContext))]
|
||||||
|
[Migration("20240427192537_IncreaseInstanceSoftwareNameVersionLength")]
|
||||||
|
public partial class IncreaseInstanceSoftwareNameVersionLength : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "softwareVersion",
|
||||||
|
table: "instance",
|
||||||
|
type: "character varying(256)",
|
||||||
|
maxLength: 256,
|
||||||
|
nullable: true,
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldType: "character varying(64)",
|
||||||
|
oldMaxLength: 64,
|
||||||
|
oldNullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "softwareName",
|
||||||
|
table: "instance",
|
||||||
|
type: "character varying(256)",
|
||||||
|
maxLength: 256,
|
||||||
|
nullable: true,
|
||||||
|
comment: "The software of the Instance.",
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldType: "character varying(64)",
|
||||||
|
oldMaxLength: 64,
|
||||||
|
oldNullable: true,
|
||||||
|
oldComment: "The software of the Instance.");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "softwareVersion",
|
||||||
|
table: "instance",
|
||||||
|
type: "character varying(64)",
|
||||||
|
maxLength: 64,
|
||||||
|
nullable: true,
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldType: "character varying(256)",
|
||||||
|
oldMaxLength: 256,
|
||||||
|
oldNullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "softwareName",
|
||||||
|
table: "instance",
|
||||||
|
type: "character varying(64)",
|
||||||
|
maxLength: 64,
|
||||||
|
nullable: true,
|
||||||
|
comment: "The software of the Instance.",
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldType: "character varying(256)",
|
||||||
|
oldMaxLength: 256,
|
||||||
|
oldNullable: true,
|
||||||
|
oldComment: "The software of the Instance.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -61,11 +61,11 @@ public class Instance
|
||||||
/// The software of the Instance.
|
/// The software of the Instance.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Column("softwareName")]
|
[Column("softwareName")]
|
||||||
[StringLength(64)]
|
[StringLength(256)]
|
||||||
public string? SoftwareName { get; set; }
|
public string? SoftwareName { get; set; }
|
||||||
|
|
||||||
[Column("softwareVersion")]
|
[Column("softwareVersion")]
|
||||||
[StringLength(64)]
|
[StringLength(256)]
|
||||||
public string? SoftwareVersion { get; set; }
|
public string? SoftwareVersion { get; set; }
|
||||||
|
|
||||||
[Column("openRegistrations")] public bool? OpenRegistrations { get; set; }
|
[Column("openRegistrations")] public bool? OpenRegistrations { get; set; }
|
||||||
|
|
Loading…
Add table
Reference in a new issue