feat: harden tenant settings and import pipeline

This commit is contained in:
2025-09-25 11:50:18 +02:00
parent b22d91ed32
commit 9248d7a3f5
29 changed files with 577 additions and 293 deletions

View File

@@ -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
{
Schema::table('tasks', function (Blueprint $table) {
if (! Schema::hasColumn('tasks', 'deleted_at')) {
$table->softDeletes();
}
});
}
public function down(): void
{
Schema::table('tasks', function (Blueprint $table) {
if (Schema::hasColumn('tasks', 'deleted_at')) {
$table->dropSoftDeletes();
}
});
}
};

View File

@@ -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::table('tenants', function (Blueprint $table) {
$table->string('custom_domain')->nullable()->after('domain');
});
Schema::table('tenants', function (Blueprint $table) {
$table->unique('custom_domain');
});
}
public function down(): void
{
Schema::table('tenants', function (Blueprint $table) {
$table->dropUnique('tenants_custom_domain_unique');
$table->dropColumn('custom_domain');
});
}
};