NYCPlanning / ae-zoning-api

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

expand postgres commands #195

Closed damonmcc closed 6 months ago

damonmcc commented 6 months ago

related to https://github.com/NYCPlanning/ae-data-flow/issues/2

changes

background

Locally deployed databases are useful, but when the API is deployed it won't use a locally deployed database. When trying to run the commands in this repo against the (already deployed) database cluster in DO called zoning-api, it became clear that there are two types of connections: those that require admin privileges and those that do not.

In the issue https://github.com/NYCPlanning/ae-data-flow/issues/2, I described a potential approach to databases and users that was inspired by the one used for PFF (described here). These changes enable that implementation.

screenshots

a development db created by running these commands, structured using pg:migrate, and modified using in-progress commands in the new ae-data-flow repo:

Screenshot 2024-03-18 at 10 11 46 PM
damonmcc commented 6 months ago

per chat today (notes here), will rework this to be useful for a new approach. if no changes here are needed for a new approach, will close this

damonmcc commented 6 months ago

per relevant issue here this PR is no longer needed because AE's data flow process will only touch the API DB at the final stage: replacing rows in tables

we're using development DBs for data flow dev and tabling the idea of development DBs for API dev