Zeige Nutzbarkeit, Didaktik und oeffentliche Programmfassung
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
5e763d15ec
commit
c99a957e6f
17 files changed
+307
-6
No files matched your search
@@ -0,0 +1,42 @@
|
||||
<?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
|
||||
{
|
||||
foreach (['content_elements', 'compositions'] as $tableName) {
|
||||
Schema::table($tableName, function (Blueprint $table) {
|
||||
$table->string('thumbnail_path')->nullable();
|
||||
$table->string('thumbnail_alt')->nullable();
|
||||
$table->string('thumbnail_error')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
Schema::table('compositions', function (Blueprint $table) {
|
||||
$table->string('public_slug')->nullable()->unique();
|
||||
});
|
||||
|
||||
Schema::table('composition_versions', function (Blueprint $table) {
|
||||
$table->text('learning_goal')->nullable();
|
||||
$table->unsignedSmallInteger('duration_minutes')->nullable();
|
||||
$table->text('material_note')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('composition_versions', function (Blueprint $table) {
|
||||
$table->dropColumn(['learning_goal', 'duration_minutes', 'material_note']);
|
||||
});
|
||||
Schema::table('compositions', function (Blueprint $table) {
|
||||
$table->dropColumn(['thumbnail_path', 'thumbnail_alt', 'thumbnail_error', 'public_slug']);
|
||||
});
|
||||
Schema::table('content_elements', function (Blueprint $table) {
|
||||
$table->dropColumn(['thumbnail_path', 'thumbnail_alt', 'thumbnail_error']);
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in new issue
Block a user