mirror of
https://github.com/taylanbakircioglu/haproxy-openmanager.git
synced 2026-09-19 17:15:12 +00:00
f5b705b3d1
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