-- ============================================================
-- EIGIS Geospatial Data Collection System
-- PostGIS Database Schema - Extension Setup
-- Author: International Winning PostGIS Database Engineer
-- ============================================================

-- Enable required extensions
CREATE EXTENSION IF NOT EXISTS postgis;
CREATE EXTENSION IF NOT EXISTS postgis_topology;
CREATE EXTENSION IF NOT EXISTS postgis_raster;
CREATE EXTENSION IF NOT EXISTS uuid-ossp;
CREATE EXTENSION IF NOT EXISTS pg_trgm;      -- Fast text similarity search
CREATE EXTENSION IF NOT EXISTS btree_gist;    -- Composite GiST indexes
CREATE EXTENSION IF NOT EXISTS hstore;        -- Flexible key-value metadata

-- Verify PostGIS version
SELECT PostGIS_Full_Version();
