Skip to content

infra: create EnablePostGIS database migration file #32

Description

@snowrugar-beep

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

  1. Migration runs without error
  2. PostGIS extension is available after migration
  3. CreateGistsTable migration runs successfully after EnablePostGIS
  4. 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

  • Migration created
  • Migration runs successfully

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions