Eine Fassung bleibt nummeriert und kann deaktiviert werden. Beschreibung und fachliche Säulen gehören zum Medium und legen keine neue Fassung an. Co-authored-by: Cursor <cursoragent@cursor.com>
30 lines
867 B
PHP
30 lines
867 B
PHP
<?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('pillars', function (Blueprint $table) {
|
|
$table->id();
|
|
$table->string('name')->unique();
|
|
$table->timestamps();
|
|
});
|
|
|
|
Schema::create('content_element_pillar', function (Blueprint $table) {
|
|
$table->foreignId('content_element_id')->constrained()->cascadeOnDelete();
|
|
$table->foreignId('pillar_id')->constrained()->restrictOnDelete();
|
|
$table->primary(['content_element_id', 'pillar_id']);
|
|
});
|
|
}
|
|
|
|
public function down(): void
|
|
{
|
|
Schema::dropIfExists('content_element_pillar');
|
|
Schema::dropIfExists('pillars');
|
|
}
|
|
};
|