25 lines
793 B
PHP
25 lines
793 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::table('attachments', function (Blueprint $table) {
|
|
$table->string('thumbnail_path')->nullable()->after('path');
|
|
$table->string('thumbnail_mime_type', 150)->nullable()->after('thumbnail_path');
|
|
$table->unsignedBigInteger('thumbnail_size_bytes')->nullable()->after('thumbnail_mime_type');
|
|
});
|
|
}
|
|
|
|
public function down(): void
|
|
{
|
|
Schema::table('attachments', function (Blueprint $table) {
|
|
$table->dropColumn(['thumbnail_path', 'thumbnail_mime_type', 'thumbnail_size_bytes']);
|
|
});
|
|
}
|
|
};
|