You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
xshop/database/migrations/2024_05_07_133653_create_at...

38 lines
1.0 KiB
PHTML

5 months ago
<?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('attachments', function (Blueprint $table) {
$table->id();
$table->text('title');
$table->string('slug')->unique();
$table->text('subtitle');
5 months ago
$table->text('body');
$table->string('file',2048)->nullable();
$table->string('ext')->nullable();
$table->unsignedBigInteger('downloads')->default(0)->comment('downloads count');
$table->boolean('is_fillable')->default(true);
5 months ago
$table->unsignedBigInteger('size')->default(0);
$table->nullableMorphs('attachable');
5 months ago
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('attachments');
}
};