Been first in all my teams since then to loudly voice my opposition when someone suggests it as a quick fix for something more complicated
How Postgres Triggers Can Simplify Your Back End Development
111–112 of 112 posts
Re: How Postgres Triggers Can Simplify Your Back End Development
#112Earlier quoted context omitted.
I don't think migrations (at least as done by Django et al.) solve it - you want a declarative source of truth for what the schema looks like today , not a chain of changes that only tell you that after computing the combined effect. Even if they just created a generated file of the final schema, that sat in version control and errored the makemigrations check (just like a missing migration) if it was out of sync, th…
One of my pet projects addresses these points you raise about Django + migrations, have a look: https://pypi.org/project/DBSamizdat In a nutshell it allows you to keep DB functions, triggers and views around as Python classes, so you can version them together with the rest of your application code. The DB state gets updated for you (in the right dependency order) whenever you change them. It can also run without Djan…