DEV Community

Discussion on: Tell us what your top unpopular tech opinion is 😈

Collapse
 
dmfay profile image
Dian Fay

Database triggers are good. There are legitimate concerns about visibility and how they're used, but the most common complaint -- "you're putting business logic in the database!" -- ignores that the database already encapsulates and structures business logic to begin with.

Collapse
 
lauriy profile image
Lauri Elias • Edited

If all the triggers are nicely documented in your migration files and your test suite uses a real DB, why not really?