d2d.emegrendeles.hu/database/migrations/2021_10_15_180023_create_attachments_table.php

38 lines
971 B
PHP

<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Migrations\Migration;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('attachments', function (Blueprint $table) {
$table->bigIncrements('id');
$table->integer('attachable_id')->nullable();
$table->string('attachable_type')->nullable();
$table->string('path')->nullable();
$table->string('filename')->nullable();
$table->string('mimetype')->nullable();
$table->integer('size')->nullable();
$table->string('original_filename')->nullable();
$table->timestamps();
$table->userIdFields();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('attachments');
}
};