@echo off REM Apply database migration 005 - Add password reset fields echo Getting database pod name... for /f "delims=" %%i in ('kubectl get pod -n my-apps -l app.kubernetes.io/component=db -o jsonpath^="{.items[0].metadata.name}"') do set DB_POD=%%i if "%DB_POD%"=="" ( echo ❌ Database pod not found exit /b 1 ) echo 📦 Database pod: %DB_POD% echo 📝 Applying migration 005_add_password_reset_fields.sql... echo. REM Copy migration file to pod kubectl cp backend/migrations/005_add_password_reset_fields.sql my-apps/%DB_POD%:/tmp/migration.sql REM Execute migration kubectl exec -n my-apps %DB_POD% -- psql -U brand_master_user -d brand_master_db -f /tmp/migration.sql echo. echo ✅ Migration applied successfully! echo. echo 🔄 Restarting backend pod to pick up changes... kubectl delete pod -n my-apps -l app.kubernetes.io/component=backend echo. echo ✅ Done! Backend will restart with updated schema.