You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With drizzle orm and drizzle kit supporting check constraints, we can use them instead of enums. As we move off them in the zoning api, we can remove them from the data flow. Because constraints are tracked in pg_dumps, we will not need to explicitly add data flow code to take advantage of them; the pg_dump will automatically grab them when the api database is updated.
Note: we could choose place these checks on the source tables. This would add the data quality check to an earlier step in the data flow. However, the check is already automatically added to the step where we move data from the source to the target tables within the data flow database. This step happens only a few moments after loading the data into the source tables and would result in the same errors. TL;DR: the benefit of adding the check to an earlier step is not worth the additional maintenance burden.
Description
With drizzle orm and drizzle kit supporting check constraints, we can use them instead of enums. As we move off them in the zoning api, we can remove them from the data flow. Because constraints are tracked in pg_dumps, we will not need to explicitly add data flow code to take advantage of them; the pg_dump will automatically grab them when the api database is updated.
Note: we could choose place these checks on the source tables. This would add the data quality check to an earlier step in the data flow. However, the check is already automatically added to the step where we move data from the source to the target tables within the data flow database. This step happens only a few moments after loading the data into the source tables and would result in the same errors. TL;DR: the benefit of adding the check to an earlier step is not worth the additional maintenance burden.
Acceptance criteria
Related
NYCPlanning/ae-zoning-api#384 (child tickets of this issue will depend on the child tickets of this api ticket)
The text was updated successfully, but these errors were encountered: