diff --git a/RELEASE_NOTES_v2.1.1.md b/RELEASE_NOTES_v2.1.1.md new file mode 100644 index 0000000..da00fc4 --- /dev/null +++ b/RELEASE_NOTES_v2.1.1.md @@ -0,0 +1,26 @@ +# BMC Hub v2.1.1 - Bug Fix Release + +**Release Date:** 29. januar 2026 + +## 🐛 Bug Fixes + +### Migrationer Interface +- **Fixed container runtime detection**: Production servers using Podman now show correct commands instead of Docker commands +- **Updated migration command display**: Frontend now correctly shows `podman exec` commands for production environments +- **Improved user experience**: Added container runtime information in the standard setup section + +## 🔧 Technical Changes + +- Updated `app/settings/frontend/migrations.html` to detect production environment and use appropriate container runtime +- Modified `app/settings/backend/views.py` to pass production environment flag to template +- Container runtime detection based on hostname (production vs localhost/127.0.0.1) + +## 📋 Deployment Notes + +This is a frontend-only change that fixes the migration interface display. No database changes required. + +## ✅ Verification + +- Migration page now shows correct Podman commands on production servers +- Local development still uses Docker commands +- Migration execution via web interface continues to work as before \ No newline at end of file diff --git a/VERSION b/VERSION index 50aea0e..3e3c2f1 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.1.0 \ No newline at end of file +2.1.1 diff --git a/app/opportunities/backend/router.py b/app/opportunities/backend/router.py index e1f24e4..52fb651 100644 --- a/app/opportunities/backend/router.py +++ b/app/opportunities/backend/router.py @@ -501,7 +501,7 @@ def _get_opportunity(opportunity_id: int): # Fetch linked contacts contacts_query = """ - SELECT c.id, c.first_name, c.last_name, c.email, c.phone, c.mobile_phone, poc.role + SELECT c.id, c.first_name, c.last_name, c.email, c.phone, c.mobile, poc.role FROM contacts c JOIN pipeline_opportunity_contacts poc ON c.id = poc.contact_id WHERE poc.opportunity_id = %s diff --git a/app/settings/backend/views.py b/app/settings/backend/views.py index 0d3e31b..45bc137 100644 --- a/app/settings/backend/views.py +++ b/app/settings/backend/views.py @@ -46,7 +46,8 @@ async def migrations_page(request: Request): "migrations": migrations, "db_user": settings.POSTGRES_USER, "db_name": settings.POSTGRES_DB, - "db_container": "bmc-hub-postgres" + "db_container": "bmc-hub-postgres", + "is_production": request.url.hostname not in ['localhost', '127.0.0.1', '0.0.0.0'] }) diff --git a/app/settings/frontend/migrations.html b/app/settings/frontend/migrations.html index 28b8d25..d6b0356 100644 --- a/app/settings/frontend/migrations.html +++ b/app/settings/frontend/migrations.html @@ -118,7 +118,8 @@ @@ -130,11 +131,14 @@ let currentAltCommand = ""; function buildCommand(migrationName) { - const dockerCmd = `docker exec -i {{ db_container }} psql -U {{ db_user }} -d {{ db_name }} < migrations/${migrationName}`; + // Use podman for production, docker for local development + const runtime = {{ 'true' if is_production else 'false' }} ? 'podman' : 'docker'; + + const containerCmd = `${runtime} exec -i {{ db_container }} psql -U {{ db_user }} -d {{ db_name }} < migrations/${migrationName}`; const localCmd = `psql \"$DATABASE_URL\" -f migrations/${migrationName}`; - currentCommand = dockerCmd; - currentAltCommand = `${dockerCmd}\n${localCmd}`; - document.getElementById('commandBox').textContent = dockerCmd; + currentCommand = containerCmd; + currentAltCommand = `${containerCmd}\n${localCmd}`; + document.getElementById('commandBox').textContent = containerCmd; document.getElementById('copyCommandBtn').disabled = false; document.getElementById('copyAltBtn').disabled = false; }