diff --git a/bin/framework-pull-upstream.sh b/bin/framework-pull-upstream.sh index 0147ef455..6e15bb94b 100755 --- a/bin/framework-pull-upstream.sh +++ b/bin/framework-pull-upstream.sh @@ -501,8 +501,20 @@ else echo " ✓ Manifest rebuilt" echo "" - # Step 3: Compile bundles - echo "Step 3/4: Compiling all bundles..." + # Step 3: Run framework migrations (before bundle compile) + echo "Step 3/4: Running framework migrations..." + if ! php artisan migrate --framework-only --force; then + echo "ERROR: Framework migrations failed" + echo " Check errors above and fix migration issues" + echo "" + echo " Bundle compilation skipped due to migration failure" + exit 1 + fi + echo " ✓ Framework migrations completed" + echo "" + + # Step 4: Compile bundles (only if migrations succeeded) + echo "Step 4/4: Compiling all bundles..." if ! php artisan rsx:bundle:compile; then echo "ERROR: Bundle compilation failed" echo " Check errors above and fix bundle issues" @@ -510,16 +522,6 @@ else fi echo " ✓ All bundles compiled" echo "" - - # Step 4: Run framework migrations - echo "Step 4/4: Running framework migrations..." - if ! php artisan migrate --framework-only --force; then - echo "ERROR: Framework migrations failed" - echo " Check errors above and fix migration issues" - exit 1 - fi - echo " ✓ Framework migrations completed" - echo "" fi # Set read-only attribute on CLAUDE.dist.md after successful update