| 1234567891011121314151617181920212223242526 |
- <?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('attachments', function (Blueprint $table) {
- $table->id();
- $table->morphs('attachable');
- $table->string('filename');
- $table->string('filepath');
- $table->string('mime_type', 100);
- $table->unsignedBigInteger('size');
- $table->timestamps();
- });
- }
- public function down(): void
- {
- Schema::dropIfExists('attachments');
- }
- };
|