37 lines
918 B
PHP
37 lines
918 B
PHP
<?php
|
|
|
|
use App\Database\Blueprint;
|
|
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');
|
|
}
|
|
};
|