+++fix: add thumbnail support for territori

This commit is contained in:
2026-04-08 09:32:07 +00:00
parent aac13522e5
commit 777f239c7a
43 changed files with 1957 additions and 12 deletions

View File

@@ -0,0 +1,28 @@
<?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::table('territori', function (Blueprint $table) {
$table->string('thumbnail_path')->nullable()->after('pdf_path');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('territori', function (Blueprint $table) {
$table->dropColumn('thumbnail_path');
});
}
};

View File

@@ -0,0 +1,32 @@
<?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
{
if (!Schema::hasColumn('territori', 'thumbnail_path')) {
Schema::table('territori', function (Blueprint $table) {
$table->string('thumbnail_path')->nullable()->after('pdf_path');
});
}
}
/**
* Reverse the migrations.
*/
public function down(): void
{
if (Schema::hasColumn('territori', 'thumbnail_path')) {
Schema::table('territori', function (Blueprint $table) {
$table->dropColumn('thumbnail_path');
});
}
}
};

View File

@@ -0,0 +1,32 @@
<?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
{
if (!Schema::hasColumn('territori', 'thumbnail_path')) {
Schema::table('territori', function (Blueprint $table) {
$table->string('thumbnail_path')->nullable()->after('pdf_path');
});
}
}
/**
* Reverse the migrations.
*/
public function down(): void
{
if (Schema::hasColumn('territori', 'thumbnail_path')) {
Schema::table('territori', function (Blueprint $table) {
$table->dropColumn('thumbnail_path');
});
}
}
};