Could you expand on the declarative schema features? Isn't SQL more or less declarative by default?
https://learn.microsoft.com/en-us/sql/tools/sqlpackage/sqlpa...
The APIs were historically part of Visual Studio, and only split out into dacfx recently.
Someone braver than me could consider automated deployment from github actions etc.
The hard part is that a lot of database schema changes cause data truncation (e.g. reducing the size of a column or re-ordering columns).
You still need someone to review the generated code if it throws an error for potential data loss.
Yeah, exactly what I meant by the terraform-like plan/apply stages. You generate the change script and save it as your "plan", and then have an apply step that takes a backup and runs the script.