Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 2 additions & 0 deletions docker/scripts/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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!"
Expand Down
Loading