How to deal with : Function uuid_generate_v4() does not exist on PostgreSQL

When you create the table on PostgreSQL and want to use UUID Generator V4 on uuid field but turns out that you got this error.

Function uuid_generate_v4() does not exist

SOLUTION:

The extension is not installed in the particular database you are using, you should connect to this particular database, Then install the extension in this database

CREATE EXTENSION IF NOT EXISTS "uuid-ossp";