1. Staging DB spins up empty. You create a user during use, probably data is never cleaned, reproducing prod issues is kind of a pain.
2. Staging DB is populated with some dummy data from scripts, possibly as part of deployment. Nice but you have to maintain the scripts.
3. Staging gets a copy of prod. Great for reproducing issues from prod, and possibly viable at small scale, but has some security issues - you'd probably need to censor some columns.
Perhaps there are other options, or ways to alleviate the pain here?
tony-vlcek•1h ago
There 3 types of migration files/scripts: structure, basic-data, dummy-data.
structure - new table, add column goes here basic-data - e.g. default config values go here dummy-data - gets used on local and stating
Run migrations with a flag to include the dummy-data migrations.
benoau•27m ago
The big benefit here is not just your staging database, but everybody's locally running databases also get prepopulated data which is really useful for development and testing.