The git reset was meant to be simple. But buried in that commit history was a set of granular database role changes, fragile and precise, spanning multiple services. They were gone in seconds. The real problem wasn’t code—it was state. And state has its own rules.
Granular database roles control exactly who can do what, down to the smallest permission. In modern applications, roles don’t live in one place; they’re stitched across tenants, services, and environments. When these roles drift from the intended configuration, security gaps open. When they vanish, whole features break.
The trouble starts when roles are versionless. Code has branches. Roles often don’t. You can’t just checkout a working state if you don’t store it. Many teams try manual migration scripts or keep them in comments. That fails under pressure. Git gives you change history for code. Most teams don’t have the same for database roles.