Problem Statement
The database migration EnablePostGIS.ts is referenced in the project structure but the file does not exist. The PostGIS extension must be enabled before spatial operations (ST_MakePoint, ST_DWithin, ST_X, ST_Y) will work. The CreateGistsTable migration depends on PostGIS being available.
Evidence
Backend/src/database/migrations/EnablePostGIS.ts — FILE_DOES_NOT_EXIST
Backend/src/database/migrations/CreateGistsTable.ts — Uses PostGIS functions (ST_MakePoint, geography type, etc.)
Impact
Migration sequence will fail if PostGIS is not already enabled. Spatial features non-functional.
Proposed Solution
Create EnablePostGIS migration:
CREATE EXTENSION IF NOT EXISTS "postgis";
CREATE EXTENSION IF NOT EXISTS "postgis_topology";
Technical Requirements
Must run BEFORE CreateGistsTable migration.
Acceptance Criteria
- Migration runs without error
- PostGIS extension is available after migration
- CreateGistsTable migration runs successfully after EnablePostGIS
- npm run migration:run succeeds
File Inventory
Backend/src/database/migrations/EnablePostGIS.ts (new)
Dependencies
None.
Testing Strategy
- Run migrations on fresh database, verify PostGIS is enabled
Security Considerations
None.
Definition of Done
Problem Statement
The database migration
EnablePostGIS.tsis referenced in the project structure but the file does not exist. The PostGIS extension must be enabled before spatial operations (ST_MakePoint, ST_DWithin, ST_X, ST_Y) will work. The CreateGistsTable migration depends on PostGIS being available.Evidence
Backend/src/database/migrations/EnablePostGIS.ts— FILE_DOES_NOT_EXISTBackend/src/database/migrations/CreateGistsTable.ts— Uses PostGIS functions (ST_MakePoint, geography type, etc.)Impact
Migration sequence will fail if PostGIS is not already enabled. Spatial features non-functional.
Proposed Solution
Create EnablePostGIS migration:
Technical Requirements
Must run BEFORE CreateGistsTable migration.
Acceptance Criteria
File Inventory
Backend/src/database/migrations/EnablePostGIS.ts(new)Dependencies
None.
Testing Strategy
Security Considerations
None.
Definition of Done