Pflichtlektüre für Neuigkeiten (0.59.0)
Some checks failed
CI / PHP 8.3 / mariadb:10.6 (pull_request) Failing after 8m42s
CI / PHP 8.4 / mariadb:10.6 (pull_request) Failing after 7m39s
CI / PHP 8.4 / mariadb:11.4 (pull_request) Failing after 12m30s
CI / PHP 8.3 / mariadb:11.4 (pull_request) Failing after 17m0s
CI / PHP 8.4 / mysql:8.0 (pull_request) Failing after 13m43s
CI / PHP 8.3 / mysql:8.0 (pull_request) Failing after 24m25s
CI / PHP 8.3 / mysql:8.4 (pull_request) Failing after 11m16s
CI / Bekannte Sicherheitslücken in Paketen (pull_request) Successful in 3m39s
CI / Build-Artefakte aktuell (pull_request) Successful in 1m17s
CI / PHP 8.4 / mysql:8.4 (pull_request) Failing after 10m40s

Beiträge mit Lesebestätigung (namentlich), Frist, Aufgabe und Feed-Hinweis;
Auswertung für die Redaktion (bestätigt von / wer fehlt).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Friederich Loheide 2026-10-01 15:16:16 +00:00
parent 799a075cd2
commit 443599b739
149 changed files with 716 additions and 376 deletions

View file

@ -0,0 +1,40 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
/**
* Pflichtlektüre: Beiträge mit Lesebestätigung („Gelesen und verstanden“), namentlich festgehalten.
*/
return new class extends Migration
{
public function up(): void
{
if (! Schema::hasColumn('news_posts', 'must_read')) {
Schema::table('news_posts', function (Blueprint $table) {
$table->boolean('must_read')->default(false)->after('comments_enabled');
$table->date('must_read_until')->nullable()->after('must_read');
});
}
if (! Schema::hasTable('news_acknowledgements')) {
Schema::create('news_acknowledgements', function (Blueprint $table) {
$table->id();
$table->foreignId('post_id')->constrained('news_posts')->cascadeOnDelete();
$table->foreignId('user_id')->constrained()->cascadeOnDelete();
$table->timestamp('acknowledged_at');
$table->unique(['post_id', 'user_id']);
});
}
}
public function down(): void
{
Schema::dropIfExists('news_acknowledgements');
if (Schema::hasColumn('news_posts', 'must_read')) {
Schema::table('news_posts', fn (Blueprint $table) => $table->dropColumn(['must_read', 'must_read_until']));
}
}
};