Files
radicall/database/migrations/0001_01_01_000003_create_media_table.php
T

34 lines
792 B
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('media', function (Blueprint $table) {
$table->id();
$table->string('filename', 512);
$table->string('disk')->default('public');
$table->text('path');
$table->text('url')->nullable();
$table->bigInteger('size');
$table->string('mime_type', 255);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('media');
}
};