Adapted workflow-sync and automation schema DDL to the active driver,
including PostgreSQL timestamp and boolean forms.
Rebound workflow-sync and automation reads, writes, transactions, dynamic
run projections, and retention queries at the executing database boundary.
Replaced the automation repository backfill's SQLite-only conflict syntax
with a portable ON CONFLICT ... DO NOTHING clause.
Preserved task-state joins and isolated-test fallbacks while using
integer predicates for the shared task_sessions.is_primary column.
Added PostgreSQL fresh/replay coverage for workflow settings, automation
repositories, triggers, runs, run summaries, retention checks, and cleanup
jobs.
Verification: KANDEV_TEST_POSTGRES_DSN=<local test DSN> go test -race ./internal/workflowsync ./internal/automation -run 'TestPostgresStore' -v passed.
Verification: KANDEV_TEST_POSTGRES_DSN=<local test DSN> go test -race ./internal/workflowsync ./internal/automation passed.