bmc_hub/RELEASE_NOTES_v1.3.84.md

92 lines
2.4 KiB
Markdown

# Release Notes - v1.3.84
**Release Date:** 2. januar 2026
## 🔧 Database Migration
### Timetracking Approval Columns
- **Added migration** for missing approval columns in `tmodule_times` table
- **Required for production** - local development already has these columns
### Columns Added (if missing):
- `approved_hours` DECIMAL(10,2) - Godkendte timer
- `rounded_to` DECIMAL(10,2) - Afrundingsinterval brugt
- `approval_note` TEXT - Godkendelsesnote
- `billable` BOOLEAN DEFAULT TRUE - Skal faktureres
- `is_travel` BOOLEAN DEFAULT FALSE - Indeholder kørsel
- `approved_at` TIMESTAMP - Tidspunkt for godkendelse
- `approved_by` INTEGER - Bruger der godkendte
### Indexes Added:
- `idx_tmodule_times_status` - For hurtigere status queries
- `idx_tmodule_times_approved_at` - For hurtigere approval queries
## 📝 Files Changed
- `migrations/053_timetracking_approval_columns.sql` - New migration file
## 🚀 Deployment Instructions
### CRITICAL - Run Migration First!
**På produktionsserveren:**
1. **SSH til serveren:**
```bash
ssh bmcadmin@172.16.31.183
```
2. **Naviger til projekt:**
```bash
cd /opt/bmc_hub
git fetch --tags
git checkout v1.3.84
```
3. **Kør migration (VIGTIGT!):**
```bash
# Med podman:
podman exec bmc-hub-postgres psql -U bmcnetworks -d bmc_hub -f /app/migrations/053_timetracking_approval_columns.sql
```
**ELLER kopier filen først hvis mounted wrong:**
```bash
podman cp migrations/053_timetracking_approval_columns.sql bmc-hub-postgres:/tmp/
podman exec bmc-hub-postgres psql -U bmcnetworks -d bmc_hub -f /tmp/053_timetracking_approval_columns.sql
```
4. **Genstart API:**
```bash
podman restart bmc-hub-api
```
5. **Verificer:**
```bash
# Test godkendelse i wizard
# Tjek logs for fejl
podman logs -f bmc-hub-api | grep -E "(Error|✅|❌)"
```
## ⚠️ Breaking Changes
None - backwards compatible migration
## 📊 Impact
- Fixes approval failures on production
- Safe to run - checks if columns exist before adding
- No data loss risk
## 🔍 Why This Was Needed
Production database was missing approval columns that exist in development:
- Local dev had columns from previous migrations
- Production was created before these columns were added
- This migration ensures both environments have same schema
---
**Git Tag:** v1.3.84
**Previous Version:** v1.3.83
**Migration:** 053_timetracking_approval_columns.sql