Fix admin demo review and landing regressions
CI - Build & Verify / Build, Typecheck & Hygiene (push) Successful in 59s
CI - Build & Verify / Deploy to award.noveria.net (push) Successful in 1m34s

This commit is contained in:
AzuTear
2026-06-30 08:18:14 +02:00
parent 0803a0124b
commit 76ac60d3fd
9 changed files with 1726 additions and 29 deletions
@@ -128,7 +128,7 @@ public partial class SeedLiveDemoAwardData : Migration
award_groups.group_name,
tiers.tier_name,
award_groups.group_slug || '-' || tiers.tier_slug,
award_groups.description || ' Demo-Tier: ' || tiers.tier_name || '.',
award_groups.description,
(award_groups.ord * 100) + (tiers.ord * 10),
3,
tiers.min_viewers,
@@ -45,7 +45,7 @@ public partial class SeedCurrentSeasonDemoVotingData : Migration
WITH award_groups(ord, group_name, group_slug, description, name_prefix) AS (
VALUES
(1, 'Main Awards', 'main-awards', 'Die groessten Allround-Auszeichnungen der aktuellen Demo-Season.', 'Astra'),
(1, 'Main Awards', 'main-awards', 'Die groessten Allround-Auszeichnungen der aktuellen Season.', 'Astra'),
(2, 'Discovery', 'discovery', 'Neue Stimmen, Debuets und Creator, die in dieser Season besonders sichtbar geworden sind.', 'Nova'),
(3, 'Creative', 'creative', 'Model, Design, Rigging, Art und visuelle Praesentation im Stream.', 'Velvet'),
(4, 'Performance', 'performance', 'Gesang, Musik, Buehnenpraesenz und besondere Live-Momente.', 'Melo'),
@@ -76,7 +76,7 @@ public partial class SeedCurrentSeasonDemoVotingData : Migration
award_groups.group_name,
tiers.tier_name,
award_groups.group_slug || '-' || tiers.tier_slug,
award_groups.description || ' Demo-Tier: ' || tiers.tier_name || '.',
award_groups.description,
(award_groups.ord * 100) + (tiers.ord * 10),
3,
tiers.min_viewers,
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,48 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Backend.Migrations
{
/// <inheritdoc />
public partial class SanitizeDemoCategoryDescriptions : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.Sql(
"""
UPDATE "Categories"
SET "Description" = trim(
regexp_replace(
replace("Description", 'aktuellen Demo-Season', 'aktuellen Season'),
'\s*Demo-Tier:\s*[^.]+\.',
'',
'g'
)
)
WHERE "Description" LIKE '%Demo-Tier:%'
OR "Description" LIKE '%aktuellen Demo-Season%';
"""
);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.Sql(
"""
UPDATE "Categories"
SET "Description" = "Description" || ' Demo-Tier: ' || "Name" || '.'
WHERE "ViewerRangeMin" IS NOT NULL
AND "Description" NOT LIKE '%Demo-Tier:%';
UPDATE "Categories"
SET "Description" = replace("Description", 'aktuellen Season', 'aktuellen Demo-Season')
WHERE "Slug" LIKE 'main-awards-%'
AND "Description" LIKE '%aktuellen Season%';
"""
);
}
}
}