diff --git a/database/migrations/2025_12_18_101617_preserve_size_variants_for_orders.php b/database/migrations/2025_12_18_101617_preserve_size_variants_for_orders.php index 96604132c03..238d6be70a2 100644 --- a/database/migrations/2025_12_18_101617_preserve_size_variants_for_orders.php +++ b/database/migrations/2025_12_18_101617_preserve_size_variants_for_orders.php @@ -28,9 +28,13 @@ public function up(): void { // Step 1: Drop the existing foreign key constraint on size_variants.photo_id - Schema::table('size_variants', function (Blueprint $table) { - $table->dropForeign(['photo_id']); - }); + try { + Schema::table('size_variants', function (Blueprint $table) { + $table->dropForeign(['photo_id']); + }); + } catch (\Exception $e) { + // If the foreign key does not exist, we can safely ignore the error + } // Step 2: Make photo_id nullable in size_variants Schema::table('size_variants', function (Blueprint $table) { diff --git a/docker/scripts/entrypoint.sh b/docker/scripts/entrypoint.sh index 3dafd5367ae..c4e3466dcc7 100644 --- a/docker/scripts/entrypoint.sh +++ b/docker/scripts/entrypoint.sh @@ -103,7 +103,9 @@ web) echo "🧹 Optimizing application..." php artisan config:clear php artisan config:cache + php artisan route:clear php artisan route:cache + php artisan view:clear php artisan view:cache echo "✅ Application ready!"