ImageNode from Polarpress migration + model + helper class, PageRender controller
linter / quality (push) Waiting to run
tests / ci (push) Waiting to run

This commit is contained in:
2025-05-05 15:25:55 +02:00
parent b8acb478b0
commit 60dc53b7ca
4 changed files with 192 additions and 0 deletions
@@ -0,0 +1,33 @@
<?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('image_nodes', function (Blueprint $table) {
$table->id();
$table->foreignId('user_id');
$table->unsignedBigInteger('parent_id')->nullable();
$table->foreign('parent_id')->references('id')->on('image_nodes')->onDelete('cascade');
$table->string('name');
$table->enum('fs_type', ['folder', 'file']);
$table->json('fs_meta')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('image_nodes');
}
};