CREATE EXTENSION IF NOT EXISTS POSTGIS; CREATE EXTENSION IF NOT EXISTS POSTGIS_TOPOLOGY; code example
Example: postgres create extension if not exists
CREATE EXTENSION [ IF NOT EXISTS ] extension_name
[ WITH ] [ SCHEMA schema_name ]
[ VERSION version ]
[ FROM old_version ]