|
|
|
|
|
by zlumer
1483 days ago
|
|
We're doing something similar using Prisma.
We have a script that queries Postgres database periodically and generates a Prisma schema for the tables/columns.
Then the script diffs previous schema with a newer one and if any changes are detected, it creates an SQL migration and commits it to the git repo.
That way we have a history of all changes in a very readable way, and an always up-to-date Prisma schema and TypeScript typings for the DB client. |
|