mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 10:21:18 +03:00
migration update CorvaxTTS
This commit is contained in:
parent
9ca71ff554
commit
cdefb5d363
9 changed files with 4508 additions and 11 deletions
|
|
@ -10,19 +10,32 @@ namespace Content.Server.Database.Migrations.Postgres
|
|||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "voice",
|
||||
table: "profile",
|
||||
type: "text",
|
||||
nullable: true);
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "text",
|
||||
oldNullable: false);
|
||||
|
||||
migrationBuilder.Sql("UPDATE profile SET voice = NULL"); // Corvax-TTS Это было неприятно, да я мог сделать это наоборот но слишком поздно узнал.
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
migrationBuilder.Sql("UPDATE profile SET voice = '' WHERE voice IS NULL");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "voice",
|
||||
table: "profile");
|
||||
table: "profile",
|
||||
type: "text",
|
||||
nullable: false,
|
||||
defaultValue: "",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "text",
|
||||
oldNullable: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
2244
Content.Server.Database/Migrations/Postgres/20260702082348_TTSrename.Designer.cs
generated
Normal file
2244
Content.Server.Database/Migrations/Postgres/20260702082348_TTSrename.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,29 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Content.Server.Database.Migrations.Postgres
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class TTSrename : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "ttsvoice",
|
||||
table: "profile",
|
||||
type: "text",
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ttsvoice",
|
||||
table: "profile");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
// <auto-generated />
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
|
|
@ -1191,6 +1191,11 @@ namespace Content.Server.Database.Migrations.Postgres
|
|||
.HasColumnType("text")
|
||||
.HasColumnName("species");
|
||||
|
||||
b.Property<string>("TTSVoice")
|
||||
.IsRequired()
|
||||
.HasColumnType("text")
|
||||
.HasColumnName("ttsvoice");
|
||||
|
||||
b.Property<string>("Voice")
|
||||
.HasColumnType("text")
|
||||
.HasColumnName("voice");
|
||||
|
|
|
|||
|
|
@ -10,19 +10,30 @@ namespace Content.Server.Database.Migrations.Sqlite
|
|||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "voice",
|
||||
table: "profile",
|
||||
type: "TEXT",
|
||||
nullable: true);
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "TEXT",
|
||||
oldNullable: false);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
migrationBuilder.Sql("UPDATE profile SET voice = '' WHERE voice IS NULL");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "voice",
|
||||
table: "profile");
|
||||
table: "profile",
|
||||
type: "TEXT",
|
||||
nullable: false,
|
||||
defaultValue: "",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "TEXT",
|
||||
oldNullable: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
2161
Content.Server.Database/Migrations/Sqlite/20260702082330_TTSrename.Designer.cs
generated
Normal file
2161
Content.Server.Database/Migrations/Sqlite/20260702082330_TTSrename.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,29 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Content.Server.Database.Migrations.Sqlite
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class TTSrename : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "ttsvoice",
|
||||
table: "profile",
|
||||
type: "TEXT",
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ttsvoice",
|
||||
table: "profile");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
// <auto-generated />
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Content.Server.Database;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
|
@ -1126,6 +1126,11 @@ namespace Content.Server.Database.Migrations.Sqlite
|
|||
.HasColumnType("TEXT")
|
||||
.HasColumnName("species");
|
||||
|
||||
b.Property<string>("TTSVoice")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("ttsvoice");
|
||||
|
||||
b.Property<string>("Voice")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("voice");
|
||||
|
|
|
|||
|
|
@ -335,7 +335,7 @@ namespace Content.Server.Database
|
|||
public string? Voice { get; set; } = null!; // If null, the voice gets defaulted to the sex associated value
|
||||
public string Gender { get; set; } = null!;
|
||||
public string Species { get; set; } = null!;
|
||||
public string TTSVoice { get; set; } = null!; // Corvax-TTS
|
||||
[Column("ttsvoice")] public string TTSVoice { get; set; } = null!; // Corvax-TTS
|
||||
[Column(TypeName = "jsonb")] public JsonDocument? OrganMarkings { get; set; } = null!;
|
||||
[Column(TypeName = "jsonb")] public JsonDocument? Markings { get; set; } = null!;
|
||||
public string HairName { get; set; } = null!;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue