Error Migration on PostgreSQL
Prisma migration failed on PostgreSQL, the error message on the command line:
🚫
ERROR: function uuid_generate_v4()
does not exist
Solution
Enable the uuid-ossp module in PostgreSQL. One way to do this is by enabling manually via administration tool, such as pgAdmin (opens in a new tab).
To enable the uuid-ossp on PostgreSQL, run this SQL script:
CREATE EXTENSION IF NOT EXISTS "uuid-ossp"
After that go back to the generated application root project and re-run the migration again:
npx prisma generate
and deploy again to the PostgreSQL database:
npx prisma migrate deploy