Migration fails: `gen_random_uuid()` not found on PostgreSQL 11 (pgcrypto extension required)

Describe the bug

Following the docs/Helm defaults leads to PostgreSQL 11, which is EOL and causes migrations to fail. Recent migrations (warehouse v32) call gen_random_uuid(), which is only built-in from PostgreSQL 13; on older versions it requires the pgcrypto extension. On PG 11 without pgcrypto, migrations fail.

Steps to reproduce the bug

  1. Deploy with rudderstack-helm defaults (PostgreSQL 11).
  2. Start rudder-server and run migrations.

Will get Error:

ERROR: function gen_random_uuid() does not exist

Expected behavior

Migrations complete out of the box.

Proposal

Raise minimum supported Postgres to 13+ and update defaults docs.

Alternatively, ensure pgcrypto is enabled on < 13.

Workarounds

Enable pgcrypto:

CREATE EXTENSION IF NOT EXISTS pgcrypto;

Or use PostgreSQL ≥ 13.