Support caching dev seed in external storage
Problem
With !16700 (merged) in place, we're introducing a considerable workload for seeding the database, writing millions of records.
That costs development time as we need to wait at least more 30 minutes to seed all these records.
Time spent waiting for seeding will keep growing as we introduce more mass insertion processes.
Solution proposal
- Persist a dev database dump (generated through regular seeding) in an external storage (or LFS?)
- Create a process (weekly?) that will update this seed DB dump
- Create an accessible script (e.g.
bin/load_seed_dump
) that will download the latest seed and load to the local DB - Ideally,
bin/load_seed_dump
should go back to the SHA where the seed was created (git checkout SHA
), load the dump, go back to the upstream HEAD andrake db:migrate
, as relations might have changed through migrations
Benefits
No dev downtime for seeding the database.
Edited by Oswaldo Ferreira