18b61bed52
- Widen AdminCandidateEditorModal to size lg for better readability - Rename "Clip-Compilation" section to "Clip / Compilation", update copy to reflect single clips too, drop upload hint and Clip-Plattform field, rename label to "Link" - Fix NativeSelect dropdown clipping inside overflow-y-auto modals by teleporting the menu to body with fixed positioning, flip-up logic, and dynamic maxHeight capped to viewport - Add ClipAdminMenuVisible setting (backend domain, contracts, endpoint, migration) with matching frontend types, defaults, form wiring, and toggle in the Clip-Workflow modal — hides the Clips nav item from the admin sidebar when disabled Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
56 lines
1.9 KiB
C#
56 lines
1.9 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace Backend.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class AddOptionalClipFeatureSettings : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.Sql("""
|
|
ALTER TABLE "SiteSettings"
|
|
ADD COLUMN IF NOT EXISTS "ClipReviewEnabled" boolean NOT NULL DEFAULT true;
|
|
""");
|
|
|
|
migrationBuilder.Sql("""
|
|
ALTER TABLE "SiteSettings"
|
|
ADD COLUMN IF NOT EXISTS "ClipSubmissionDisabledMessage" character varying(240) NOT NULL DEFAULT 'Clip-Einreichungen sind aktuell geschlossen.';
|
|
""");
|
|
|
|
migrationBuilder.Sql("""
|
|
ALTER TABLE "SiteSettings"
|
|
ADD COLUMN IF NOT EXISTS "ClipSubmissionsEnabled" boolean NOT NULL DEFAULT false;
|
|
""");
|
|
|
|
migrationBuilder.UpdateData(
|
|
table: "SiteSettings",
|
|
keyColumn: "Id",
|
|
keyValue: 1,
|
|
columns: new[] { "ClipReviewEnabled", "ClipSubmissionDisabledMessage" },
|
|
values: new object[] { true, "Clip-Einreichungen sind aktuell geschlossen." });
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.Sql("""
|
|
ALTER TABLE "SiteSettings"
|
|
DROP COLUMN IF EXISTS "ClipReviewEnabled";
|
|
""");
|
|
|
|
migrationBuilder.Sql("""
|
|
ALTER TABLE "SiteSettings"
|
|
DROP COLUMN IF EXISTS "ClipSubmissionDisabledMessage";
|
|
""");
|
|
|
|
migrationBuilder.Sql("""
|
|
ALTER TABLE "SiteSettings"
|
|
DROP COLUMN IF EXISTS "ClipSubmissionsEnabled";
|
|
""");
|
|
}
|
|
}
|
|
}
|