3 ms·
There are a number of declarative schema management tools, which operate on a repo of desired-state CREATE statements. No need to write up/down migrations or pr
by evanelias 2y ago
There are a number of declarative schema management tools, which operate on a repo of desired-state CREATE statements. No need to write up/down migrations or predicates/actions. You just have CREATE statements, and can modify them in-place, and the schema management tool figures out the appropriate DDL to transform any live database into the desired state. Conceptually this has many advantages for managing tables [1] as well as stored procedures (and functions, triggers, etc) [2].
My tool Skeema, first released in 2016, provides declarative schema management for hundreds of MySQL/MariaDB based companies, including GitHub, SendGrid, Cash App, Wix, Etsy, and many others you have likely heard of. Safety is the primary consideration throughout all of Skeema's design: https://www.skeema.io/docs/features/safety/ https://www.skeema.io/docs/features/safety/
For Postgres, a few declarative solutions include sqldef, Migra, Tusker (which builds on Migra), and Atlas.
[1] https://www.skeema.io/blog/2019/01/18/declarative/ https://www.skeema.io/blog/2019/01/18/declarative/
[2] https://www.skeema.io/blog/2023/10/24/stored-proc-deployment/ https://www.skeema.io/blog/2023/10/24/stored-proc-deployment...