Comment by Ozzie_osman
Comment by Ozzie_osman 3 days ago
Or write the query as a function in code, that way, everyone can know it exists, call it easily, and change it along with any other changes to your logic or schema.
Comment by Ozzie_osman 3 days ago
Or write the query as a function in code, that way, everyone can know it exists, call it easily, and change it along with any other changes to your logic or schema.
Are there good tools that can dump a database schema to files that are human- and AI-readable?
We use migrations as the source of truth for the prod database schema, but they’re also a pain when you want to just see the latest version of a table or a stored procedure.
So now you have to launch a special debug instance of your app that doesn't accept prod traffic, but can still connect to the prod DB, so you can shell into it and call the function?
You can and should store SQL queries in VCS. Everyone can still know that they're there.