NYCPlanning / ae-zoning-api

This application is API for serving data related to zoning and tax lots.
1 stars 0 forks source link

Missing Spatial Indexes and errant capital planning database elements #283

Closed TangoYankee closed 2 weeks ago

TangoYankee commented 1 month ago

Description

There are a few typos and missing features for the capital planning database. We should clean these up as part of the same migration.

Acceptance criteria

Context

Enum

Postgres does not allow the modification or removal of items from an enum. Instead, we need to do a wholesale replacement of the enum.

Indexing

PostGIS Spatial Indexing is done "using GIST". Drizzle ORM support writing indexes with the "using" keyword. However, drizzle-kit (which generates the migration files) does not. We'll still use drizzle-kit to generate the migration. However, we'll then hand-edit the migration file to use "GIST"

Related work

Blocked by writing the ETL. It's pointing out more errors as data are added. We should get the ETL finished to help identify more errors that we can include in this migration.

TangoYankee commented 1 month ago

This was originally conceived as a big ticket item where we consolidate the errors into a single migration. This was misguided. We should be making these adjustments in small migrations. Going forward, I'm also going to try adding these changes into the endpoint implementation into the tickets that will need them.