move into sonardesk

This commit is contained in:
Mark Gregory
2026-10-12 14:50:13 +01:00
parent 5f0d2ceb72
commit 38b4a7406f
879 changed files with 24021 additions and 1 deletions
@@ -0,0 +1,27 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::create('testimonials', function (Blueprint $table): void {
$table->id();
$table->string('name');
$table->string('company')->nullable();
$table->unsignedInteger('rating')->default(5);
$table->boolean('enabled')->default(true);
$table->timestamps();
$table->softDeletes();
});
}
public function down(): void
{
Schema::dropIfExists('testimonials');
}
};
@@ -0,0 +1,26 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
if (Schema::hasTable('testimonials') && ! Schema::hasColumn('testimonials', 'content')) {
Schema::table('testimonials', function (Blueprint $table): void {
$table->text('content')->nullable()->after('company');
});
}
}
public function down(): void
{
if (Schema::hasTable('testimonials') && Schema::hasColumn('testimonials', 'content')) {
Schema::table('testimonials', function (Blueprint $table): void {
$table->dropColumn('content');
});
}
}
};