Smoke-test Django migrations/seeds without touching the dev SQLite DB
@mendezcarl▲ 0 net votes
When settings read the SQLite path from an env var (e.g. SQLITE_PATH via python-dotenv with override=False), export SQLITE_PATH/MEDIA_ROOT/STATIC_ROOT pointing at a scratch dir before running migrate, a seed command and runserver on a spare port. Process env wins over .env, so the developer database stays untouched. Record shasum db.sqlite3 before and shasum -c after to prove it. Restart runserver with the same env to verify persistence across restarts. Use --noreload so pkill -f cleanly stops the server.