PHP Database Migrations for Everyone
I think that for Notion (neat company btw) it might make a lot of sense to keep the schema pretty loose but I have managed to keep an agile DB alive and well with a lot of flexibility. A lot of migration infrastructure packages and tools will store the migration state in the DB itself - we're using Phinx internally which creates a `phinxlog` table with a record of migrations that have been run - there is tooling to migrate only up to a specific version and since the record of all executed versions is stored in the DB the tool can easily figure out what works needs to be done in which circumstances. The result is that we can easily roll different environments onto different versions.
Neither schema driven nor unstructured is always the right call - they both have their strengths and weaknesses - but I think that trust in data integrity is pretty important when writing flexible code on top of a data layer. Knowing that expected keys can't be omitted and that so-and-so column must conform to a given data domain can really alleviate defensive coding costs.
If you'd like to talk some more I can shoot you an email and we can sit down sometime?
JSON static files vs Database, to save plugins information
1 project | reddit.com/r/Wordpress | 11 Jun 2022
Phinx – PHP Database Migrations for Everyone
1 project | news.ycombinator.com | 14 May 2022
Dockerized app problems
1 project | reddit.com/r/PHPhelp | 2 Nov 2021
I would like to have access to the final array in the initial static class
1 project | reddit.com/r/PHPhelp | 7 Sep 2021
How to manage, update local development Database
1 project | reddit.com/r/devops | 4 Jul 2021