pavankumarreddy
Fri Jul 19 2024
Resolving gen_random_uuid()
Error with PostgreSQL While Implementing CI
When configuring CI with GitHub Actions, I encountered the following error:
PG::UndefinedFunction: ERROR: function gen_random_uuid() does not exist
This error occurred because the gen_random_uuid()
function is not available in PostgreSQL versions older than 11. UUID generation functions were only available through external modules like uuid-ossp
and pgcrypto
in these older versions.
To resolve this issue, I upgraded to PostgreSQL 13, which includes the gen_random_uuid()
function to generate version-4 UUIDs. After upgrading, the error was resolved.
#rails #postgresql #uuid #ci-cd #github-actions