Files
haproxy-openmanager/backend
taylanbakircioglu f5b705b3d1 fix(snapshot): Remove all datetime fields from rollback UPDATE queries
ISSUE: All datetime fields cause 'expected datetime, got str' error in rollback

ROOT CAUSE:
- Snapshot serializes datetime to str() for JSON compatibility
- Rollback tries to UPDATE with str() value
- PostgreSQL rejects str for datetime columns

DATETIME FIELDS AFFECTED:
- created_at: Don't restore (immutable, auto-set on CREATE)
- updated_at: Use CURRENT_TIMESTAMP (reflects rollback time)
- expiry_date (SSL): Skip restore (business field, but str causes error)
- haproxy_status_updated_at: Use CURRENT_TIMESTAMP

SOLUTION:
All entities now use CURRENT_TIMESTAMP for datetime fields:
- Frontend: updated_at = CURRENT_TIMESTAMP (removed )
- Backend: updated_at = CURRENT_TIMESTAMP (removed )
- WAF: updated_at = CURRENT_TIMESTAMP (removed )
- SSL: updated_at = CURRENT_TIMESTAMP, expiry_date REMOVED (removed , )
- Server: updated_at = CURRENT_TIMESTAMP, haproxy_status_updated_at REMOVED (removed , )

BENEFIT:
- No str->datetime conversion errors
- Rollback will succeed
- Timestamp reflects actual rollback time (audit trail)
- Business fields (bind_port, ssl_enabled, etc.) still restored correctly
2025-11-14 01:06:38 +03:00
..
2025-10-27 12:14:03 +03:00
2025-10-27 12:14:03 +03:00
2025-10-27 12:14:03 +03:00
2025-10-27 12:14:03 +03:00
2025-10-27 12:14:03 +03:00
2025-10-27 12:14:03 +03:00
2025-10-27 12:14:03 +03:00
2025-10-27 12:14:03 +03:00
2025-10-27 12:14:03 +03:00