Ergaenze Stammdaten, Suche, Dimensionen, Abdeckung und Ausgabenachweis
Deploy Test / test (push) Successful in 17s
Deploy Test / deploy (push) Successful in 25s

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
LarsandCursor committed 2026-11-16 08:24:23 +01:00
1 parent 7b54c38623
commit 5e763d15ec
23 files changed
+661 -5

No files matched your search

@@ -0,0 +1,45 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::table('content_elements', function (Blueprint $table) {
$table->string('display_title')->nullable()->after('working_title');
$table->text('summary')->nullable()->after('description');
});
Schema::table('compositions', function (Blueprint $table) {
$table->string('display_title')->nullable()->after('designation');
$table->text('summary')->nullable()->after('display_title');
});
Schema::create('identity_changes', function (Blueprint $table) {
$table->id();
$table->string('subject_type');
$table->unsignedBigInteger('subject_id');
$table->string('field');
$table->text('before')->nullable();
$table->text('after')->nullable();
$table->foreignId('actor_id')->nullable()->constrained('users')->nullOnDelete();
$table->timestamp('occurred_at');
$table->timestamps();
$table->index(['subject_type', 'subject_id']);
});
}
public function down(): void
{
Schema::dropIfExists('identity_changes');
Schema::table('compositions', function (Blueprint $table) {
$table->dropColumn(['display_title', 'summary']);
});
Schema::table('content_elements', function (Blueprint $table) {
$table->dropColumn(['display_title', 'summary']);
});
}
};
@@ -0,0 +1,75 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::create('editorial_dimensions', function (Blueprint $table) {
$table->id();
$table->string('slug')->unique();
$table->string('label');
$table->timestamps();
});
Schema::create('editorial_dimension_values', function (Blueprint $table) {
$table->id();
$table->foreignId('editorial_dimension_id')->constrained()->cascadeOnDelete();
$table->string('slug');
$table->string('label');
$table->timestamps();
$table->unique(['editorial_dimension_id', 'slug']);
});
Schema::create('identity_dimension_values', function (Blueprint $table) {
$table->id();
$table->string('subject_type');
$table->unsignedBigInteger('subject_id');
$table->foreignId('editorial_dimension_value_id')->constrained()->cascadeOnDelete();
$table->string('origin');
$table->timestamps();
$table->unique(['subject_type', 'subject_id', 'editorial_dimension_value_id'], 'identity_dimension_unique');
});
$now = now();
$dimensionId = DB::table('editorial_dimensions')->insertGetId([
'slug' => 'saeule',
'label' => 'Fachliche Säule',
'created_at' => $now,
'updated_at' => $now,
]);
foreach (DB::table('pillars')->orderBy('id')->get() as $pillar) {
$slug = 'pfeiler-'.$pillar->id;
$valueId = DB::table('editorial_dimension_values')->insertGetId([
'editorial_dimension_id' => $dimensionId,
'slug' => $slug,
'label' => $pillar->name,
'created_at' => $now,
'updated_at' => $now,
]);
foreach (DB::table('content_element_pillar')->where('pillar_id', $pillar->id)->get() as $link) {
DB::table('identity_dimension_values')->insert([
'subject_type' => 'App\\Domain\\Catalog\\ContentElement',
'subject_id' => $link->content_element_id,
'editorial_dimension_value_id' => $valueId,
'origin' => 'direkt',
'created_at' => $now,
'updated_at' => $now,
]);
}
}
}
public function down(): void
{
Schema::dropIfExists('identity_dimension_values');
Schema::dropIfExists('editorial_dimension_values');
Schema::dropIfExists('editorial_dimensions');
}
};
@@ -0,0 +1,28 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::create('media_deliveries', function (Blueprint $table) {
$table->id();
$table->foreignId('grant_id')->constrained()->restrictOnDelete();
$table->foreignId('license_article_id')->constrained()->restrictOnDelete();
$table->foreignId('article_release_id')->constrained()->restrictOnDelete();
$table->foreignId('content_element_version_id')->constrained()->restrictOnDelete();
$table->string('action');
$table->string('format');
$table->timestamp('delivered_at');
$table->timestamps();
});
}
public function down(): void
{
Schema::dropIfExists('media_deliveries');
}
};